Public Member Functions

ClassDesc Class Reference

This reference page is linked to from the following overview topics: Lesson 1: Sample utility plug-in, Incremental Improvements, SDK Change Details, SuperClassID Cleanup, General Best Practices, Categories of Texture Maps, Classes Involved in the Action System, Global Function Publishing API Functions, Class Descriptors, Creating and Destroying Plug-in Instances, Loading and Saving Plug-in Data, Ring Array Classes, Ring Array Creation Process, MAXScript Plug-in Basics, Custom Plug-in Creation Processes.


Search for all occurrences

Detailed Description

Class descriptors provide the system with information about the plug-in classes in the DLL.

The developer creates a class descriptor by deriving a class from ClassDesc2 (which derives from ClassDesc) and implementing several of its methods.

#include <plugapi.h>

Inheritance diagram for ClassDesc:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~ClassDesc ()
virtual int  IsPublic ()=0
  Controls if the plug-in shows up in lists from the user to choose from.
virtual void *  Create (BOOL loading=FALSE)=0
  3ds Max calls this method when it needs a pointer to a new instance of the plug-in class.
virtual int  BeginCreate (Interface *i)
  The custom creation process of the plug-in object is handled by this method.
virtual int  EndCreate (Interface *i)
  The termination of the custom creation process is managed by the implementation of this method.
virtual const MCHAR *  ClassName ()=0
  This method returns the name of the class.
virtual SClass_ID  SuperClassID ()=0
  This method returns a system defined constant describing the class this plug-in class was derived from.
virtual Class_ID  ClassID ()=0
  This method must return the unique ID for the object.
virtual const MCHAR *  Category ()=0
  This methods returns a string describing the category a plug-in fits into.
virtual BOOL  OkToCreate (Interface *i)
  This method is used to enable or disable the button that allows the plug-ins class to be created.
virtual BOOL  HasClassParams ()
  If a plug-in class has default parameters that it needs to allow the user to edit, TRUE should be returned and EditClassParams() and ResetClassParams() should be implemented.
virtual void  EditClassParams (HWND hParent)
  If the user picks the class from the list this method is called.
virtual void  ResetClassParams (BOOL fileReset=FALSE)
  When the user executes File / Reset or presses the 'Reset to Factory Settings...' button in the File / Preferences...
virtual DWORD  InitialRollupPageState ()
  This method returns a DWORD which is used to initialize the rollup state in both the create branch and the modify branch.
virtual const MCHAR *  InternalName ()
  Returns a string which provides a fixed, machine parsable internal name for the plug-in.
virtual HINSTANCE  HInstance ()
  Returns the DLL instance handle of the plug-in.
virtual CoreExport MCHAR *  GetRsrcString (INT_PTR id)
  Returns a pointer to the string from the resource string table.
virtual void  MakeAutoParamBlocks (ReferenceMaker *owner)
  This method creates the automatic parameter blocks for the specified plug-in.
virtual bool  DrawRepresentation (COLORREF bkColor, HDC hDC, Rect &rect)
  Allows a plug-in to provide a custom image for display in Schematic View.
virtual Class_ID  SubClassID ()
  This method can be used for further categorizing plugins.
virtual INT_PTR  Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
  This function is maintained so the 3ds Max SDK can be extended without breaking backwards compatibility.
ActionTable Methods

Plug-ins do not need to register their action tables from within these methods; they are registered automatically by 3ds Max on behalf of the plug-in.

Therefore plug-ins are encouraged to report the correct number of action tables via these methods, as opposed to reporting 0 but registering the action tables themselves in the implementation of these methods.

virtual int  NumActionTables ()
  3ds Max calls this to get the number of action tables a plug-in has.
virtual ActionTable GetActionTable (int i)
  Returns a pointer to the specified action table.
Manipulator Related Methods
virtual BOOL  IsManipulator ()
  Returns TRUE if the class implements a manipulator object; otherwise FALSE.
virtual BOOL  CanManipulate (ReferenceTarget *hTarget)
  The method returns true if the class is a manipulator and it manipulates the given base object, modifier or controller.
virtual BOOL  CanManipulateNode (INode *pNode)
  Returns TRUE if the manipulator applies to the given node; otherwise FALSE.
virtual Manipulator CreateManipulator (ReferenceTarget *hTarget, INode *pNode)
  Creates a manipulator object When a manipulator returns TRUE to CanManipulate(ReferenceTarget* hTarget), the system calls this version of CreateManipulator() to create an instance of the manipulator.
virtual Manipulator CreateManipulator (INode *pNode)
  Creates a manipulator object.
IO Methods
virtual BOOL  NeedsToSave ()
  Returns TRUE if there is data associated with the class that needs to be saved in the 3ds Max file.
virtual IOResult  Save (ISave *isave)
  If NeedsToSave() returns TRUE then this method should be implemented to save the data associated with the class.
virtual IOResult  Load (ILoad *iload)
  If NeedsToSave() returns TRUE then this method should be implemented to load the data associated with the class.
Parameter Block Descriptor Functions
virtual int  NumParamBlockDescs ()
  Returns the number or ParamBlockDesc2s used by the plug-in.
virtual ParamBlockDesc2 GetParamBlockDesc (int i)
  Returns a pointer to the 'i-th' parameter block 2 descriptor.
virtual ParamBlockDesc2 GetParamBlockDescByID (BlockID id)
virtual void  AddParamBlockDesc (ParamBlockDesc2 *pbd)
Automatic UI Management
virtual void  BeginEditParams (IObjParam *ip, ReferenceMaker *obj, ULONG flags, Animatable *prev)
  Implemented by the System.
virtual void  EndEditParams (IObjParam *ip, ReferenceMaker *obj, ULONG flags, Animatable *prev)
  This method is called to handle the ending of the automatic command panel user interface management provided by the param map 2 system.
virtual void  InvalidateUI (ParamBlockDesc2 *pbd)
  Invalidates the user interface for the rollup or dialog managed by the specified descriptor.
Parameter Map Functions
virtual int  NumParamMaps ()
  Returns the number of parameter map2s used by the plug-in.
virtual IParamMap2 GetParamMap (int i)
  Returns a pointer to the nth parameter map2.
virtual IParamMap2 GetParamMap (ParamBlockDesc2 *pbd)
  Returns a pointer to the parameter map2 whose descriptor is passed.
virtual void  SetUserDlgProc (ParamBlockDesc2 *pbd, ParamMap2UserDlgProc *proc=NULL)
  Sets the parameter map 2 user dialog proc for the specified descriptor.
virtual ParamMap2UserDlgProc GetUserDlgProc (ParamBlockDesc2 *pbd)
  Returns a pointer to the parameter map 2 user dialog proc (if any) for the specified descriptor.
Function publishing methods
virtual int  NumInterfaces ()
  Returns the number of function publishing interfaces maintained by the class descriptor.
virtual FPInterface GetInterfaceAt (int i)
  Returns the nth function publishing interface.
virtual CoreExport FPInterface GetInterface (Interface_ID id)
  Returns a pointer to the function publishing interface whose ID is specified.
virtual CoreExport FPInterface GetInterface (MCHAR *name)
  Returns a pointer to the function publishing interface whose name is specified.
virtual CoreExport void  AddInterface (FPInterface *fpi)
  Adds the specified interface to the list maintained by this class descriptor.
virtual void  ClearInterfaces ()
  Deletes all the interfaces maintained by the class descriptor.

Constructor & Destructor Documentation

virtual ~ClassDesc ( ) [inline, virtual]
{}

Member Function Documentation

virtual int IsPublic ( ) [pure virtual]

Controls if the plug-in shows up in lists from the user to choose from.

Returns:
If the plug-in can be picked and assigned by the user, as is usually the case, return TRUE. Certain plug-ins may be used privately by other plug-ins implemented in the same DLL and should not appear in lists for user to choose from. These plug-ins would return FALSE.

Implemented in MSPluginDesc, and PFActionStateDesc.

virtual void* Create ( BOOL  loading = FALSE ) [pure virtual]

3ds Max calls this method when it needs a pointer to a new instance of the plug-in class.

For example, if 3ds Max is loading a file from disk containing a previously used plug-in (procedural object, modifier, controller, etc...), it will call the plug-in's Animatable::Create() method. The plug-in responds by allocating a new instance of its plug-in class. See the Advanced Topic section on Memory Allocation for more details.

Parameters:
loading This parameter is a flag indicating if the class being created is going to be loaded from a disk file. If the flag is TRUE, the plug-in may not have to perform any initialization of the object because the loading process will take care of it. See the Advanced Topics section on Loading and Saving for more information.

Note: If this parameter is TRUE, developers must initialize their references to NULL. Otherwise 3ds Max may crash.

3ds Max provides a default plug-in object creation process. Many plug-ins fit this form. When the system is about to create an instance of the plug-in object it calls a method BaseObject::GetCreateMouseCallBack().This method returns a callback object whose proc() method handles the mouse input during its creation phase. Most of the work is then handled by the system. The procedural sphere is an example of this type of plug-in. Certain plug-ins may have special creation needs however. The target camera is an example of such a plug-in. Because it needs to create two nodes in the scene (the camera and the target) it requires a custom creation process. To support these plug-ins the following two methods are provided. They allow the plug-in to manage the creation process themselves. See Object Creation Methods for more details.

Implemented in MSPluginDesc, and PFActionStateDesc.

virtual int BeginCreate ( Interface i ) [inline, virtual]

The custom creation process of the plug-in object is handled by this method.

For example, a plug-in can create a custom command mode and push it on the command stack to handle the creation process.

Important Note: A plug-in that doesn't want to participate in the standard object creation mechanism using CreateMouseCallBack must push a CommandMode on the stack in this method and remove it in EndCreate(). This is true even if the plug-in doesn't do anything inside the mode. A mode has to be pushed on the stack and then later popped off otherwise a crash will occur (if the default implementation of this method is not used). For more details on object creation see the Advanced Topics section Object Creation Methods.

Parameters:
i An interface pointer the plug-in may use to call functions in 3ds Max.
Returns:
To use the default creation process (the system implementation for this method) return 0; Return nonzero if the plug-in implements this method.

Reimplemented in MSPluginDesc.

{return 0;}
virtual int EndCreate ( Interface i ) [inline, virtual]

The termination of the custom creation process is managed by the implementation of this method.

For example, the plug-in could remove a custom command mode from the command stack. See the Advanced Topics section on Object Creation Methods for more details.

Parameters:
i An interface pointer the plug-in may use to call functions in 3ds Max.
Returns:
To use the system implementation for this method return 0; Return nonzero if the plug-in implements this method.

Reimplemented in MSPluginDesc.

{return 0;};
virtual const MCHAR* ClassName ( ) [pure virtual]

This method returns the name of the class.

This name appears in the button for the plug-in in the 3ds Max user interface.

Returns:
The name of the class.

Implemented in MSPluginDesc, and PFActionStateDesc.

virtual SClass_ID SuperClassID ( ) [pure virtual]

This method returns a system defined constant describing the class this plug-in class was derived from.

For example, the Bend modifier returns OSM_CLASS_ID. This super class ID is used by all object space modifiers. See List of SuperClassIDs.

Returns:
The SuperClassID of the plug-in.

Implemented in MSPluginDesc, and PFActionStateDesc.

virtual Class_ID ClassID ( ) [pure virtual]

This method must return the unique ID for the object.

If two ClassIDs conflict, the system will only load the first one it finds. The ClassID consists of two unsigned 32-bit quantities. The constructor assigns a value to each of these, for example Class_ID(0xA1C8E1D1, 0xE7AA2BE5). A developer should use the random Class_ID generator to avoid conflicts (Generate a random Class_ID). See Class Class_ID for more information.

Returns:
The unique ClassID of the plug-in.

Implemented in MSPluginDesc, and PFActionStateDesc.

virtual const MCHAR* Category ( ) [pure virtual]

This methods returns a string describing the category a plug-in fits into.

The category is usually selected in the drop down list in the create, or utility branch of the command panel. In the create branch, if this is set to be an existing category (i.e. "Standard Primitives", "Splines", ...) then the plug-in will appear in that category. If the category doesn't yet exists then it is created. If the plug-in does not need to appear in the list, it may simply return a null string as in _M(""). In the modify branch, the category determines which group it appears in the Configure Button Sets / Modifiers list. These are the categories such as "MAX STANDARD", "MAX EDIT", and "MAX SURFACE".

This method is also used to distinguish between the various types of texture maps so they can be separated in the Material/Map Browser. The appropriate string should be returned by this method of the Texmap. For example:

        const MCHAR* Category() { 
            return TEXMAP_CAT_3D; 
        }

The options for texture maps are:

  • MCHAR TEXMAP_CAT_2D[]; -> 2D maps.
  • MCHAR TEXMAP_CAT_3D[]; - 3D maps.
  • MCHAR TEXMAP_CAT_COMP[]; - Composite.
  • MCHAR TEXMAP_CAT_COLMOD[]; - Color modifier.
  • MCHAR TEXMAP_CAT_ENV[]; - Environment.

Implemented in MSPluginDesc, and PFActionStateDesc.

virtual BOOL OkToCreate ( Interface i ) [inline, virtual]

This method is used to enable or disable the button that allows the plug-ins class to be created.

For example, at certain times it is not appropriate to for the Boolean object to be created. When there is not an object of the appropriate type selected the Boolean object cannot be created. At these times the button should be disabled (the button will appear as grayed out in the Create branch of the command panel). The button should be enabled if there is an object of the appropriate type selected. This method allows a plug-in to control the state of the button.

Parameters:
i An interface pointer the plug-in may use to call functions in 3ds Max.
Returns:
TRUE to enable the class creation button; FALSE to disable it.
Sample Code:
The following code from /MAXSDK/SAMPLES/OBJECTS/BOOLOBJ.CPP demonstrates an implementation of this method. If there is not a node selected, it is not OK to use the command so the button should appear disabled. To disable the button OkToCreate() returns FALSE. If the object that is selected is not of the appropriate type it the button is disabled as well
        BOOL BoolObjClassDesc::OkToCreate(Interface *i)
        {
            if (i->GetSelNodeCount()!=1) return FALSE;
            ObjectState os = i->GetSelNode(0)->GetObjectRef()->Eval(i->GetTime());
            if (os.obj->SuperClassID()!=GEOMOBJECT_CLASS_ID) {
                return FALSE;
            }
            return TRUE;
        }
{ return TRUE; }    // return FALSE to disable create button        
virtual BOOL HasClassParams ( ) [inline, virtual]

If a plug-in class has default parameters that it needs to allow the user to edit, TRUE should be returned and EditClassParams() and ResetClassParams() should be implemented.

Otherwise return FALSE (the default).

{return FALSE;}
virtual void EditClassParams ( HWND  hParent ) [inline, virtual]

If the user picks the class from the list this method is called.

The plug-in should put up a modal dialog that allows the user to edit the plug-ins default parameters. The plug-in should not return until the user has finished editing the parameters.

Parameters:
hParent The parent window handle.
{}
virtual void ResetClassParams ( BOOL  fileReset = FALSE ) [inline, virtual]

When the user executes File / Reset or presses the 'Reset to Factory Settings...' button in the File / Preferences...

/ Animation tab / Controller Defaults section this method is called. The plug-in can respond by resetting itself to use its default values.

Parameters:
fileReset When TRUE, the user has performed a File / Reset operation. When FALSE, the user is in the Preferences... dialog doing a reset controller defaults operation.

Reimplemented in ClassDesc2, and MSPluginDesc.

{}
virtual int NumActionTables ( ) [inline, virtual]

3ds Max calls this to get the number of action tables a plug-in has.

If more than one class uses the table only one of the classes should export the table, but they can all use them.

See also:
ActionTable
{ return 0; }
virtual ActionTable* GetActionTable ( int  i ) [inline, virtual]

Returns a pointer to the specified action table.

Parameters:
i The zero based index of the table to return.
See also:
ActionTable
{ return NULL; }
virtual BOOL IsManipulator ( ) [inline, virtual]

Returns TRUE if the class implements a manipulator object; otherwise FALSE.

Reimplemented in MSPluginDesc.

{ return FALSE; }
virtual BOOL CanManipulate ( ReferenceTarget hTarget ) [inline, virtual]

The method returns true if the class is a manipulator and it manipulates the given base object, modifier or controller.

When starting "Manipulate" mode, this is called on selected nodes for the base object, all modifiers, the TM controller and the position, rotation and scale controllers, if the TM controller is a PRSController.

Parameters:
hTarget A pointer to a reference target.

Reimplemented in MSPluginDesc.

{ return FALSE; }
virtual BOOL CanManipulateNode ( INode pNode ) [inline, virtual]

Returns TRUE if the manipulator applies to the given node; otherwise FALSE.

This method can be used to indicate that the manipulator works on a part of an object that is not covered by BOOL CanManipulate(ReferenceTarget* hTarget) such as the visibility controller of a node.

Parameters:
pNode The INode to check.

Reimplemented in MSPluginDesc.

{ return FALSE; }
virtual Manipulator* CreateManipulator ( ReferenceTarget hTarget,
INode pNode 
) [inline, virtual]

Creates a manipulator object When a manipulator returns TRUE to CanManipulate(ReferenceTarget* hTarget), the system calls this version of CreateManipulator() to create an instance of the manipulator.

Parameters:
hTarget - The ReferenceTarget for which a manipulator is requested
pNode - The node that the manipulator needs to manipulate (know about)
Returns:
- Pointer to the newly created manipulator, or NULL if the creation failed.
        Manipulator* BendManipClassDesc::CreateManipulator(ReferenceTarget* hTarget, INode* node) {
            if (hTarget->ClassID() != Class_ID(BENDOSM_CLASS_ID, 0))
                return NULL;
            return (new BendManip((SimpleMod2*)hTarget, node));
        }

Reimplemented in MSPluginDesc.

                          { return NULL; }
virtual Manipulator* CreateManipulator ( INode pNode ) [inline, virtual]

Creates a manipulator object.

When a manipulator returns TRUE to CanManipulateNode(INode* pNode), the system calls this version of CreateManipulator() to create an instance of the manipulator.

Parameters:
pNode - The node that the manipulator needs to manipulate (know about)
Returns:
- Pointer to the newly created manipulator, or NULL if the creation failed.

Reimplemented in MSPluginDesc.

{return NULL;}
virtual BOOL NeedsToSave ( ) [inline, virtual]

Returns TRUE if there is data associated with the class that needs to be saved in the 3ds Max file.

If this is so, implement the Save() and Load() methods below. If there is no class data to save return FALSE.

{ return FALSE; }
virtual IOResult Save ( ISave isave ) [inline, virtual]

If NeedsToSave() returns TRUE then this method should be implemented to save the data associated with the class.

Parameters:
isave A pointer that may be used to call methods to save data to disk.
Returns:
IO_OK if the save was successful; otherwise IO_ERROR.
{ return IO_OK; }
virtual IOResult Load ( ILoad iload ) [inline, virtual]

If NeedsToSave() returns TRUE then this method should be implemented to load the data associated with the class.

Parameters:
iload A pointer that may be used to load data from a file.
Returns:
IO_OK if the load was successful; otherwise IO_ERROR.
{ return IO_OK; }
virtual DWORD InitialRollupPageState ( ) [inline, virtual]

This method returns a DWORD which is used to initialize the rollup state in both the create branch and the modify branch.

The semantics are different, however for these two cases. Whenever the rollups are created in the create branch, their state will be that specified by this method. In the modify branch, the first time an object of this type is modified the state will be that of this method, but after that it will remain what it was last set to.

Returns:
The bits of this DWORD set indicate the corrresponding rollup page is closed. The zero bit corresponds to the plug-ins first rollup, the first bit is the second rollup, etc. The value 0x7fffffff is returned by the default implementation so the command panel can detect this method is not being overridden, and just leave the rollups as is.

Reimplemented in MSPluginDesc.

{ return 0x7fffffff; }
virtual const MCHAR* InternalName ( ) [inline, virtual]

Returns a string which provides a fixed, machine parsable internal name for the plug-in.

This name is used by MAXScript.

Reimplemented in MSPluginDesc, and PFActionStateDesc.

{ return NULL; }
virtual HINSTANCE HInstance ( ) [inline, virtual]

Returns the DLL instance handle of the plug-in.

This is used so that string resources can be loaded by the ParamBlock2 system.

Reimplemented in MSPluginDesc.

{ return NULL; }
virtual int NumParamBlockDescs ( ) [inline, virtual]

Returns the number or ParamBlockDesc2s used by the plug-in.

Reimplemented in ClassDesc2.

{ return 0; }
virtual ParamBlockDesc2* GetParamBlockDesc ( int  i ) [inline, virtual]

Returns a pointer to the 'i-th' parameter block 2 descriptor.

Parameters:
i The zero based index of the descriptor to return.

Reimplemented in ClassDesc2.

{ return NULL; }
virtual ParamBlockDesc2* GetParamBlockDescByID ( BlockID  id ) [inline, virtual]
Remarks:
Implemented by the System.

Returns a pointer to the specified parameter block 2 descriptor.
Parameters:
id The ID of the parameter block.

Reimplemented in ClassDesc2.

{ return NULL; }
virtual void AddParamBlockDesc ( ParamBlockDesc2 pbd ) [inline, virtual]
Remarks:
Implemented by the System.

Adds the specified parameter block 2 descriptor to the list of those maintained by the class.
Parameters:
pbd Points to the parameter block 2 descriptor to add.

Reimplemented in ClassDesc2.

{ }
virtual void BeginEditParams ( IObjParam ip,
ReferenceMaker obj,
ULONG  flags,
Animatable prev 
) [inline, virtual]

Implemented by the System.



This method is called to handle the beginning of the automatic command panel user interface management provided by the param map 2 system. This method is called by the plug-in from its Animatable::BeginEditParams() method. The parameters passed to that method are simply passed along to this method.

Parameters:
ip The interface pointer passed to the plug-in.
obj Points to the plug-in class calling this method.
flags The flags passed along to the plug-in in Animatable::BeginEditParams().
prev The pointer passed to the plug-in in Animatable::BeginEditParams().

Reimplemented in ClassDesc2.

{ }
virtual void EndEditParams ( IObjParam ip,
ReferenceMaker obj,
ULONG  flags,
Animatable prev 
) [inline, virtual]

This method is called to handle the ending of the automatic command panel user interface management provided by the param map 2 system.

This method is called by the plug-in from its Animatable::EndEditParams() method. The parameters passed to that method are simply passed along to this method.

Parameters:
ip The interface pointer passed to the plug-in.
obj Points to the plug-in class calling this method.
flags The flags passed along to the plug-in in Animatable::EndEditParams().
prev The pointer passed to the plug-in in Animatable::EndEditParams().

Reimplemented in ClassDesc2.

{ }
virtual void InvalidateUI ( ParamBlockDesc2 pbd ) [inline, virtual]

Invalidates the user interface for the rollup or dialog managed by the specified descriptor.

This will cause the controls in that rollup to be redrawn.

Parameters:
pbd Points to the parameter block 2 descriptor whose corresponding UI is invalidated.

Reimplemented in ClassDesc2.

{ }
virtual CoreExport MCHAR* GetRsrcString ( INT_PTR  id ) [virtual]

Returns a pointer to the string from the resource string table.

Reimplemented in MSPluginDesc.

virtual void MakeAutoParamBlocks ( ReferenceMaker owner ) [inline, virtual]

This method creates the automatic parameter blocks for the specified plug-in.

These are the ones with the P_AUTO_CONSTRUCT bit set on the ParamBlockDesc2::flags value.

Parameters:
owner Points to the owner of the parameter block.

Reimplemented in ClassDesc2.

{ }
virtual int NumParamMaps ( ) [inline, virtual]

Returns the number of parameter map2s used by the plug-in.

Reimplemented in ClassDesc2.

{ return 0; }
virtual IParamMap2* GetParamMap ( int  i ) [inline, virtual]

Returns a pointer to the nth parameter map2.

Parameters:
i The zero based index of the parameter map2 to return.

Reimplemented in ClassDesc2.

{ return NULL; }
virtual IParamMap2* GetParamMap ( ParamBlockDesc2 pbd ) [inline, virtual]

Returns a pointer to the parameter map2 whose descriptor is passed.

Parameters:
pbd Points to the parameter block2 descriptor.
{ return NULL; }
virtual void SetUserDlgProc ( ParamBlockDesc2 pbd,
ParamMap2UserDlgProc proc = NULL 
) [inline, virtual]

Sets the parameter map 2 user dialog proc for the specified descriptor.

Parameters:
pbd Points to the parameter block 2 descriptor.
proc This object manages user interface control that require special processing.
See also:
ParamMap2UserDlgProc.

Reimplemented in ClassDesc2.

{ }
virtual ParamMap2UserDlgProc* GetUserDlgProc ( ParamBlockDesc2 pbd ) [inline, virtual]

Returns a pointer to the parameter map 2 user dialog proc (if any) for the specified descriptor.

Parameters:
pbd Points to the parameter block 2 descriptor.
Returns:
See Class ParamMap2UserDlgProc.
{ return NULL; }
virtual bool DrawRepresentation ( COLORREF  bkColor,
HDC  hDC,
Rect rect 
) [inline, virtual]

Allows a plug-in to provide a custom image for display in Schematic View.

Parameters:
bkColor The background color. See COLORREF-DWORD format.
hDC The handle for the device context.
rect The rectangle to draw in.
Returns:
TRUE if this class can draw an image to represent itself graphically; otherwise FALSE.
{ return FALSE; }
virtual int NumInterfaces ( ) [inline, virtual]

Returns the number of function publishing interfaces maintained by the class descriptor.

{ return interfaces.Count(); }
virtual FPInterface* GetInterfaceAt ( int  i ) [inline, virtual]

Returns the nth function publishing interface.

{ return interfaces[i]; }
virtual CoreExport FPInterface* GetInterface ( Interface_ID  id ) [virtual]

Returns a pointer to the function publishing interface whose ID is specified.

Parameters:
id The inteface ID.
virtual CoreExport FPInterface* GetInterface ( MCHAR *  name ) [virtual]

Returns a pointer to the function publishing interface whose name is specified.

Parameters:
name The name of the interface.
virtual CoreExport void AddInterface ( FPInterface fpi ) [virtual]

Adds the specified interface to the list maintained by this class descriptor.

Parameters:
fpi Points to the interface to add.
virtual void ClearInterfaces ( ) [inline, virtual]

Deletes all the interfaces maintained by the class descriptor.

{ interfaces.ZeroCount(); }
virtual Class_ID SubClassID ( ) [inline, virtual]

This method can be used for further categorizing plugins.

If a plugin has sub-plugins (like light > shadows, particles > operators), this method can be used to differentiate them. sub-plugins can be derived from ReferenceTarget but return a particular class ID published by the parent plugins SDK headers. Then parent plugin can get a list of all reference targets whose SubClassID matches the published SubClassID.

Reimplemented in MSPluginDesc, and PFActionStateDesc.

{ return Class_ID(); }
virtual INT_PTR Execute ( int  cmd,
ULONG_PTR  arg1 = 0,
ULONG_PTR  arg2 = 0,
ULONG_PTR  arg3 = 0 
) [inline, virtual]

This function is maintained so the 3ds Max SDK can be extended without breaking backwards compatibility.

The behavior of this function depends on the cmd parameter:

  • I_EXEC_CTRL_BYPASS_TREE_VIEW - Returning 1 will hide a controller in track view.
  • I_EXEC_GET_SOA_STATE - The arg1 parameter is expected to be a bool*. The bool gets set to true or false depending whether sub-obj anim is or not enabled for that object type. Returns TRUE if the arg1 is set successfully, otherwise FALSE.
  • I_EXEC_EVAL_SOA_TIME - The arg1 parameter is expected to be a TimeValue* The TimeValue gets set appropriately, depending on whether sub-obj animation is allowed of not for that object type. Returns TRUE if the arg1 is set successfully, otherwise FALSE.
{ return 0; } 

ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc
ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc ClassDesc