Required Changes To Shape Objects

3DS Max Plug-In SDK

Required Changes To Shape Objects

See Also: What's New in the MAX 3.0 SDK, Required Changes to MAX 2.0 Plug-Ins for MAX 3.0.

Material IDs in Shape Related Classes

New in the 3ds max 3.0 SDK is material ID access to various shape-related classes. This results in various methods being added as shown below:

ShapeObject:

 virtual MtlID GetMatID(TimeValue t, int curve, int piece) { return 0; }

SimpleShape:

 virtual MtlID GetMatID(TimeValue t, int curve, int piece);

SimpleSpline:

 MtlID GetMatID(TimeValue t, int curve, int piece);

BezierShape:

 MtlID GetMatID(int poly, int piece);

PolyShape:

 MtlID GetMatID(int poly, int piece);

PolyLine:

 MtlID GetMatID(int segment);

SplineShape:

 MtlID GetMatID(TimeValue t, int curve, int piece);

LinearShape:

 MtlID GetMatID(TimeValue t, int curve, int piece);

Note that ShapeObject has a default implementation so it is not necessary to implement it if the shape class does not support material IDs.

Number of Verticies in ShapeObjects

There is a new method of ShapeObject called NumberOfVerticies(). This method is used by the Summary Info and Object Properties dialogs to inform the user how many vertices or CVs are in the object. Developers may wish to implement this method.

Attach Shape Method

Developers implementing the ShapeObject::AttachShape() method need to add the weldEnds and weldThreshold parameters. If any endpoints of the curves in the shape being attached are within the threshold distance to endpoints of an existing curve, and the weld flag is TRUE, they should be welded.

RescaleWorldUnits Implementations

Objects derived from the ShapeObject class which have RescaleWorldUnits methods implemented need to call the ShapeObject::RescaleWorldUnits method. See Class ShapeObject.