Working with MAX Objects in the SDK (SDK)

3DS Max Plug-In SDK

Working with MAX Objects in the SDK (SDK)

All of the MAX-side objects accessible in MAXScript are represented by instances of the MAXWrapper family of classes. As the name suggests, these are wrappers for MAX object references that live in the garbage-collected MAXScript world. The wrapped reference is a standard MAX reference created with ReferenceMaker::MakeRefByID(); the MAXWrapper class inherits from both Value and ReferenceMaker. This reference allows MAXScript to be notified of MAX-side changes to the object, particularly deletion.

The wrapper class family is as follows:

Value, ReferenceMaker

MAXWrapper  

MAXNode 

MAXModifier 

MAXControl 

MAXKey 

MAXMaterial 

MAXMultiMaterial 

MAXTexture 

MAXMaterialLibrary 

MAXObject 

MAXSubAnim 

There is also a Value subclass, MAXBitMap, which can be used to wrap MAX Bitmaps, but it is not a ReferenceMaker because Bitmaps in MAX are not referenceable in this way.

It should be clear which wrapper classes wrap which MAX-side entities, except perhaps for MAXSubAnim which is used to wrap objects you only know as Animatables that are accessible inside other Max objects via the Animatable::SubAnim() function. This is used in MAXScript to wrap things like modifier gizmo sub-objects, for example.