3ds Max C++ API Reference
Animatable Class Referenceabstract

#include <Animatable.h>

+ Inheritance diagram for Animatable:

Classes

class  EnumAnimList
 A callback class for enumerating animatables. More...
 

Public Member Functions

virtual void FreeCaches ()
 
virtual int NumChildren ()
 
virtual AnimatableChildAnim (int i)
 
virtual CoreExport MSTR NodeName ()
 
virtual void EditTrack ()
 
virtual CoreExport BOOL SubAnimSetKeyBufferPresent (int subNum)
 returns true if the sub-anim has a "Set Key" buffer present More...
 
virtual BOOL SetKeyBufferPresent ()
 returns true if there is a "Set Key" buffer present More...
 
virtual CoreExport void SubAnimCommitSetKeyBuffer (TimeValue t, int subNum)
 Commit any "Set Key" buffers on the given sub-anim. More...
 
virtual void CommitSetKeyBuffer (TimeValue t)
 Commit any "Set Key" buffers. More...
 
virtual CoreExport void SubAnimRevertSetKeyBuffer (int subNum)
 Revert any "Set Key" buffers on the given sub-anim. More...
 
virtual void RevertSetKeyBuffer ()
 Revert any "Set Key" buffers. More...
 
virtual LRESULT CALLBACK TrackViewWinProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 This function is obsolete. More...
 
virtual BOOL IsRefMaker ()
 Tells whether it is a ReferenceMaker. More...
 
virtual bool IsParamBlockDesc2Used (ParamBlockDesc2 *desc)
 Returns true if the passed description is being used. More...
 
virtual bool GetMacroRecorderName (bool used_as_rhs_value, MSTR &objectSpecifiedName)
 This method is called to access the object specified name to use for the Maxscript macrorecorder. More...
 
Construction, destruction of instances
CoreExport Animatable ()
 Constructor. More...
 
virtual CoreExport void DeleteThis ()
 Deletes an instance of this class. More...
 
Class identification
virtual void GetClassName (MSTR &s) MAX_SEALED
 
virtual void GetClassName (MSTR &s, bool localized) const
 Retrieves the name of the plugin class. More...
 
MSTR ClassName (bool localized=true) const
 Returns the name of the plugin class. More...
 
virtual CoreExport SClass_ID SuperClassID ()=0
 Retrieves a constant representing the type of the plugin. More...
 
virtual CoreExport Class_ID ClassID ()
 Retrieves a constant that uniquely identifies the plugin class. More...
 
Parameter Editing Methods
virtual void BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev=NULL)
 
virtual void EndEditParams (IObjParam *ip, ULONG flags, Animatable *next=NULL)
 
AppData, Interfaces, and Properties

The following methods deal with AppData.

This is application specific data that may be attached to any Animatable in the scene. With these APIs any 3ds Max object (controller, object, node, modifier, material, etc.) can have custom data attached by other objects. These chunks are saved in the .MAX file and can be accessed through the object they are attached to.

virtual CoreExport voidGetInterface (ULONG id)
 
virtual CoreExport void ReleaseInterface (ULONG id, void *i)
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual CoreExport int SetProperty (ULONG id, void *data)
 
virtual CoreExport voidGetProperty (ULONG id)
 
CoreExport void AppendProperty (AnimProperty *prop)
 A function to directly add arbitrary properties to this object developers should ensure that the properties ID does not conflict with any Max-specific IDs. More...
 
CoreExport AnimPropertyFindProperty (DWORD id)
 Find any property. More...
 
CoreExport void AddAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid, DWORD len, void *data)
 Adds application/plugin specific (custom) data to an Animatable. More...
 
CoreExport AppDataChunkGetAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Retrieves the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport BOOL RemoveAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Deletes the application/plugin specific (custom) data stored with an Animatable. More...
 
CoreExport void ClearAllAppData ()
 Deletes all application/plugin specific (custom) data stored with an Animatable. More...
 
Methods for Sub-Anims
virtual int NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
virtual MSTR SubAnimName (int i) MAX_SEALED
 
virtual CoreExport MSTR SubAnimName (int i, bool localized)
 
virtual BOOL CanDeleteSubAnim (int i)
 
virtual void DeleteSubAnim (int i)
 
virtual DWORD GetSubAnimCurveColor (int subNum)
 
virtual int SubNumToRefNum (int subNum)
 
virtual BOOL CanCopyAnim ()
 
CoreExport int HasSubElements (int type=0)
 
virtual int GetSubFCurveExtents (int subNum, ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 The values max and min should be initialized before calling this function. More...
 
virtual ParamDimensionGetParamDimension (int i)
 
virtual BOOL SelectSubAnim (int subNum)
 
Methods dealing with Keys and Track View
virtual BOOL BypassTreeView ()
 
virtual BOOL BypassTrackBar ()
 
virtual BOOL BypassPropertyLevel ()
 
virtual BOOL InvisibleProperty ()
 
virtual int NumKeys ()
 
virtual TimeValue GetKeyTime (int index)
 
virtual int GetKeyIndex (TimeValue t)
 
virtual BOOL GetNextKeyTime (TimeValue t, DWORD flags, TimeValue &nt)
 
virtual void CopyKeysFromTime (TimeValue src, TimeValue dst, DWORD flags)
 
virtual void DeleteKeyAtTime (TimeValue t)
 
virtual BOOL IsKeyAtTime (TimeValue t, DWORD flags)
 
virtual int GetKeyTimes (Tab< TimeValue > &times, Interval range, DWORD flags)
 
virtual int GetKeySelState (BitArray &sel, Interval range, DWORD flags)
 
CoreExport void OpenTreeEntry (int type, DWORD tv)
 
CoreExport void CloseTreeEntry (int type, DWORD tv)
 
CoreExport int IsTreeEntryOpen (int type, DWORD tv)
 
CoreExport BOOL GetSelInTrackView (DWORD tv)
 
CoreExport void SetSelInTrackView (DWORD tv, BOOL sel)
 
CoreExport BOOL InTrackViewSelSet (int which)
 
CoreExport void SetTrackViewSelSet (int which, BOOL inOut)
 
Controller Assignment
virtual BOOL AssignController (Animatable *control, int subAnim)
 
virtual BOOL CanAssignController (int subAnim)
 Return true if we can reassign the subanim specified. More...
 
Make Unique Control
virtual BOOL CanMakeUnique ()
 
Enumeration of Anims and Auxiliary Files
CoreExport int EnumAnimTree (AnimEnum *animEnum, Animatable *client, int subNum)
 
virtual CoreExport void EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags=FILE_ENUM_ALL)
 
Methods called when rendering is started and finished
virtual int RenderBegin (TimeValue t, ULONG flags=0)
 
virtual int RenderEnd (TimeValue t)
 
Operations to a selected block of time
virtual CoreExport Interval GetTimeRange (DWORD flags)
 
virtual void EditTimeRange (Interval range, DWORD flags)
 
virtual void DeleteTime (Interval iv, DWORD flags)
 
virtual void ReverseTime (Interval iv, DWORD flags)
 
virtual void ScaleTime (Interval iv, float s)
 
virtual void InsertTime (TimeValue ins, TimeValue amount)
 
virtual BOOL SupportTimeOperations ()
 
virtual CoreExport void MapKeys (TimeMap *map, DWORD flags)
 
virtual void DeleteKeys (DWORD flags)
 
virtual void DeleteKeyByIndex (int index)
 
virtual void SelectKeys (TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubKeys (int subNum, TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubCurve (int subNum, BOOL sel)
 
virtual void SelectKeyByIndex (int i, BOOL sel)
 
virtual BOOL IsKeySelected (int i)
 
virtual void FlagKey (TrackHitRecord hit)
 
virtual int GetFlagKeyIndex ()
 
virtual int NumSelKeys ()
 
virtual void CloneSelectedKeys (BOOL offset=FALSE)
 
virtual void AddNewKey (TimeValue t, DWORD flags)
 
virtual void MoveKeys (ParamDimensionBase *dim, float delta, DWORD flags)
 
virtual void ScaleKeyValues (ParamDimensionBase *dim, float origin, float scale, DWORD flags)
 
virtual void SelectCurve (BOOL sel)
 
virtual BOOL IsCurveSelected ()
 Returns TRUE if the function curve is selected; otherwise returns FALSE. More...
 
virtual BOOL IsSubCurveSelected (int subNum)
 Returns the selected state of the sub-curve whose index is passed. More...
 
virtual int GetSelKeyCoords (TimeValue &t, float &val, DWORD flags)
 
virtual void SetSelKeyCoords (TimeValue t, float val, DWORD flags)
 
virtual int SetSelKeyCoordsExpr (ParamDimension *dim, const MCHAR *timeExpr, const MCHAR *valExpr, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, int dx, int dy, DWORD flags)
 
virtual void AdjustTangents (TrackHitRecord hit, ParamDimensionBase *dim, float angle, float length, DWORD flags)
 
Animation Properties
virtual CoreExport BOOL IsAnimated ()
 
Clipboard Methods
virtual BOOL CanCopyTrack (Interval iv, DWORD flags)
 
virtual BOOL CanPasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopyTrack (Interval iv, DWORD flags)
 
virtual void PasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual BOOL CanCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual BOOL CanPasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
virtual TrackClipObjectCopySubTrack (int subNum, Interval iv, DWORD flags)
 
virtual void PasteSubTrack (int subNum, TrackClipObject *cobj, Interval iv, DWORD flags)
 
Drawing and hit testing tracks
virtual int GetTrackVSpace (int lineHeight)
 
virtual int HitTestTrack (TrackHitTab &hits, Rect &rcHit, Rect &rcTrack, float zoom, int scroll, DWORD flags)
 
virtual int PaintTrack (ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
virtual int PaintSubTrack (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
Drawing and hit testing function curves
virtual int PaintFCurves (ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestFCurves (ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int PaintSubFCurves (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcGraph, Rect &rcPaint, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual int HitTestSubFCurves (int subNum, ParamDimensionBase *dim, TrackHitTab &hits, Rect &rcHit, Rect &rcGraph, float tzoom, int tscroll, float vzoom, int vscroll, DWORD flags)
 
virtual void EditTrackParams (TimeValue t, ParamDimensionBase *dim, const MCHAR *pname, HWND hParent, IObjParam *ip, DWORD flags)
 
virtual int TrackParamsType ()
 
virtual int GetFCurveExtents (ParamDimensionBase *dim, float &min, float &max, DWORD flags)
 This method is called to calculate the largest and smallest values of the anim. More...
 
Methods dealing with Note Tracks
CoreExport void AddNoteTrack (NoteTrack *note)
 
CoreExport void DeleteNoteTrack (NoteTrack *note, BOOL delNote=TRUE)
 
CoreExport BOOL HasNoteTracks ()
 
CoreExport int NumNoteTracks ()
 
CoreExport NoteTrackGetNoteTrack (int i)
 
Bitmap Related Methods
virtual void FreeAllBitmaps ()
 
System Plug-In Related Methods
virtual void GetSystemNodes (INodeTab &nodes, SysNodeContext Context)
 
Sub-Class Indication
virtual BOOL IsSubClassOf (Class_ID classID)
 returns true if the animatable has sub-classed off the given class More...
 
Interactive Adjustment
virtual CoreExport void MouseCycleCompleted (TimeValue t)
 
virtual CoreExport void MouseCycleStarted (TimeValue t)
 
Parameter Block2 Methods
virtual int NumParamBlocks ()
 
virtual IParamBlock2GetParamBlock (int i)
 
virtual IParamBlock2GetParamBlockByID (short id)
 
Schematic View Methods
CoreExport bool SvSaveData (ISave *isave, USHORT id)
 
CoreExport bool SvLoadData (ILoad *iLoad)
 
CoreExport DWORD SvGetRefIndex ()
 
CoreExport void SvSetRefIndex (DWORD i)
 
CoreExport bool SvDeleteRefIndex ()
 
virtual CoreExport SvGraphNodeReference SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
CoreExport SvGraphNodeReference SvStdTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
 
virtual CoreExport bool SvCanInitiateLink (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanConcludeLink (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeChild)
 
virtual CoreExport MSTR SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)
 
virtual CoreExport bool SvCanSetName (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvSetName (IGraphObjectManager *gom, IGraphNode *gNode, const MSTR &name)
 
virtual CoreExport bool SvCanRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvRemoveThis (IGraphObjectManager *gom, IGraphNode *gNode)
 Called when the user deletes this object in the schematic view... More...
 
virtual CoreExport bool SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view. More...
 
virtual CoreExport bool SvIsHighlighted (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvHighlightColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport COLORREF SvGetSwatchColor (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvIsInactive (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvLinkChild (IGraphObjectManager *gom, IGraphNode *gNodeThis, IGraphNode *gNodeChild)
 
virtual CoreExport bool SvHandleDoubleClick (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MultiSelectCallbackSvGetMultiSelectCallback (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvCanSelect (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvEditProperties (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetTip (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRefTip (IGraphObjectManager *gom, IGraphNode *gNode, IGraphNode *gNodeMaker)
 
virtual CoreExport bool SvCanDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport bool SvDetach (IGraphObjectManager *gom, IGraphNode *gNode)
 
virtual CoreExport MSTR SvGetRelTip (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns a string to be displayed in the tip window in the schematic view for a relationship from "gNodeMaker" to "gNodeTarget"... More...
 
virtual CoreExport bool SvCanDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns true if this object can respond to the SvDetachRel(...) method... More...
 
virtual CoreExport bool SvDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Detach this relationship. More...
 
virtual CoreExport bool SvHandleRelDoubleClick (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Called when this relationship is double-clicked in the schematic view... More...
 
Custom Attributes
CoreExport ICustAttribContainerGetCustAttribContainer ()
 This method returns a pointer to the custom attributes container interface class. More...
 
CoreExport void AllocCustAttribContainer ()
 This method allocates space for a custom attributes container. More...
 
CoreExport void DeleteCustAttribContainer ()
 This method deletes space used by a custom attributes container. More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Member Functions

static CoreExport BOOL IsDeleted (Animatable *anim)
 Debug method to determine whether an object has been deleted. More...
 
static CoreExport AnimHandle GetHandleByAnim (Animatable *anim)
 Get the unique handle for an Animatable object. More...
 
static CoreExport AnimatableGetAnimByHandle (AnimHandle handle)
 Get an Animatable object from its unique handle. More...
 
static CoreExport AnimHandle GetNextHandle ()
 Get the unique handle for the next Animatable object to be created. More...
 
static CoreExport void EnumerateAllAnimatables (EnumAnimList &enumProcObject)
 Enumerator to enumerate across all animatables. More...
 
static CoreExport bool RegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (const Class_ID &cid, SClass_ID sid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool RegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
static CoreExport bool UnRegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file. More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Static Public Attributes

static const AnimHandle kInvalidAnimHandle = 0
 

Protected Member Functions

virtual CoreExport ~Animatable ()=0
 Destructor. More...
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Protected Attributes

DWORD aflag
 
AnimPropertyList aprops
 

Friends

class ISaveImp
 
class ILoadImp
 

Flag Access

Sets one or more bits in the Animatable flags

void SetAFlag (DWORD mask)
 
void ClearAFlag (DWORD mask)
 Clears one or more bits in the Animatable flags. More...
 
bool TestAFlag (DWORD mask) const
 Tests one or more bits in the Animatable flags. More...
 
void SetAFlagEx (DWORD mask)
 Sets one or more bits in the Animatable extended flags. More...
 
void ClearAFlagEx (DWORD mask)
 Clears one or more bits in the Animatable extended flags. More...
 
bool TestAFlagEx (DWORD mask) const
 Tests one or more bits in the Animatable extended flags. More...
 
CoreExport bool TestFlagBit (int index)
 Tests the specified flag bit. More...
 
CoreExport void SetFlagBit (int index, bool newValue=true)
 Sets the specified flag bit. More...
 
CoreExport void ClearFlagBit (int index)
 Clears the specified flag bit. More...
 
static CoreExport int RequestFlagBit ()
 Requests an unique flag bit index. More...
 
static CoreExport void ReleaseFlagBit (int index)
 Releases the flag bit index. More...
 
static CoreExport void ClearFlagBitInAllAnimatables (int index)
 Clears the specified flag bit in all Animatables. More...
 

Detailed Description

See also
Class Interface, Class INode, Animatable Flags, Class IGraphObjectManager, Class IGraphNode, Class Object

Description:
This is the base class for all animatable scene entity types, and for most plugin types. Methods are available for getting the ClassID and SuperClassID of the plug-in, deleting this instance of the plug-in class, and parameter editing in the command panel. There are also methods that deal with the sub-animatables of the plug-in. Most of the track view related methods are here as well.
Data Members:
protected:

unsigned long aflag;

The flags. These may be manipulated using the methods SetAFlag(), ClearAFlag(), and TestAFlag(). See List of Animatable Flags.

AnimPropertyList aprops;

This is a table of properties that a plug-in may use for its own storage needs. This table is also used by the system (for example Note Tracks and APP_DATA). A plug-in may use this, for example, when a class has some data that is used while its user interface is up. It can store the UI data on the property list temporarily and not have to carry around the data when it is not needed. See the methods of Template Class Tab for how to add and delete items from the list. Also see the methods GetProperty() and SetProperty() and Class AnimPropertyList. Note that it's not safe to copy Animatable objects because the properties held in AnimPropertyList do not have a well-defined copy semantics

Constructor & Destructor Documentation

◆ ~Animatable()

virtual CoreExport ~Animatable ( )
protectedpure virtual

Destructor.

Instances of class Animatable and classes directly derived from it should be deleted by calling Animatable::DeleteThis() on them, rather then calling the delete operator.

◆ Animatable()

Constructor.

Member Function Documentation

◆ DeleteThis()

virtual CoreExport void DeleteThis ( )
virtual

Deletes an instance of this class.

3ds Max calls this method when it needs to delete a plugin object (an instance of a class derived from Animatable). Similarly, plugins that need to delete instances of an Animatable or a class directly derived from it via an Animatable pointer, should call this method instead of calling directly operator delete. Following these rules will ensure that the same memory manager is used to allocate and deallocate the object. The default implementation of this method deletes the object. Plugin instances that never need to be deleted from the heap can overwrite this method to do nothing.

Note
See the method ClassDesc::Create() for details on how Max allocates plugin objects.
See ReferenceMaker::DeleteMe() and ReferenceTarget::MaybeAutoDelete() for information on how plugin instances are deleted by the system.
Remarks
See Memory Management.

See also
Required DLL Functions, Class ClassDesc.

Reimplemented in MCDeviceBinding, IStdDualVS, GizmoClass, ICustAttribContainer, UnifiedRenderer, MSPluginSimpleSpline, TriObject, SplineShape, SingleWeakRefMaker, SimpleSpline, SimpleShape, SimpleOSMToWSMMod2, SimpleOSMToWSMMod, RefMgr< T >, SingleRefMaker, PolyObject, PatchObject, PFSimpleAction, DefNoteTrack, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MAXWrapper, MtlBaseLib, MtlLib, DADBitmapCarrier, Manipulator, LinearShape, RefTargMonitorRefMaker, CollisionMesh, CollisionSphere, CollisionPlane, BoxGizmoObject, CylGizmoObject, SphereGizmoObject, DummyObject, MultCurveList, and EaseCurveList.

◆ GetClassName() [1/2]

virtual void GetClassName ( MSTR s)
inlinevirtual
Note
This method has been deprecated in terms of implementation as of 3ds Max 2022. Plugin developers should implement GetClassName(MSTR& s, bool localized) const instead. This method can no longer be overriden and calls to it are now forwarded to the function that replaced it with a "bool localized" value of true. This is done so that plugin developers who do not localize their plugins don't have to update all the places where they call this method. Plugin developers who do localize their plugins should analyze the places where they call this method to decide what value to pass it for the "bool localized" parameter.
See also
Animatable::GetClassName(MSTR& s, bool localized) const
209  {
210  GetClassName(s, true);
211  }
virtual void GetClassName(MSTR &s) MAX_SEALED
Definition: Animatable.h:208

◆ GetClassName() [2/2]

virtual void GetClassName ( MSTR s,
bool  localized 
) const
inlinevirtual

Retrieves the name of the plugin class.

This name is used in 3ds Max's UI and in MAXScript. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.

Parameters
sReference to a string filled in with the name of the plugin class.
localizedIf true, then the class name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the class name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the class name in English.

Reimplemented in UnifiedRenderer, TriObject, SingleRefMakerSplineMtl, SingleRefMakerSplineNode, SplineShape, SingleWeakRefMaker, SimpleSpline, SimpleShape, SimpleParticle, SimpleWSMObject, SimpleObjectBase, SimpleOSMToWSMMod2, SimpleOSMToWSMMod, SimplePolyObject, RefMgrAddDeleteRestore< T >, SingleRefMaker, ReferenceTarget, ReferenceMaker, PolyObject, SingleRefMakerPatchMtl, SingleRefMakerPatchNode, PatchObject, PFSimpleAction, DefNoteTrack, MCDeviceBinding, AnimatableRolloutControl::ControllerHolder, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSPluginSimpleSpline, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MAXWrapper, Texmap, MtlBaseLib, MtlLib, Mtl, DADBitmapCarrier, SimpleManipulator, LinearShape, RefTargMonitorRefMaker, INodeTransformed, CollisionMesh, CollisionSphere, CollisionPlane, BoxGizmoObject, CylGizmoObject, SphereGizmoObject, DummyObject, MultCurveList, and EaseCurveList.

222  {
223  UNUSED_PARAM(localized);
224  s = _M("Animatable");
225  }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67

◆ ClassName()

MSTR ClassName ( bool  localized = true) const
inline

Returns the name of the plugin class.

See also
void GetClassName(MSTR& s, bool localized)
Parameters
localizedIf true, then the class name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the class name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the class name in English.
231 { MSTR s; GetClassName(s, localized); return s;}
Definition: strclass.h:738

◆ SuperClassID()

◆ ClassID()

virtual CoreExport Class_ID ClassID ( )
virtual

Retrieves a constant that uniquely identifies the plugin class.

This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.

Returns
A class id that uniquely identifies a plugin class
See also
Class ClassID, class ID definitions in plugapi.h.

Reimplemented in SimpleSpline, SimpleShape, UnifiedRenderer, AnimatableRolloutControl::ControllerHolder, MSPluginSimpleSpline, IKDrivenControl, IKDriverControl, IXRefObject, IXRefAtmospheric, TriObject, SplineShape, SimpleOSMToWSMMod2, SimpleOSMToWSMMod, RefMgr< T >, RefMgrAddDeleteRestore< T >, PolyObject, PatchObject, PFSimpleAction, DefNoteTrack, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MAXWrapper, MtlBaseLib, MtlLib, MtlBase, DADBitmapCarrier, LinearShape, IStdDualVS, RefTargMonitorRefMaker, IIndirectRefTargContainer, CollisionMesh, CollisionSphere, CollisionPlane, BoxGizmoObject, CylGizmoObject, SphereGizmoObject, DummyObject, MultCurveList, and EaseCurveList.

◆ IsDeleted()

static CoreExport BOOL IsDeleted ( Animatable anim)
static

Debug method to determine whether an object has been deleted.

This method checks whether an object is alive in memory, or is deleted and is a dangling pointer. The check is not perfectly accurate. A result of TRUE is guaranteed to be accurate - the object is deleted - however a result of FALSE may be inaccurate. This method should be used together with other tools to aid in debugging and bulletproofing.

Parameters
animThe Animatable object
Returns
Returns TRUE if the object is invalid, FALSE if state is uncertain

◆ GetHandleByAnim()

static CoreExport AnimHandle GetHandleByAnim ( Animatable anim)
static

Get the unique handle for an Animatable object.

Every Animatable is given a handle value when allocated. The values are unique within a scene, but are not saved with the scene, and no guarantees are provided about handle values from one load to another. Handles are intended for use as sort/hash keys, when load and save are not required. They are safer than pointers, since the Animatable may be deleted, in which case the handle value is never reused for another Animatable within the current session, and searching for the Animatable via GetAnimByHandle() simply yields NULL.

Parameters
animThe Animatable object
Returns
The unique handle value for the Animatable

◆ GetAnimByHandle()

static CoreExport Animatable* GetAnimByHandle ( AnimHandle  handle)
static

Get an Animatable object from its unique handle.

Every Animatable is given a handle value when allocated. The values are unique within a scene, but are not saved with the scene, and no guarantees are provided about handle values from one load to another. Handles are intended for use as sort/hash keys, when load and save are not required. They are safer than pointers, since the Animatable may be deleted, in which case the handle value is never reused for another Animatable within the current session, and searching for the Animatable via GetAnimByHandle() simply yields NULL.

Parameters
handleThe unique handle value for the Animatable
Returns
The Animatable object, or NULL if the Animatable has been deleted, or if the handle is invalid

◆ GetNextHandle()

static CoreExport AnimHandle GetNextHandle ( )
static

Get the unique handle for the next Animatable object to be created.

Every Animatable is given a handle value when allocated. This method returns the handle value that will be used for the next animatable created. This method is primarily intended for testing purposes, in particular for detecting if calling ClassDesc::Create() is creating an Animatable-derived object.

Returns
The unique handle value for the next Animatable created

◆ SetAFlag()

void SetAFlag ( DWORD  mask)
inline
Parameters
maskThe bits to turn on in the Animatable flags
299  {
300  aflag |= mask;
301  }
DWORD aflag
Definition: Animatable.h:161

◆ ClearAFlag()

void ClearAFlag ( DWORD  mask)
inline

Clears one or more bits in the Animatable flags.

Parameters
maskThe bits to turn off in the Animatable flags
304  {
305  aflag &= ~mask;
306  }

◆ TestAFlag()

bool TestAFlag ( DWORD  mask) const
inline

Tests one or more bits in the Animatable flags.

Parameters
maskThe bits to test in the Animatable flags
Returns
TRUE if one or more bit specified in the mask are also set in the Animatable flags, otherwise, false.
312  {
313  return (aflag & mask) != 0;
314  }

◆ SetAFlagEx()

void SetAFlagEx ( DWORD  mask)
inline

Sets one or more bits in the Animatable extended flags.

Parameters
maskThe bits to turn on in the Animatable extended flags
318  {
319  aflag_ex |= mask;
320  }

◆ ClearAFlagEx()

void ClearAFlagEx ( DWORD  mask)
inline

Clears one or more bits in the Animatable extended flags.

Parameters
maskThe bits to turn off in the Animatable extended flags
324  {
325  aflag_ex &= ~mask;
326  }

◆ TestAFlagEx()

bool TestAFlagEx ( DWORD  mask) const
inline

Tests one or more bits in the Animatable extended flags.

Parameters
maskThe bits to test in the Animatable extended flags
Returns
TRUE if one or more bit specified in the mask are also set in the Animatable extended flags
332  {
333  return (aflag_ex & mask) != 0;
334  }

◆ RequestFlagBit()

static CoreExport int RequestFlagBit ( )
static

Requests an unique flag bit index.

The flag bit index is used with the Animatable::TestFlagBit(), Animatable::SetFlagBit(), Animatable::ClearFlagBit(), and Animatable::ClearFlagBitInAllAnimatables() methods. The flag bit index must be released using the Animatable::ReleaseFlagBit() method. The intended usage of the flag bit index is in enumerations where you want to visit each Animatable only once, and the usage of the flag bit is of a temporary, short term usage. The flag bits are not saved with the Animatable, nor copied via the assign operator. The flag bits referred to for these methods are not associated with the aflag or aflag_ex data members.

Returns
The unique flag bit index

◆ ReleaseFlagBit()

static CoreExport void ReleaseFlagBit ( int  index)
static

Releases the flag bit index.

Parameters
indexThe flag bit index to release

◆ TestFlagBit()

CoreExport bool TestFlagBit ( int  index)

Tests the specified flag bit.

Parameters
indexThe flag bit index to test
Returns
TRUE if the flag bit is set

◆ SetFlagBit()

CoreExport void SetFlagBit ( int  index,
bool  newValue = true 
)

Sets the specified flag bit.

Parameters
indexThe flag bit index to set
newValueThe value to set the flag bit index to

◆ ClearFlagBit()

CoreExport void ClearFlagBit ( int  index)

Clears the specified flag bit.

Parameters
indexThe flag bit index to clear

◆ ClearFlagBitInAllAnimatables()

static CoreExport void ClearFlagBitInAllAnimatables ( int  index)
static

Clears the specified flag bit in all Animatables.

Parameters
indexThe flag bit index to clear

◆ EnumerateAllAnimatables()

static CoreExport void EnumerateAllAnimatables ( EnumAnimList enumProcObject)
static

Enumerator to enumerate across all animatables.

Implemented by the System. The Animatables are enumerated in order of creation. Use Animatable::EnumAnimTree when the enumerating the Animatables based on their hierarchy is required. EnumerateAllAnimatables is designed to be safe with recursive calls to EnumerateAllAnimatables, and is designed to be safe when Animatables are added/deleted during an enumeration.

Parameters
enumProcObject- The callback object called for each animatable.

◆ FreeCaches()

virtual void FreeCaches ( )
inlinevirtual
Remarks
This is called to delete any item that can be rebuilt. For example, the procedural sphere object has a mesh that it caches. It could call Mesh::FreeAll() on the mesh from this method. This will free the vertex/face/uv arrays. If the sphere is ever evaluated again it can just rebuild the mesh. If an object (like a sphere) has modifiers applied to it, and those modifiers are not animated, then the result of the pipeline is cached in the node. So there is no reason for the sphere to also have a cache of its representation. Therefore when this method is called, the sphere can free the data of the mesh.
Default Implementation:
{}

Reimplemented in SimplePolyObject, TriObject, SplineShape, SimpleSpline, SimpleShape, SimpleWSMObject, SimpleObjectBase, PolyObject, PatchObject, PFSimpleAction, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSSimpleObjectXtnd, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, and LinearShape.

393 {}

◆ BeginEditParams()

virtual void BeginEditParams ( IObjParam ip,
ULONG  flags,
Animatable prev = NULL 
)
inlinevirtual
Remarks
This method is called by the system when the user may edit the item's (object, modifier, controller, etc.) parameters.
Parameters
ipInterface pointer. The developer can use it to call methods such as AddRollupPage(). Note that this pointer is only valid between BeginEditParams() and EndEditParams(). It should not be used outside this interval.
flagsDescribe which branch of the command panel or dialog the item is being edited in. The following are possible values:

BEGIN_EDIT_CREATE
Indicates an item is being edited in the create branch.

BEGIN_EDIT_MOTION
Indicates a controller is being edited in the motion branch.

BEGIN_EDIT_HIERARCHY
Indicates a controller is being edited in the Pivot subtask of the hierarchy branch.

BEGIN_EDIT_IK
Indicates a controller is being edited in the IK subtask of the hierarchy branch.

BEGIN_EDIT_LINKINFO
Indicates a controller is being edited in the Link Info subtask of the hierarchy branch.

prevPointer to an Animatable object. This parameter may be used in the motion and hierarchy branches of the command panel. This pointer allows a plug-in to look at the ClassID of the previous item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel, but simply update the values displayed in the UI fields. This prevents the UI from 'flickering' when the current item begins its edit. For example, if you are in the motion branch and are looking at an item's PRS controller values, and then select another item that is displayed with a PRS controller, the UI will not change - only the values displayed in the fields will change. If however you selected a target camera that has a lookat controller (not a PRS controller) the UI will change because a different set of parameters need to be displayed. Note that for items that are edited in the modifier branch this field can be ignored.

Reimplemented in MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, SimpleModBase, SimpleParticle, SimpleWSMMod, PatchObject, ShapeObject, IMultiPassCameraEffect, PFSimpleAction, IDataChannelEngine, SimplePolyObject, MSPluginSimpleSpline, SplineShape, SimpleSpline, SimpleShape, SimpleOSMToWSMObject, SimpleWSMObject, SimpleObjectBase, MSCustAttrib, SimpleManipulator, GizmoClass, IProjectionModType, BoxGizmoObject, CylGizmoObject, SphereGizmoObject, and GizmoObject.

435 {}

◆ EndEditParams()

virtual void EndEditParams ( IObjParam ip,
ULONG  flags,
Animatable next = NULL 
)
inlinevirtual
Remarks
This method is called when the user is finished editing an objects parameters. The system passes a flag into the EndEditParams() method to indicate if the rollup page should be removed. If this flag is TRUE, the plug-in must un-register the rollup page, and delete it from the panel.
Parameters
ipAn interface pointer. The developer may use the interface pointer to call methods such as DeleteRollupPage().

flagsThe following flag may be set:

END_EDIT_REMOVEUI
If TRUE, the item's user interface should be removed.

nextAnimatable pointer. Can be used in the motion and hierarchy branches of the command panel. It allows a plug-in to look at the ClassID of the next item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel. Note that for items that are edited in the modifier branch this field can be ignored.

Reimplemented in MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, SimpleModBase, SimpleParticle, SimpleWSMMod, PatchObject, ShapeObject, IMultiPassCameraEffect, PFSimpleAction, IDataChannelEngine, SimplePolyObject, MSPluginSimpleSpline, SplineShape, SimpleSpline, SimpleShape, SimpleOSMToWSMObject, SimpleWSMObject, SimpleObjectBase, MSCustAttrib, SimpleManipulator, GizmoClass, IProjectionModType, BoxGizmoObject, CylGizmoObject, SphereGizmoObject, and GizmoObject.

454 {}

◆ GetInterface() [1/2]

virtual CoreExport void* GetInterface ( ULONG  id)
virtual
Remarks
This method provides a mechanism for extending the class in the future. In 3ds Max 4.0 there are new interfaces that are accessed by passing an id to this method and it will respond by returning the corresponding interface pointer.

This method has been used however for a different purpose. It currently is used to determine if an object is of a particular class. With controllers for example, there is one base class Control, however there are many super classes (CTRL_FLOAT_CLASS_ID, CTRL_SCALE_CLASS_ID, etc.). If you wanted to find out if a given Animatable was a controller you would need to compare its SuperClassID to all the known types and only if it wasn't one of the known types could you be sure it wasn't a controller. Having to do this is inconvenient for a developer.

Instead the Control class implements this method. It looks at the id, and if it matches a predefined constant I_CONTROL, it returns its this pointer. In this way, given any Animatable, it is easy to find out if it is a controller by simply asking for the control interface. There is a macro that does this:

#define GetControlInterface(anim)
((Control*)anim-\>GetInterface(I_CONTROL))
A plug-in developer may use this macro as follows:

Control *c = GetControlInterface(anim);

This will either be NULL or a pointer to a valid controller.

Note: Plug-in defined interfaces should be greater than the following value:

#define I_USERINTERFACE 0x0000ffff

If a plug-in implements this method for its own purposes, it would, in general, switch on the id and if it is not aware of the id it would call this method on the base class. Otherwise it could respond to the id as it needed. See the sample code below for the how the Control class implements this method.
Parameters
idThe id of the interface.
Default Implementation:
{ return NULL; }
Sample Code:
The following is the Control class implementation of this method. It looks at the id passed, and if it matches I_CONTROL it returns its this pointer. Otherwise it calls the base class method.

void* Control::GetInterface(ULONG id)
{
if (id==I_CONTROL) {
return this;
}
else {
}
}
virtual CoreExport void * GetInterface(ULONG id)
virtual CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.
#define I_CONTROL
An Animatable supporting this interface is a Control.
Definition: AnimatableInterfaceIDs.h:33

Reimplemented in IRenderElement, UnifiedRenderer, SimplePolyObject, MSPluginSimpleSpline, TriObject, SplineShape, SimpleParticle, SimpleObjectBase, Shader, Effect8, MaxBakeElement10, MaxBakeElement8, MaxBakeElement, MaxRenderElement, ReferenceTarget, ReferenceMaker, PatchObject, WSMObject, ShapeObject, LightObject, Object, BaseObject, IDerivedObject, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MtlBase, LockableControl, LockableStdControl, Control, MultCurveList, and EaseCurveList.

◆ ReleaseInterface()

virtual CoreExport void ReleaseInterface ( ULONG  id,
void i 
)
virtual
Remarks
This method is not currently used. It is reserved for future use. Its purpose is for releasing an interface created with GetInterface().

Reimplemented in IRenderElement, TriObject, MaxBakeElement, and MaxRenderElement.

◆ GetInterface() [2/2]

virtual CoreExport BaseInterface* GetInterface ( Interface_ID  id)
virtual
Remarks
Returns a pointer to the Base Interface for the interface ID passed. The default implementation of this method retrieves this information from the ClassDesc for the plug-in.

Any future object-based interfaces should be allocated unique Interface_IDs (you can use Gencid.exe for this) and made available through this call.

The default implementation of GetInterface(Interface_ID) looks up a standalone interface of the given ID on the object's ClassDesc. This gives access to standalone interfaces via any of a plug-in's objects, without having to dig around for the ClassDesc, so you should fall back to calling the default implementation if you don't recognize an ID in your implementation of GetInterface(Interface_ID).
Parameters
idThe unique ID of the interface to get. See Class Interface_ID.

Reimplemented from InterfaceServer.

Reimplemented in SimplePolyObject, TriObject, SimpleObjectBase, ShapeObject, UnifiedRenderer, Shader, Effect8, ReferenceTarget, ReferenceMaker, PFSimpleTest, PFSimpleOperator, PFSimpleAction, LightObject, Object, BaseObject, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MAXWrapper, MtlBase, SimpleManipulator, IRefTargContainer, INode, and IIndirectRefTargContainer.

◆ SetProperty()

virtual CoreExport int SetProperty ( ULONG  id,
void data 
)
virtual
Remarks
This is a general method for adding properties, when defining a new Interface would be too cumbersome. This method provides another way to extend the class without actually adding any methods. Sample code that implements this method to add properties to the property list is in /MAXSDK/SAMPLES/CONTROLLERS/PATHCTRL.CPP. See below.
Parameters
idThe id for the property.
dataA pointer to the data to store.
Returns
Nonzero if the property was set; otherwise zero.
Default Implementation:
{ return 0; }
Sample Code:
This code is from /MAXSDK/SAMPLES/CONTROLLERS/path_cnstrnt.cpp. It is used to save the inverse kinematics user interface parameters of the path controller. It saves the property data on the aprops property list. See the Data Members at the beginning of Animatable for details on aprops.

int PathPosition::SetProperty(ULONG id, void *data)
{
if (id==PROPID_JOINTPARAMS) {
if (!data) {
int index = aprops.FindProperty(id);
if (index>=0) {
aprops.Delete(index,1);
}
} else {
JointParamsPath *jp = (JointParamsPath*)GetProperty(id);
if (jp) {
*jp = *((JointParamsPath*)data);
delete (JointParamsPath*)data;
} else {
aprops.Append(1,(AnimProperty**)&data);
}
}
return 1;
} else
if (id==PROPID_INTERPUI) {
if (!data) {
int index = aprops.FindProperty(id);
if (index>=0) {
aprops.Delete(index,1);
}
} else {
if (ui) {
*ui = *((InterpCtrlUI*)data);
} else {
aprops.Append(1,(AnimProperty**)&data);
}
}
return 1;
} else {
return Animatable::SetProperty(id,data);
}
}
Definition: AnimProperty.h:19
CoreExport int FindProperty(DWORD id, int start=0)
virtual CoreExport int SetProperty(ULONG id, void *data)
virtual CoreExport void * GetProperty(ULONG id)
AnimPropertyList aprops
Definition: Animatable.h:162
Definition: interpik.h:71
int Delete(int start, int num)
Deletes items from the Tab.
Definition: tab.h:290
int Append(int num, T *el, int allocExtra=0)
Appends items at the end of the Tab.
Definition: tab.h:281
#define PROPID_INTERPUI
Definition: interpik.h:29
#define PROPID_JOINTPARAMS
Definition: interpik.h:30

Reimplemented in ShapeObject, MSMtlXtnd, and MtlBase.

◆ GetProperty()

virtual CoreExport void* GetProperty ( ULONG  id)
virtual
Remarks
This method is used to retrieve a property specified by the id passed (as stored by SetProperty()).

Note for 3ds Max version 1.1:

Two new property IDs have been added:

PROPID_CLEARCACHES: When passed to a texture map or material, the material should dump any of its caches. For example, the bitmap texture responds to this by freeing the bitmap from memory. For sample code see /MAXSDK/SAMPLES/MATERIALS/BMTEX.CPP.

PROPID_HAS_WSM: When passed to an INode, will return TRUE if the node has World Space Modifiers applied to it or FALSE if it does not. For sample code see /MAXSDK/SAMPLES/IMPEXP/3DSEXP.CPP.

Note for 3ds Max version 1.2:

A new id has been created and assigned the constant:

#define PROPID_EVAL_STEPSIZE_BUG_FIXED 0x1000.

This only effects the evaluation of objects when rendering them using motion blur. Motion blur works by evaluating the object numerous times (at fractions of a frame apart) and combining these images by blending them together.

Originally, 3ds Max would make these evaluations in reverse order within a sub-frame – from the last one, to the second to the last one, back to the first one. There is a problem with this for certain plug-ins that need to compute their state from time 0 forward. For these objects, the backwards approach may be too computationally intensive.

Both the forward and backward approaches exist in 3ds Max and the developer may choose which method to use. 3ds Max interrogates the object to see how it should handle the evaluation process – either going backwards or forwards. It calls this method with id set to the constant PROPID_EVAL_STEPSIZE_BUG_FIXED. If a plug-in implements this method to return nonzero, it means the plug-in works correctly using forward stepping, and 3ds Max will use that approach. If a plug-in does not implement this method and handle the id of PROPID_EVAL_STEPSIZE_BUG_FIXED it will return the default value of zero. This means the older method of backwards evaluation will be used.

Therefore, a plug-in object that wants to handle motion blur using forward stepping should implement this method, and if passed an id of PROPID_EVAL_STEPSIZE_BUG_FIXED, should return nonzero.
Parameters
idThe id of the property to retrieve.
Default Implementation:
{ return NULL; }
Sample Code:
This code is from /MAXSDK/SAMPLES/CONTROLLERS/PATHCTRL.CPP. It is used to restore the inverse kinematics user interface parameters of the path controller. It retrieves the property data on the aprops property list. See the Data Members at the beginning of Animatable for details on aprops.

void* PathPosition::GetProperty(ULONG id)
{
int index = aprops.FindProperty(id);
if (index>=0) {
return aprops[index];
} else {
return NULL;
}
} else {
}
}
#define NULL
Definition: autoptr.h:18

Reimplemented in ShapeObject, MSMtlXtnd, and MtlBase.

◆ AppendProperty()

CoreExport void AppendProperty ( AnimProperty prop)

A function to directly add arbitrary properties to this object developers should ensure that the properties ID does not conflict with any Max-specific IDs.

Parameters
propThe new property to add

◆ FindProperty()

CoreExport AnimProperty* FindProperty ( DWORD  id)

Find any property.

This allows developers to add arbitrary properties to Animatables.

Parameters
idthe id of the property to find
Returns
the property if found, else null.

◆ NumSubs()

virtual int NumSubs ( )
inlinevirtual
Remarks
The system uses a virtual array mechanism to access the sub-anims of a plug-in. This method returns the total number of sub-anims maintained by the plug-in. If a plug-in is using a parameter block to manage its parameters it should just return 1 for all the parameters directed by the parameter block.
Returns
The number of sub-anims used by the plug-in.
Default Implementation:
{ return 0; }

Reimplemented in SimpleObject2, SimpleObject, SimpleMod2, SimpleMod, SimpleModBase, SimplePolyObject, UnifiedRenderer, MSPluginSimpleSpline, SplineShape, SimpleSpline, SimpleShape, SimpleParticle, SimpleOSMToWSMObject, SimpleWSMObject, SimpleWSMMod, PatchObject, PFSimpleAction, ShapeObject, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MtlBaseLib, MtlLib, SimpleManipulator, GizmoClass, GizmoObject, Control, MultCurveList, and EaseCurveList.

631 { return 0; }

◆ SubAnim()

virtual Animatable* SubAnim ( int  i)
inlinevirtual
Remarks
This method returns a pointer to the 'i-th' sub-anim. If a plug-in is using a parameter block to manage all its parameters it should just return a pointer to the parameter block itself from this method. This method may return NULL so developers need to check the return value before calling other sub anim methods (such as SubAnimName()).
Parameters
iThis is the index of the sub-anim to return.
Default Implementation:
{ return NULL };

Reimplemented in SimpleMod2, SimpleMod, SimpleObject2, SimpleObject, SimpleModBase, SimplePolyObject, UnifiedRenderer, MSPluginSimpleSpline, SplineShape, SimpleSpline, SimpleShape, SimpleParticle, SimpleOSMToWSMObject, SimpleWSMObject, SimpleWSMMod2, SimpleWSMMod, PatchObject, PFSimpleAction, ShapeObject, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MtlBaseLib, MtlLib, SimpleManipulator, GizmoClass, GizmoObject, Control, MultCurveList, and EaseCurveList.

642 { return NULL; }

◆ SubAnimName() [1/2]

virtual MSTR SubAnimName ( int  i)
inlinevirtual
Note
This method has been deprecated in terms of implementation as of 3ds Max 2022. Plugin developers should implement SubAnimName(int i, bool localized) instead. This method can no longer be overriden and calls to it are now forwarded to the function that replaced it with a "bool localized" value of true. This is done so that plugin developers who do not localize their plugins don't have to update all the places where they call this method. Plugin developers who do localize their plugins should analyze the places where they call this method to decide what value to pass it for the "bool localized" parameter.
See also
Animatable::SubAnimName(int i, bool localized)
651  {
652  return SubAnimName(i, true);
653  };
virtual MSTR SubAnimName(int i) MAX_SEALED
Definition: Animatable.h:650

◆ SubAnimName() [2/2]

virtual CoreExport MSTR SubAnimName ( int  i,
bool  localized 
)
inlinevirtual
Remarks
This method returns the name of the 'i-th' sub-anim to appear in track view. The system has no idea what name to assign to the sub-anim (it only knows it by the virtual array index), so this method is called to retrieve the name to display. Developer need to make sure the 'i-th' SubAnim() is non-NULL or this method will fail.
Parameters
iThe index of the parameter name to return
localizedIf true, then the sub-anim name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the sub-anim name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the sub-anim name in English.
Returns
The name of the 'i-th' parameter.

Reimplemented in SplineShape, SimpleSpline, SimpleShape, SimpleParticle, SimpleOSMToWSMObject, SimpleWSMObject, SimpleObject2, SimpleObject, SimpleWSMMod, SimpleMod2, SimpleMod, SimpleModBase, SimplePolyObject, UnifiedRenderer, PatchObject, PFSimpleAction, ShapeObject, MSPluginTrackViewUtility, MSSpecialFXXtnd< Effect, MSPluginEffect >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSPluginSpecialFX< Effect8 >, MSPluginSpecialFX< Atmospheric >, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, MSSimpleModXtnd, MSPluginSimpleMod, MSModifierXtnd, MSPluginModifier, MSSimpleManipulatorXtnd, MSPluginSimpleManipulator, MSPluginSimpleSpline, MSSimpleObjectXtnd, MSPluginSimpleObject, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< GenLight, MSPluginLight >, MSPluginObject< ShapeObject >, MSPluginObject< HelperObject >, MSPluginObject< GeomObject >, MSPluginObject< GenCamera >, MSPluginObject< GenLight >, MSCustAttrib, MtlBaseLib, MtlLib, SimpleManipulator, GizmoClass, GizmoObject, Control, MultCurveList, and EaseCurveList.

666 { return _T("no name"); };

◆ BypassTreeView()

virtual BOOL BypassTreeView ( )
inlinevirtual
Remarks
This method indicates to the system that this anim should not appear in the Track View. Note: Track View was formally referred to as Tree View. This is what parameter blocks do for example. They don't show up in track view, just their sub-anims do. This prevents the extra level of the parameter block from appearing.
Returns
Return TRUE to not appear in the Track View. Note that if you return TRUE your children will appear in the track view regardless.
Default Implementation:
{ return FALSE; }

Reimplemented in LinearShape, MultCurveList, and EaseCurveList.

681 { return FALSE; }

◆ BypassTrackBar()

virtual BOOL BypassTrackBar ( )
inlinevirtual
Remarks
This method indicates to the system that this anim should not appear in the Track Bar. The anim won't show up in the Track Bar, just its sub-anims will. This function is similar to BypassTreeView(), but refers to the Track Bar instead of the Track View.
Returns
Return TRUE to not appear in the Track Bar. Note that if you return TRUE your children will appear in the Track Bar regardless.
Default Implementation:
{ return BypassTreeView(); }
691 { return BypassTreeView(); }
virtual BOOL BypassTreeView()
Definition: Animatable.h:681

◆ BypassPropertyLevel()

virtual BOOL BypassPropertyLevel ( )
inlinevirtual
Remarks
Use this method in order to cause parameters in this Animatable (as a sub-anim) to appear to reside at the level of the parent Animatable in the scripter. Return TRUE and this Animatable won't appear as a property in the scripter however it's sub-anims children will. The default implementation returns FALSE indicating it will appear normally.
Default Implementation:
{ return FALSE; }

Reimplemented in ShadowType, and BaseShader.

700 { return FALSE; }

◆ InvisibleProperty()

virtual BOOL InvisibleProperty ( )
inlinevirtual
Remarks
This method controls the visibility of this Animatable and all of it sub-anims to appear as properties in the scripter. Return TRUE and it won't nor will it's sub-anims. Returning FALSE (the default implementation) causes this Animatable and it's sub-anims to appear as normal.
Default Implementation:
{ return FALSE; }
708 { return FALSE; }

◆ AssignController()

virtual BOOL AssignController ( Animatable control,
int  subAnim 
)
inlinevirtual
Remarks
This method is called to assign the controller to the sub-anim whose index is passed.
Parameters
controlThe controller to assign.
subAnimThe index of the sub-anim to assign the controller to.
Default Implementation:
{ return FALSE; }
Returns
Returns TRUE if the controller was assigned; otherwise FALSE.

Reimplemented in SimpleModBase, SplineShape, PatchObject, MultCurveList, and EaseCurveList.

719 { return FALSE; }

◆ CanAssignController()

virtual BOOL CanAssignController ( int  subAnim)
inlinevirtual

Return true if we can reassign the subanim specified.

Implement this function to return false if we wish to prevent any subanim from being replaced. If this method returns false for any id, that subanim will not be able to be re-assigned via the UI or MaxScript controls. Note that this will not prevent re-assigning in C++ in any way (via the ReplaceReference or AssignController functions).

Parameters
subAnim- The ID of the SubAnim to check.
Returns
TRUE if it is legal to assign a new Animatable to the specified SubAnim
729 { return TRUE; }

◆ CanDeleteSubAnim()

virtual BOOL CanDeleteSubAnim ( int  i)
inlinevirtual
Remarks
Returns TRUE if the specified sub-anim controller can be deleted; otherwise FALSE.

A new "Delete Controller" button has been added to the Track View toolbar that is enabled when one or more delete-able tracks are selected. This method allows a plug-in to indicate to the Track View that one or more of its sub-controllers are delete-able. This provides a way to allow the user to delete node sub-controllers such as the visibility track, "Image Motion Blur Multiplier", "Object Motion Blur On/Off", etc. If the user selects one of the above-mentioned tracks in the Track View the "Delete Controller" button will become available.
Parameters
iThe zero based index of the sub-anim.
Default Implementation:
{return FALSE;}

Reimplemented in PFSimpleAction.

747 { return FALSE; }

◆ DeleteSubAnim()

virtual void DeleteSubAnim ( int  i)
inlinevirtual
Remarks
This method is called to delete the specified sub-anim controller. See the remarks in CanDeleteSubAnim() above.
Parameters
iThe zero based index of the sub-anim.
Default Implementation:
{}
753 {}

◆ GetSubAnimCurveColor()

virtual DWORD GetSubAnimCurveColor ( int  subNum)
inlinevirtual
Remarks
Return the suggested color to draw a sub-anim's function curve. For example, the independent X, Y, Z position controller implements this method to return the suggested color for each of it's sub-controllers. The Euler Angle Controller uses these so its 3 sub-controllers are drawn in different colors.
Parameters
subNumThe index of the sub-anim.
Returns
One of the following values:

PAINTCURVE_GENCOLOR

PAINTCURVE_XCOLOR

PAINTCURVE_YCOLOR

PAINTCURVE_ZCOLOR
Default Implementation:
{return PAINTCURVE_GENCOLOR;}
768 { return PAINTCURVE_GENCOLOR; }
#define PAINTCURVE_GENCOLOR
Definition: TrackFlags.h:87

◆ SubNumToRefNum()

virtual int SubNumToRefNum ( int  subNum)
inlinevirtual
Remarks
This method is used for copying and pasting in the track view. It converts an anim index to a reference index or returns -1 if there is no correspondence. If a client does not wish an anim to be copied or pasted then it can return -1 even if there is a corresponding reference num.
Parameters
subNumThe anim index to return the corresponding reference index of.
Default Implementation:
{ return -1}
Returns
The reference index corresponding to the anim index passed. Return -1 if there is no correspondence.

Reimplemented in SimpleMod2, SimpleMod, SimpleModBase, SplineShape, PatchObject, PFSimpleAction, GizmoClass, MultCurveList, and EaseCurveList.

784 { return -1; }

◆ CanCopyAnim()

virtual BOOL CanCopyAnim ( )
inlinevirtual
Remarks
In addition to SubNumToRefNum(), if an anim doesn't want to be copied (via Track View or the Edit Modifier Stack 'Copy' button) it can return FALSE from this method, otherwise it can use the default implementation to return TRUE.
Default Implementation:
{return TRUE;}

Reimplemented in PFSimpleAction, and MSCustAttrib.

794 { return TRUE; }

◆ CanMakeUnique()

virtual BOOL CanMakeUnique ( )
inlinevirtual
Remarks
An anim can implement this method to return FALSE to prohibit make unique from being applied to it.
Default Implementation:
{return TRUE;}
804 { return TRUE; }

◆ NumChildren()

virtual int NumChildren ( )
inlinevirtual
Remarks
This method is used internally.
809 { return 0; }

◆ ChildAnim()

virtual Animatable* ChildAnim ( int  i)
inlinevirtual
Remarks
This method is used internally.
812 { return NULL; }

◆ NodeName()

virtual CoreExport MSTR NodeName ( )
virtual
Remarks
This method is used internally.

◆ EnumAnimTree()

CoreExport int EnumAnimTree ( AnimEnum animEnum,
Animatable client,
int  subNum 
)
Remarks
Implemented by the System.

This method recursively enumerates the Animatable hierarchy. It will call the AnimEnum::proc() method passing it the anim, that anim's parent (the client), and the sub-anim index of that anim to the client, for every anim and sub-anim in the hierarchy.
Parameters
animEnumThe callback object, called once for each sub anim from 0 to subNum-1. See Class AnimEnum.

clientThe client anim. This is the Animatalbe whose sub-anims are enumerated.

subNumThe sub-anim index of the client at which to begin the enumeration. Pass 0 to do them all.
Returns
One of the following values:

ANIM_ENUM_PROCEED

ANIM_ENUM_STOP

ANIM_ENUM_ABORT

◆ HasSubElements()

CoreExport int HasSubElements ( int  type = 0)
Remarks
Implemented by the System.

This method is used to determine if this Animatable has children or sub-anims. The type passed indicates what is tested.
Parameters
typeOne of the following values:

0: Test for node children.

1: Test for sub-anims.
Returns
Nonzero if the item has children or sub-anims; otherwise zero.

◆ RenderBegin()

virtual int RenderBegin ( TimeValue  t,
ULONG  flags = 0 
)
inlinevirtual
Remarks
This method is called once at the beginning of each render. A plug-in can use this method to do any work required before a rendering actually begins. For example, some of the standard 3ds Max plug-ins use this method to toggle between their 'viewport' state and the 'rendering' state. The Optimize modifier has two settings, one for the viewports and one for the rendering. When this method is called it then performs the switch from viewport to renderer.
Parameters
tThe time that the render is beginning.
flagsThe following flag value can be checked:

RENDERBEGIN_IN_MEDIT
Indicates that the render is occurring in the Material Editor.
Returns
Nonzero if the method is implemented; otherwise 0.
Default Implementation:
{ return 0; }
865 { return 0; }

◆ RenderEnd()

virtual int RenderEnd ( TimeValue  t)
inlinevirtual
Remarks
This method is called once at the end of each render.
Parameters
tThe time of the last rendered frame.
Returns
Nonzero if the method is implemented; otherwise 0.
Default Implementation:
{ return 0; }
872 { return 0; }

◆ EditTrack()

virtual void EditTrack ( )
inlinevirtual
876 { assert(0); }
#define assert(expr)
Definition: assert1.h:81

◆ NumKeys()

virtual int NumKeys ( )
inlinevirtual
Remarks
This method returns the number of keys managed by the plug-in, or NOT_KEYFRAMEABLE if it does not work with keys.
Default Implementation:
{return NOT_KEYFRAMEABLE;}

Reimplemented in DefNoteTrack.

885 { return NOT_KEYFRAMEABLE; }
#define NOT_KEYFRAMEABLE
Definition: TrackFlags.h:146

◆ GetKeyTime()

virtual TimeValue GetKeyTime ( int  index)
inlinevirtual
Remarks
This method returns the time of the key specified by index.
Parameters
indexSpecifies the key whose time should be returned.
Default Implementation:
{return 0;}

Reimplemented in DefNoteTrack.

890 { return 0; }

◆ GetKeyIndex()

virtual int GetKeyIndex ( TimeValue  t)
inlinevirtual
Remarks
Returns the index of the key at time t or -1 if no key is found at the specified time.
Parameters
tSpecifies the time at which to retrieve the key index.
Default Implementation:
{return -1;}
896 { return -1; }

◆ GetNextKeyTime()

virtual BOOL GetNextKeyTime ( TimeValue  t,
DWORD  flags,
TimeValue nt 
)
inlinevirtual
Remarks
An item should implement this method to allow the Key Mode button in 3ds Max's UI to function properly. If Key Mode is set, and the user clicks the Previous Key or Next Key button, this method will be called to retrieve the next or previous key.
Parameters
tThe current time (frame slider position).
flagsOne or more of the following values:

NEXTKEY_LEFT
Search to the left.

NEXTKEY_RIGHT
Search to the right.

NEXTKEY_POS
Next position key.

NEXTKEY_ROT
Next rotation key.

NEXTKEY_SCALE
Next scale key.
ntThe time of the previous or next key is returned here.
Returns
TRUE if the key time was retrieved; otherwise FALSE.
Default Implementation:
{ return FALSE;}
917 { return FALSE; }

◆ CopyKeysFromTime()

virtual void CopyKeysFromTime ( TimeValue  src,
TimeValue  dst,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to copy or interpolate a new key from a source time to a destination time.
Parameters
srcThe source time.
dstThe destination time.
flagsThese filter flags are passed to a transform (Matrix3) controller. The TM can decide what to do with them. They have obvious meaning for the PRS controller. One or more of the following values:

COPYKEY_POS
Copy the position key.

COPYKEY_ROT
Copy the rotation key.

COPYKEY_SCALE Copy the scale key.
928 {}

◆ DeleteKeyAtTime()

virtual void DeleteKeyAtTime ( TimeValue  t)
inlinevirtual
Remarks
This method is called to delete the key at the specified time.
Parameters
tSpecifies the time to delete the key.
Default Implementation:
{}
933 {}

◆ IsKeyAtTime()

virtual BOOL IsKeyAtTime ( TimeValue  t,
DWORD  flags 
)
inlinevirtual
Remarks
Returns TRUE if there is a key of the specified type at the specified time; otherwise FALSE.
Parameters
tSpecifies the time to check for a key.
flagsOne or more of the following values:

KEYAT_POSITION
KEYAT_ROTATION
KEYAT_SCALE
Default Implementation:
{return FALSE;}
943 { return FALSE; }

◆ GetKeyTimes()

virtual int GetKeyTimes ( Tab< TimeValue > &  times,
Interval  range,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to build a table of time values, one time for each key within the interval passed. The plug-in should load up the table passed with the time of each key present over the specified time range.
Parameters
timesThe table of time values to build. See Class Tab.

rangeThe range of time over which to retrieve the key times. See Class Interval.

flagsOne of the following values:

KEYAT_POSITION
Return for Position keys only.

KEYAT_ROTATION
Return for Rotation keys only.

KEYAT_SCALE
Return for Scale keys only.
Returns
The plug-in should return an offset so the system can access the keys using an index. Thus it should return the number of keys skipped because their times were before range.Start(). For example, say the first keyframe in the interval passed was actually the third key overall. The plug-in should return 2 (two keys preceded the first one stored). In this way, the system can access the key as the i-th key in the table plus 2.
Default Implementation:
{return 0;}
968 { return 0; }

◆ GetKeySelState()

virtual int GetKeySelState ( BitArray sel,
Interval  range,
DWORD  flags 
)
inlinevirtual
Remarks
When this method is called, the plug-in should update the BitArray sel to indicate if its keys present in the interval passed are selected or deselected.
Parameters
selThe bit array to update, one bit for each key within the interval range. If the key is selected, the corresponding bit should be 1, otherwise it should be 0. See Class BitArray.
rangeThe range of time over which to retrieve the key selected state. See Class Interval.
flagsOne or more of the following values:

KEYAT_POSITION
Return for Position keys only.

KEYAT_ROTATION
Return for Rotation keys only.

KEYAT_SCALE Return for Scale keys only.
Note
If the flags are passed as 0, use ALL keys within the range.
Returns
The number of keys skipped because their times were before range.Start().
Default Implementation:
{return 0;}
986 { return 0; }

◆ OpenTreeEntry()

CoreExport void OpenTreeEntry ( int  type,
DWORD  tv 
)
Remarks
Implemented by the System.

This method may be called to open the specified Track View entry. The type parameter indicates if the child tree or the sub-anim (parameter) tree is opened.
Parameters
typeThis value may be either 0 or 1. If 0, the child tree is opened. If 1, the sub-anim tree is opened.
tvThis parameter specifies which Track View(s) are altered, one bit for each Track View. The open/closed state is independent for each Track View. The low-order 16 bits represent the 16 track views.

◆ CloseTreeEntry()

CoreExport void CloseTreeEntry ( int  type,
DWORD  tv 
)
Remarks
Implemented by the System.

This method may be called to close the specified Track View entry. The type parameter indicates if the child tree or the sub-anim tree is closed.
Parameters
typeThis value may be either 0 or 1. If 0, the child tree is closed. If 1, the sub-anim (parameter) tree is closed.
tvThis parameter specifies which Track View(s) are altered, one bit for each Track View. The low-order 16 bits represent the 16 track views.

◆ IsTreeEntryOpen()

CoreExport int IsTreeEntryOpen ( int  type,
DWORD  tv 
)
Remarks
Implemented by the System.

Returns nonzero if the specified tree is opened for this item, and zero if it is closed.
Parameters
typeThis value may be either 0 or 1. If 0, the child tree is checked. If 1, the sub-anim (parameter) tree is checked.
tvThis parameter is available in release 2.0 and later only. Specifies which Track View to check – one bit per Track View.

◆ GetSelInTrackView()

CoreExport BOOL GetSelInTrackView ( DWORD  tv)
Remarks
This method is available in release 2.0 and later only.

Implemented by the System.

Returns TRUE if this animatable is selected in the specified Track View; FALSE if not selected.
Parameters
tvSpecifies which Track View to check – one bit per Track View.

◆ SetSelInTrackView()

CoreExport void SetSelInTrackView ( DWORD  tv,
BOOL  sel 
)
Remarks
This method is available in release 2.0 and later only.

Implemented by the System.

Sets the state of this animatable to selected or deselected in the specified Track View.
Parameters
tvSpecifies which Track View to check – one bit per Track View.
selTRUE to select; FALSE to deselect.

◆ InTrackViewSelSet()

CoreExport BOOL InTrackViewSelSet ( int  which)
Remarks
This method is available in release 2.0 and later only.

Implemented by the System.

Returns TRUE if this animatable is in the specified selection set; otherwise FALSE.
Parameters
whichIndicates the Track View selection set to check – this should be >=0 and <MAX_TRACKVIEW_SELSETS

◆ SetTrackViewSelSet()

CoreExport void SetTrackViewSelSet ( int  which,
BOOL  inOut 
)
Remarks
This method is available in release 2.0 and later only.

Implemented by the System.

Sets the selected or deselected state of this animatable in the specified selection set.
Parameters
whichIndicates the Track View selection set to modify – this should be >=0 and <MAX_TRACKVIEW_SELSETS

inOutTRUE for in; FALSE for out.

◆ GetTimeRange()

virtual CoreExport Interval GetTimeRange ( DWORD  flags)
virtual
Remarks
Implemented by the System.

Returns an interval representing the tracks time range, based on the flags passed.
Parameters
flagsOne or more of the following values:

TIMERANGE_SELONLY
The bounding interval of selected keys only.

TIMERANGE_ALL
Whatever the channel's time range is - usually the bounding interval of all keys.

TIMERANGE_CHILDNODES
The node's time range should include its child nodes.

TIMERANGE_CHILDANIMS
A animatable's child anim ranges should be included.
Returns
An interval representing the tracks time range.

Reimplemented in DefNoteTrack.

◆ EditTimeRange()

virtual void EditTimeRange ( Interval  range,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to change the range of the anim (usually a controller) to the given range. This is the range that is used to compute the Out of Range Types. For example, this method may be called when the user is working in Position Range mode in the Track View.

Keyframe controllers generally support this method. Other controllers may or may not support this method. For example, a procedural controller may want to maintain a range upon which the animation is based. The user may then move the range bar around to move the procedural animation around.

The range passed is the range used to compute the Out of Range Types. This may be used for example with the Loop ORT to extend the range, either past the last key or before the first key, so there is some time to loop back to the start.

The 3ds Max keyframe controllers maintain an interval that is their range. It is normally defined to be the first key to the last key. If the user goes into Position Range mode and moves the range around, this method is called. The keyframe controllers set a flag to indicate that the range is no longer linked to the first key or the last key. Then the range is stored in the interval, and this is considered the 'in range' portion of the controller. If time is evaluated outside of this range it applies the ORTs to determine the value.
Parameters
rangeThe new range for the anim.

flagsEDITRANGE_LINKTOKEYS
If this flag is set, the controller should re-establish the link between the start and end keys and its range. This is passed if the user presses the link to keys button in Track View. Thus, if one of the ends of the interval is at a key, link it to the key so that if the key moves, the interval moves.
Default Implementation:
{}
1104 {};

◆ DeleteTime()

virtual void DeleteTime ( Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to delete the specified interval of time (or the keys within the interval).
Parameters
ivThe interval of time to delete.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.

TIME_NOSLIDE
Delete any keys in the interval but don't actually remove the block of time.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

1116 {}

◆ ReverseTime()

virtual void ReverseTime ( Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to reverse the data within the specified interval. For example, if the interval passed is from frame 10 to 20, and there is a key at frame 12, the key should be moved to frame 18. Considered another way, if all the times were normalized, and there was a value n between 0 and 1, n should be changed to 1-n.
Parameters
ivThe interval of time over which to reverse the data.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Default Implementation:
{}
Sample Code:
template <class KT>
void GenMorphCont<KT>::ReverseTime( Interval iv, DWORD flags )
{
if(GetLocked()==false)
{
Interval test = TestInterval(iv,flags);
int n = keys.Count();
HoldTrack();
for (int i = 0; i < n; i++) {
if (test.InInterval(keys[i].time)) {
TimeValue delta = keys[i].time - iv.Start();
keys[i].time = iv.End()-delta;
}
}
keys.Invalidate();
Invalidate();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}
Definition: interval.h:36
TimeValue Start() const
Definition: interval.h:134
TimeValue End() const
Definition: interval.h:136
CoreExport int InInterval(const TimeValue t) const
Interval TestInterval(Interval iv, DWORD flags)
Definition: control.h:3063
controller mat max min numsubs x z controller keys x z controller keys
Definition: generics.inl:210
#define REFMSG_CHANGE
Sent to dependents of a ReferenceTarget that has changed in some way.
Definition: ref.h:251
const PartID PART_ALL
Combination of ALL_CHANNELS and PART_TM.
Definition: ref.h:92
#define FOREVER
Definition: interval.h:168
int TimeValue
Definition: maxtypes.h:118

Reimplemented in DefNoteTrack.

1132 {}

◆ ScaleTime()

virtual void ScaleTime ( Interval  iv,
float  s 
)
inlinevirtual
Remarks
This method is called to scale an interval of time by the specified scale factor.
Parameters
ivThe interval of time to scale. The origin of the scale is at iv.Start().
sThe scale factor for the time.
Default Implementation:
{}
Sample Code:
template <class KT>
void GenMorphCont<KT>::ScaleTime( Interval iv, float s)
{
if(GetLocked()==false)
{
int n = keys.Count();
TimeValue delta = int(s*float(iv.End()-iv.Start())) + iv.Start()-iv.End();
HoldTrack();
for (int i = 0; i < n; i++) {
if (iv.InInterval(keys[i].time)) {
keys[i].time =
int(s*float(keys[i].time - iv.Start())) + iv.Start();
} else
if (keys[i].time > iv.End()) {
keys[i].time += delta;
}
}
keys.Invalidate();
Invalidate();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}
MAXMEM_EXTERN_C UtilExport int(__cdecl *MAX_heapchk)(void)

Reimplemented in DefNoteTrack.

1142 {}

◆ InsertTime()

virtual void InsertTime ( TimeValue  ins,
TimeValue  amount 
)
inlinevirtual
Remarks
This method is called to insert the specified amount of time at the specified insertion point.
Parameters
insThe time to begin the insertion.
amountThe amount of time to insert.
Default Implementation:
{}
Sample Code:
template <class KT>
void GenMorphCont<KT>::InsertTime( TimeValue ins, TimeValue amount )
{
if(GetLocked()==false)
{
int n = keys.Count();
HoldTrack();
for (int i = 0; i < n; i++) {
if ( keys[i].time >= ins ) {
keys[i].time += amount;
}
}
keys.Invalidate();
Invalidate();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}

Reimplemented in DefNoteTrack.

1152 {}

◆ SupportTimeOperations()

virtual BOOL SupportTimeOperations ( )
inlinevirtual
Remarks
If an anim supports time operations in the track view (cut, copy, paste, etc.), it should implement this method to return TRUE. When it is FALSE the user cannot select blocks of time in the anim's track.
Default Implementation:
{return FALSE;}

Reimplemented in DefNoteTrack.

1162 { return FALSE; }

◆ MapKeys()

virtual CoreExport void MapKeys ( TimeMap map,
DWORD  flags 
)
virtual
Remarks
The method is called to update the keys specified by the flags, using the TimeMap passed. The plug-in should go through the specified keys and change their time to TimeMap::map(time). See the sample code below for how this is done.
Parameters
mapPoint to instance of Class TimeMap.

flagsThe flags indicate the keys to operate on. One or more of the following values:

TRACK_DOSEL
Selected keys only.

TRACK_DOALL
All the keys, ignore their selection state.

TRACK_SLIDEUNSEL
Slide unselected keys to the right. Keys are slid by the amount the last key was transformed.

TRACK_RIGHTTOLEFT
Enumerate right to left. If TRACK_SLIDEUNSEL is set, keys will slide to the left.

TRACK_DOSUBANIMS
Sub-Animatables keys as well.

TRACK_DOCHILDNODES
Child Nodes keys as well

TRACK_MAPRANGE
The range, if not locked to first and last key, should be mapped as well.
Sample Code:
template <class KT>
void GenMorphCont<KT>::MapKeys(TimeMap *map,DWORD flags )
{
if(GetLocked()==false)
{
int n = keys.Count();
BOOL changed = FALSE;
if (!n) return;
HoldTrack();
if (flags&TRACK_DOALL) {
for (int i=0; i<n; i++) {
keys[i].time = map->map(keys[i].time);
changed = TRUE;
}
} else
if (flags&TRACK_DOSEL) {
TimeValue mappedRangeStart = 0;
TimeValue mappedRangeEnd = 0;
TimeValue duration = 0;
// When using either the "Replace" or the "Insert" options, compute the selected keys' time range.
mappedRangeStart = map->map( iv.Start() );
mappedRangeEnd = map->map( iv.End() );
// Add a frame to the insert buffer so that we don't delete a key that would be right at the insertion
// point (because it would otherwise become coincident with the last key of the selected keys buffer).
if ( flags&TRACK_INSERTKEYS )
duration = iv.End() - iv.Start() + GetTicksPerFrame();
}
BOOL slide = flags&TRACK_SLIDEUNSEL;
TimeValue delta = 0, prev;
int start, end, inc;
if (flags&TRACK_RIGHTTOLEFT) {
start = n-1;
end = -1;
inc = -1;
} else {
start = 0;
end = n;
inc = 1;
}
for (int i = start; i!=end; i+=inc) {
if (keys[i].TestFlag(KEY_SELECTED)) {
prev = keys[i].time;
keys[i].time = map->map(keys[i].time);
delta = keys[i].time - prev;
changed = TRUE;
} else if (slide) {
keys[i].time += delta;
} else if (flags&TRACK_INSERTKEYS)
// When using the Insert option and the current key time is on, or beyond selected keys'
// insertion point, add the length of the selected keys' buffer.
if ( keys[i].time >= mappedRangeStart )
keys[i].time += duration;
}
// If the Replace option is on, remove all unselected keys within the range of currently selected keys.
// Note: there's no point doing this when the Slide or Insert options are used because unselected keys
// have already been moved out of the interval.
if ( flags&TRACK_REPLACEKEYS && !(slide || flags&TRACK_INSERTKEYS) ) {
// Delete any unselected key within the selected keys interval
// Note: unfortunately, we can't use FindKeyIndex to optimize the loop
// because mapped (i.e. selected) keys have not been sorted yet.
for ( int i = n-1; i >= 0; i-- ) {
if ( !keys[i].TestFlag(KEY_SELECTED) && keys[i].time <= mappedRangeEnd ) {
if ( keys[i].time < mappedRangeStart )
break;
keys.Delete(i, 1);
}
}
}
}
if (flags&TRACK_MAPRANGE && keys.TestFlag(RANGE_UNLOCKED)) {
TimeValue t0 = map->map(keys.range.Start());
TimeValue t1 = map->map(keys.range.End());
keys.range.Set(t0,t1);
}
if (changed) {
keys.Invalidate();
Invalidate();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}
}
#define TRACK_DOSEL
Definition: TrackFlags.h:14
#define TRACK_SLIDEUNSEL
Definition: TrackFlags.h:16
#define TRACK_MAPRANGE
Definition: TrackFlags.h:20
#define TRACK_INSERTKEYS
Definition: TrackFlags.h:22
#define TIMERANGE_SELONLY
Definition: TrackFlags.h:47
#define TRACK_DOALL
Definition: TrackFlags.h:15
#define TRACK_REPLACEKEYS
Definition: TrackFlags.h:23
#define TRACK_RIGHTTOLEFT
Definition: TrackFlags.h:17
virtual CoreExport Interval GetTimeRange(DWORD flags)
Definition: TimeMap.h:19
virtual TimeValue map(TimeValue t)=0
CoreExport int GetTicksPerFrame()

Reimplemented in DefNoteTrack.

◆ DeleteKeys()

virtual void DeleteKeys ( DWORD  flags)
inlinevirtual
Remarks
This method is called to delete keys, as specified by the flags passed.
Parameters
flagsOne or more of the following values:

TRACK_DOSEL
Delete selected keys only.

TRACK_DOALL
Delete all keys (ignore selection state).

TRACK_SLIDEUNSEL
Slide unselected keys to the right.

TRACK_RIGHTTOLEFT
Enumerate right to left. If TRACK_SLIDEUNSEL is set, keys will slide to the left.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

1194 {}

◆ DeleteKeyByIndex()

virtual void DeleteKeyByIndex ( int  index)
inlinevirtual
Remarks
Deletes the key specified by the index passed.
Parameters
indexThe index of the key to delete.
Default Implementation:
{}
1199 {}

◆ SelectKeys()

virtual void SelectKeys ( TrackHitTab sel,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to select or deselect a set of keys identified by the TrackHitTab and the specified flags.
Parameters
selThe table of track hit records. See Class TrackHitRecord and Class Tab. Note the following: typedef Tab<TrackHitRecord> TrackHitTab;

flagsEither SELKEYS_SELECT, SELKEYS_DESELECT, or a combination of SELKEYS_CLEARKEYS and SELKEYS_CLEARCURVE will be specified.

One or more of the following values:

SELKEYS_SELECT
The keys should be selected.

SELKEYS_DESELECT
The keys should be deselected.

SELKEYS_CLEARKEYS
All keys should be deselected.

SELKEYS_CLEARCURVE
All keys on the function curve should be deselected.

SELKEYS_FCURVE
Indicates that we are operating on the keys of a function curve, and not of a track.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

1215 {}

◆ SelectSubKeys()

virtual void SelectSubKeys ( int  subNum,
TrackHitTab sel,
DWORD  flags 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method is called on the client when the client takes over control of an anims function curves. It's called to select or deselect a set of keys identified by the TrackHitTab and the specified flags.
Parameters
subNumThe index of the sub-anim to select or deselect
selThe table of track hit records. See Class TrackHitRecord and Class Tab. Note the following: typedef Tab<TrackHitRecord> TrackHitTab;

flagsEither SELKEYS_SELECT, SELKEYS_DESELECT, or a combination of SELKEYS_CLEARKEYS and SELKEYS_CLEARCURVE will be specified.

One or more of the following values:

SELKEYS_SELECT
The keys should be selected.

SELKEYS_DESELECT
The keys should be deselected.

SELKEYS_CLEARKEYS
All keys should be deselected.

SELKEYS_CLEARCURVE
All keys on the function curve should be deselected.

SELKEYS_FCURVE
Indicates that we are operating on the keys of a function curve, and not of a track.
Default Implementation:
{}
1238 {}

◆ SelectSubCurve()

virtual void SelectSubCurve ( int  subNum,
BOOL  sel 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method is called to set the selected state of the sub-curve whose index is passed.
Parameters
subNumThe index of the sub-anim to select or deselect
selTRUE to select the curve; FALSE to deselect it.
Default Implementation:
{}
1247 {}

◆ SelectKeyByIndex()

virtual void SelectKeyByIndex ( int  i,
BOOL  sel 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method is called to set the selected state of the key whose index is passed.
Parameters
iThe key to select or deselect.
selTRUE to select the key; FALSE to deselect it.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

1256 {}

◆ IsKeySelected()

virtual BOOL IsKeySelected ( int  i)
inlinevirtual
Remarks
Returns TRUE if the key specified by the index is selected; otherwise FALSE.
Parameters
iThe index of the key to test.
Default Implementation:
{return FALSE;}
1262 { return FALSE; }

◆ FlagKey()

virtual void FlagKey ( TrackHitRecord  hit)
inlinevirtual
Remarks
This method is called to have the plug-in flag or mark a specific key identified by the TrackHitRecord.

As an example, when the user goes to move a selection set of keys in the Track View, a yellow marker is drawn. To move the group of keys, the user clicks on a single one. The system needs to track this one key as it is moved, and needs a way to identify it. This method is called so the developer can flag this key as the one that was selected. This is needed because the Track View doesn't know anything about a specific controllers ordering of keys and thus cannot refer to it by index.

The system will call GetFlagKeyIndex() (described below) to retrieve the index of the key that was flagged.
Parameters
hitThe hit record that the controller gave the Track View in the first place to identify the hit. Thus this is enough information to identify the key. See Class TrackHitRecord.
Default Implementation:
{}
Sample Code:
template <class KT>
void GenMorphCont<KT>::FlagKey(TrackHitRecord hit)
{
int n = keys.Count();
for ( int i = 0; i < n; i++ ) {
keys[i].ClearFlag(KEY_FLAGGED);
}
assert(hit.hit>=0&&hit.hit<(DWORD)n);
keys[hit.hit].SetFlag(KEY_FLAGGED);
}
Definition: TrackHitRecord.h:26
DWORD hit
Definition: TrackHitRecord.h:28

Reimplemented in DefNoteTrack.

1282 {}

◆ GetFlagKeyIndex()

virtual int GetFlagKeyIndex ( )
inlinevirtual
Remarks
Returns the index of the key that is flagged, or -1 if no keys are flagged. See the method above.
Default Implementation:
{return -1;}
Sample Code:
template <class KT>
int GenMorphCont<KT>::GetFlagKeyIndex()
{
int n = keys.Count();
for ( int i = 0; i < n; i++ ) {
if (keys[i].TestFlag(KEY_FLAGGED)) {
return i;
}
}
return -1;
}

Reimplemented in DefNoteTrack.

1290 { return -1; }

◆ NumSelKeys()

virtual int NumSelKeys ( )
inlinevirtual
Remarks
Returns the number of selected keys.
Default Implementation:
{return 0;}

Reimplemented in DefNoteTrack.

1294 { return 0; }

◆ CloneSelectedKeys()

virtual void CloneSelectedKeys ( BOOL  offset = FALSE)
inlinevirtual
Remarks
This method is called to make a copy of the selected keys.
Parameters
offsetIf TRUE, set the new key time to be centered between the original key and the next key.

Reimplemented in DefNoteTrack.

1300 {}

◆ AddNewKey()

virtual void AddNewKey ( TimeValue  t,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to add a new key at the specified time. The value of the key is set to the value of the previous key, or interpolated between keys, based on the flags passed.
Parameters
tThe time to add the key.
flagsOne or more of the following values:

ADDKEY_SELECT
Select the new key and deselect any other selected keys.

ADDKEY_INTERP
If TRUE then initialize the new key to the interpolated value at that time. If FALSE, initialize the key to the value of the previous key. ADDKEY_FLAGGED
Flag the newly created key as if FlagKey() was called for it.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

1312 {}

◆ MoveKeys()

virtual void MoveKeys ( ParamDimensionBase dim,
float  delta,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to move selected keys vertically in the function curve editor. This moves the key values but does not alter the key times. The developer adds the delta to the selected key values, after converting them using the dimension *dim passed. See the sample code below for how this may be done.
Parameters
dimUsed to scale the parameter's values into and out of units used in the user interface. For example, if the parameter was an angle, it would be shown in degrees, but stored in radians. Methods of this class allow the value to be converted back and forth. This is needed because the delta passed is in user interface units. Thus the selected key values need to be converted before the delta is applied. See Class ParamDimensBase.
deltaThe amount to move the keys (move the values - not the times). This is in the units of the user interface. For example, if an angle has a value in the function curve editor of 100 degrees, 100 would be passed as the delta.
flagsNot currently used.
Default Implementation:
{}
Sample Code:
void BoolCntrl::MoveKeys(ParamDimensionBase *dim,float delta,DWORD flags)
{
int n = (int) keys.length(); // downcast to 2 Gigs
if (!n||GetLocked()==true) return;
float m = 1.0f;
Interval valid;
BOOL changed = FALSE;
HoldTrack();
for (int i = 0; i < n; i++ ) {
if (keys[i].AnyElemSelected()) {
m = GetMultVal(keys[i].time,valid);
}
if (keys[i].ElemSelected(0)) {
keys[i][0] = dim->UnConvert(dim->Convert(keys[i][0]*m)+delta)/m;
changed = TRUE;
if (keys[i][0] > 0.0) {
if (delta < 0.0){
keys[i][0] = 0.0;
}
else
keys[i][0] = 1.0;
}
else if (keys[i][0] <= 0.0) {
if (delta > 0.0){
keys[i][0] = 1.0;
}
else
keys[i][0] = 0.0;
}
}
}
if (changed) {
keys.KeysChanged(TRUE); // FALSE indicates that key times didn't change so sorting isn't necessary.
ivalid.SetEmpty();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}
virtual void RevertSetKeyBuffer()
Revert any "Set Key" buffers.
Definition: Animatable.h:1613
Definition: ParamDimension.h:58
virtual float UnConvert(float value)=0
virtual float Convert(float value)=0
1336 {}

◆ ScaleKeyValues()

virtual void ScaleKeyValues ( ParamDimensionBase dim,
float  origin,
float  scale,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to scale selected keys values. This scales the key values but does not alter the key times. The developer scales the selected key values about the specified origin, after converting them using the dimension *dim passed.

Note the following macro available for scaling about an origin:

#define ScaleAboutOrigin(val,origin,scale)

((((val)-(origin))*(scale))+(origin))
Parameters
dimUsed to scale the parameter's values into and out of units used in the user interface. For example, if the parameter was an angle, it would be shown in degrees, but stored in radians. Methods of this class allow the value to be converted back and forth. See Class ParamDimensBase.
originThe origin about which the keys are scaled.
scaleThe scale factor to apply to the key values.
flagsNot currently used.
Default Implementation:
{}
Sample Code:
INTERP_CONT_TEMPLATE
void InterpControl<INTERP_CONT_PARAMS>::ScaleKeyValues(ParamDimensionBase *dim,float origin,float scale,DWORD flags)
{
int n = keys.Count();
if (!n) return;
BOOL changed = FALSE;
HoldTrack();
for (int i = 0; i < n; i++ ) {
for (int j=0;j<ELS;j++) {
if (keys[i].ElemSelected(j)) {
keys[i][j] = dim->UnConvert(ScaleAboutOrigin(dim->Convert(keys[i][j]),origin,scale));
changed = TRUE;
}
}
}
if (changed) {
keys.KeysChanged(FALSE);
ivalid.SetEmpty();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}
controller mat max min numsubs x z controller keys x z controller keys x z angle controller keys x_rotation z_rotation axis isAnimated scale
Definition: generics.inl:260
#define ScaleAboutOrigin(val, origin, scale)
Definition: TrackScreenUtils.h:39
1382  {}

◆ SelectCurve()

virtual void SelectCurve ( BOOL  sel)
inlinevirtual
Remarks
The plug-in keeps track of whether its function curve is selected or not. This method is called to have the plug-in select or deselect its function curve.
Parameters
selTRUE if the curve should be selected; FALSE if it should be deselected.
Default Implementation:
{}
1389 {}

◆ IsCurveSelected()

virtual BOOL IsCurveSelected ( )
inlinevirtual

Returns TRUE if the function curve is selected; otherwise returns FALSE.

Default Implementation:
{return FALSE;}
1394 { return FALSE; }

◆ IsSubCurveSelected()

virtual BOOL IsSubCurveSelected ( int  subNum)
inlinevirtual

Returns the selected state of the sub-curve whose index is passed.

Parameters
subNumThe index of the sub-anim
Returns
TRUE if subNum is seletected.
1399 { return FALSE; }

◆ GetSelKeyCoords()

virtual int GetSelKeyCoords ( TimeValue t,
float &  val,
DWORD  flags 
)
inlinevirtual
Remarks
This method is used to determine the commonality of the selected keys for display in the time/value type in fields of Track View. It is also used to retrieve the value and/or time of the selected keys (if there is only one selected, or they are common to the selected keys). The flags parameter specified which values to retrieve. The return value indicates if nothing, or several keys were selected. It also indicates if the selected keys shared a common time and/or common value.
Parameters
tThe time of the selected keys is returned here (if appropriate).
valThe value of the selected keys is returned here (if appropriate).
flagsOne of the following values:

KEYCOORDS_TIMEONLY
Only the time t needs to be updated.

KEYCOORDS_VALUEONLY
Only the value val needs to be updated.
Returns
This indicates what was selected, and what these keys had in common. One or more of the following values should be set:

KEYS_NONESELECTED
This indicates that no keys are selected.

KEYS_MULTISELECTED
This indicates that multiple keys are selected. Both of these last two bits could be set.

KEYS_COMMONTIME
If the selected keys share the same time then this flag should be set. In this case it is appropriate to update t if required.

KEYS_COMMONVALUE
If the selected keys share the same value then this flag should be set. In this case it is appropriate to update val if required.
Default Implementation:
{return KEYS_NONESELECTED;}

Reimplemented in DefNoteTrack.

1426  {
1427  return KEYS_NONESELECTED;
1428  }
#define KEYS_NONESELECTED
Definition: TrackFlags.h:127

◆ SetSelKeyCoords()

virtual void SetSelKeyCoords ( TimeValue  t,
float  val,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to update the time and/or value of the selected keys as specified by the flags. This is called if the user uses the time/value type in fields of Track View.
Parameters
tThe time to set for the selected keys (if the flags indicate this is needed).
valThe value to set for the selected keys (if the flags indicate this is needed).
flagsOne of the following values:

KEYCOORDS_TIMEONLY
Only the time needs to be updated.

KEYCOORDS_VALUEONLY
Only the value needs to be updated.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

1441 {}

◆ SetSelKeyCoordsExpr()

virtual int SetSelKeyCoordsExpr ( ParamDimension dim,
const MCHAR timeExpr,
const MCHAR valExpr,
DWORD  flags 
)
inlinevirtual
Remarks
This method is similar to SetSelKeyCoords() above. In that case you're given a time and a value and are to update the selected keys with these values (based on the flags passed). In this case, you are instead passed time and value expressions (as strings). The ideas is that these strings are evaulated as expressions and the resulting values are used to updated the selected keys. For instance, the user could select a bunch of keys and then type in n+45. This would add 45 to all the values of the keys.

Developers can use the 3ds Max expression parser (see Class Expr) to evaluate the strings. Debug SDK users can see /MAXSDKDB/SDKSRC/CTRLTEMP.H for an example (or see the sample code below)). If a plug-in doesn't support this feature it can return FALSE from this method and the old SetSelKeyCoords() method will be called. Note that the variable names are defined as KEYCOORDS_TIMEVAR and KEYCOORDS_VALVAR.
Parameters
dimThis is used to convert the parameter value once you get it.
timeExprA string containing the time expression.
valExprA string containing the value expression.
flagsOne of the following values:

KEYCOORDS_TIMEONLY
Only the time t needs to be updated.

KEYCOORDS_VALUEONLY
Only the value val needs to be updated.
Returns
This indicates what was selected, and what these keys had in common. One or more of the following values should be set:

KEYCOORDS_EXPR_UNSUPPORTED
Don't implement this method

KEYCOORDS_EXPR_ERROR
Error in expression

KEYCOORDS_EXPR_OK
Expression evaluated
Default Implementation:
{return KEYCOORDS_EXPR_UNSUPPORTED;}

Sample Code:
int BoolCntrl::SetSelKeyCoordsExpr(
const TCHAR *timeExpr, const TCHAR *valExpr, DWORD flags)
{
if(GetLocked()==false)
{
Expr texpr, vexpr;
float vin, vout=0.0f, tfin, tfout=0.0f;
bool isValExprPlainFloat = false;
if (timeExpr) {
if (texpr.load(timeExpr)!=EXPR_NORMAL) return KEYCOORDS_EXPR_ERROR;
}
if (valExpr) {
// if the value string represents a float, use that. Only otherwise use the expression parser.
// This allows entering a float value using the locale decimal point marker
TCHAR* end = NULL;
size_t len = _tcslen(valExpr);
vout = _tcstod(valExpr, &end);
if (end != valExpr + len) {
if (vexpr.load(valExpr) != EXPR_NORMAL) return KEYCOORDS_EXPR_ERROR;
}
else
isValExprPlainFloat = true;
}
int n = (int) keys.length(); // Downcast to 2 Gigs
if (!n) return KEYCOORDS_EXPR_OK;
HoldTrack();
for (int i = 0; i < n; i++ ) {
if (!(flags&KEYCOORDS_VALUEONLY)) {
if (keys[i].TimeLocked()) continue;
if (keys[i].Testflags(KEY_SELECTED)) {
tfin = float(keys[i].time)/float(GetTicksPerFrame());
texpr.eval(&tfout, 1, &tfin);
keys[i].time = int(tfout*GetTicksPerFrame());
}
}
if (!(flags&KEYCOORDS_TIMEONLY)) {
if (keys[i].ElemSelected(0)) {
if (!isValExprPlainFloat) {
vin = dim->Convert(keys[i][0]);
vexpr.eval(&vout, 1, &vin);
}
// Restrict the value to be either 0 or 1
keys[i][0] = (dim->UnConvert(vout) > 0.0f) ? 1.0f : 0.0f;
}
}
}
keys.KeysChanged();
keys.CheckForDups();
ivalid.SetEmpty();
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
}
}
#define KEYCOORDS_VALVAR
Definition: TrackFlags.h:138
#define KEYCOORDS_VALUEONLY
Definition: TrackFlags.h:134
#define KEYCOORDS_TIMEONLY
Definition: TrackFlags.h:133
#define KEYCOORDS_TIMEVAR
Definition: TrackFlags.h:137
#define KEYCOORDS_EXPR_ERROR
Definition: TrackFlags.h:142
#define KEYCOORDS_EXPR_OK
Definition: TrackFlags.h:143
Definition: expr.h:338
DllExport int eval(float *ans, int sRegCt, float *sRegs, int vRegCt=0, Point3 *vRegs=NULL)
DllExport int load(const MCHAR *s)
DllExport int defVar(int type, const MCHAR *name)
Definition: ParamDimension.h:162
#define EXPR_NORMAL
No problems, expression evaluated successfully.
Definition: expr.h:492
#define SCALAR_VAR
A single floating point value.
Definition: expr.h:34
1484  {
1486  }
#define KEYCOORDS_EXPR_UNSUPPORTED
Definition: TrackFlags.h:141

◆ AdjustTangents() [1/2]

virtual void AdjustTangents ( TrackHitRecord  hit,
ParamDimensionBase dim,
Rect rcGraph,
float  tzoom,
int  tscroll,
float  vzoom,
int  vscroll,
int  dx,
int  dy,
DWORD  flags 
)
inlinevirtual
Remarks
If a plug-in has tangent handles, this method is called if the user adjusts them. If a plug-in doesn't have tangent handles, this method may be ignored. This method is called if the user selects one of the handles and moves the mouse. This method is passed the dx, and dy of the mouse motion.

The plug-in may have any types of handles it wishes, and it is responsible for processing whatever needs to be done when the user adjusts them. The method is passed information about the screen space, such as the overall rectangle, and time and value scroll and zoom factors. See Screen-Time-Value Macros for macros to convert in and out of screen space.
Parameters
hitThis identifies the handle that was selected.
dimThe parameter dimension. See Class ParamDimensionBase.
rcGraphThis is the rectangle of the graph viewport.
tzoomThis is the time zoom factor.
tscrollThis is the time scroll factor.
vzoomThis is the value zoom factor.
vscrollThis is the value scroll factor.
dxThe mouse movement in screen coordinates in the x direction.
dyThe mouse movement in screen coordinates in the y direction.
flagsOne of the following values: ADJTAN_LOCK - Indicates the tangents are locked. ADJTAN_BREAK - Indicates the tangents have been broken.
1521  {};

◆ AdjustTangents() [2/2]

virtual void AdjustTangents ( TrackHitRecord  hit,
ParamDimensionBase dim,
float  angle,
float  length,
DWORD  flags 
)
inlinevirtual
Remarks
If a plug-in has tangent handles, this method is called if the user adjusts them. If a plug-in doesn't have tangent handles, this method may be ignored. This method is called if the user selects one of the handles in the viewport. This method is passed the change in angle and length of the handle the user wishes to perform.

The plug-in may have any types of handles it wishes, and it is responsible for processing whatever needs to be done when the user adjusts them.

Parameters
hitThis identifies the handle that was selected.
dimThe parameter dimension. See Class ParamDimensionBase.
angleThe change in angle the user is requesting (in radians).
lengthThe change in length the user is requesting.
flagsOne of the following values: ADJTAN_LOCK - Indicates the tangents are locked. ADJTAN_BREAK - Indicates the tangents have been broken.
1544  {};

◆ SubAnimSetKeyBufferPresent()

virtual CoreExport BOOL SubAnimSetKeyBufferPresent ( int  subNum)
virtual

returns true if the sub-anim has a "Set Key" buffer present

See also
SetKeyBufferPresent
Parameters
subNum- The index of the SubAnim to test.
Returns
TRUE if the SubAnim has a SetKey buffer present
Default Implementation:
{
if (SubAnim(SubNum)) return SubAnim(subNum)->SetKeyBufferPresent();
return FALSE;
}
virtual Animatable * SubAnim(int i)
Definition: Animatable.h:642
virtual BOOL SetKeyBufferPresent()
returns true if there is a "Set Key" buffer present
Definition: Animatable.h:1573

◆ SetKeyBufferPresent()

virtual BOOL SetKeyBufferPresent ( )
inlinevirtual

returns true if there is a "Set Key" buffer present

This method should be implemented for a keyframeable controller to support the "Set Key" animation mode. When in the "Set Key" mode, if the user modifies a keyframe controller the controller should create a temporary buffer to hold the new value until the user either commits or cancels the change.

Note
It is the plugins responsibility to ensure that the correct value (either the temp buffer or the permanent keyframed value) is returned from GetValue. For an example implementation of this method, look at samples/controllers/boolctrl.cpp
Returns
True if a buffer is present
1573 { return FALSE; }

◆ SubAnimCommitSetKeyBuffer()

virtual CoreExport void SubAnimCommitSetKeyBuffer ( TimeValue  t,
int  subNum 
)
virtual

Commit any "Set Key" buffers on the given sub-anim.

See also
CommitSetKeyBuffer
Parameters
subNum- The index of the SubAnim to commit.
t- The time of the SubAnim to commit.
Default Implementation:
{
Animatable* anim = SubAnim(subNum);
if ( anim ) anim->CommitSetKeyBuffer(t);
}
Definition: Animatable.h:118
virtual void CommitSetKeyBuffer(TimeValue t)
Commit any "Set Key" buffers.
Definition: Animatable.h:1594

◆ CommitSetKeyBuffer()

virtual void CommitSetKeyBuffer ( TimeValue  t)
inlinevirtual

Commit any "Set Key" buffers.

This function will be called whenever the user clicks the the large "Set Keys" button. If this animatable is keyable, it should commit any temporary "Set Key" buffers to its permanent keyframe storage. For an example implementation of this method, look at samples/controllers/boolctrl.cpp

1594 {}

◆ SubAnimRevertSetKeyBuffer()

virtual CoreExport void SubAnimRevertSetKeyBuffer ( int  subNum)
virtual

Revert any "Set Key" buffers on the given sub-anim.

See also
RevertSetKeyBuffer
Parameters
subNum- The index of the SubAnim to revert.
Default Implementation:
{
Animatable* anim = SubAnim(subNum);
if ( anim ) anim->RevertSetKeyBuffer(t);
}

◆ RevertSetKeyBuffer()

virtual void RevertSetKeyBuffer ( )
inlinevirtual

Revert any "Set Key" buffers.

If this animatable currently has a "Set Key" buffer, revert the value and remove the buffer. For an example implementation of this method, look at samples/controllers/boolctrl.cpp

1613 {}

◆ IsAnimated()

virtual CoreExport BOOL IsAnimated ( )
virtual
Remarks
Returns TRUE if this animatable actually has animation; otherwise FALSE. This method is recursive, so for example, if you call node->IsAnimated() it will return TRUE if any aspect of the node is animated; otherwise it will return FALSE.
Default Implementation:
The default implementation returns TRUE if a child anim has animation.

Reimplemented in PFSimpleAction, and DefNoteTrack.

◆ CanCopyTrack()

virtual BOOL CanCopyTrack ( Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
Returns TRUE if this item can copy its data over the specified range; otherwise returns FALSE.
Parameters
ivThe interval of time that would be copied.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Default Implementation:
{return FALSE;}

Reimplemented in DefNoteTrack.

1638 { return FALSE; }

◆ CanPasteTrack()

virtual BOOL CanPasteTrack ( TrackClipObject cobj,
Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
Returns TRUE if this item can paste its data over the specified range; otherwise returns FALSE.
Parameters
cobjThe clipboard object that would be pasted. The item should look at the SuperClassID and Class_ID of the creator of the clip object to determine if it is a suitable object to paste. See Class TrackClipObject.
ivThe interval of time that would be pasted.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Default Implementation:
{return FALSE;}

Reimplemented in DefNoteTrack.

1650 { return FALSE; }

◆ CopyTrack()

virtual TrackClipObject* CopyTrack ( Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to copy the item's track data over the specified interval.
Parameters
ivThe interval of time over which to copy the track data.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Returns
The item should return an instance of a class derived from TrackClipObject that contains the data for the item. See Class TrackClipObject.
Default Implementation:
{return NULL;}

Reimplemented in DefNoteTrack.

1662 { return NULL; }

◆ PasteTrack()

virtual void PasteTrack ( TrackClipObject cobj,
Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to paste the specified clip object to this track. This method will not be called unless CanPasteTrack() returned TRUE.
Parameters
cobjThe data to paste.
ivThe interval of time to paste.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.

Reimplemented in DefNoteTrack.

1671 {}

◆ CanCopySubTrack()

virtual BOOL CanCopySubTrack ( int  subNum,
Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

If CanCopyTrack() returns FALSE then this method is called on the sub-anim (passing the sub number).

This is used in particular for Parameter Blocks. In that case, if there is no controller plugged into the track, the copying and pasting of controllers can't be done (since there is no controller). However, this method allows the Parameter Block to handle it.
Parameters
subNumSpecifies the sub-anim to check.
ivThe interval of time over which to copy the track data.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Returns
TRUE if the specified item can copy its data over the specified range; otherwise FALSE.
Default Implementation:
{return FALSE;}
1693 { return FALSE; }

◆ CanPasteSubTrack()

virtual BOOL CanPasteSubTrack ( int  subNum,
TrackClipObject cobj,
Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

Returns TRUE if the specified item can paste its data over the specified range; otherwise returns FALSE.

Plug-ins can implement pasting for cases where their sub-anims don't implement it. An example of this is the Parameter Block class. It implements this method to allow pasting parameters that don't have controllers assigned to them. These aren't called on the client unless the sub-anim doesn't implement CanPasteTrack().
Parameters
subNumSpecifies the sub-anim to check.
cobjThe data to paste.
ivThe interval of time to paste.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Returns
TRUE if the specified item can paste its data over the specified range; otherwise FALSE.
Default Implementation:
{return FALSE;}
1713 { return FALSE; }

◆ CopySubTrack()

virtual TrackClipObject* CopySubTrack ( int  subNum,
Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method is called to copy the specified sub anim's track data over the specified interval.
Parameters
subNumThe number of the sub-anim to copy.
ivThe interval of time over which to copy the track data.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Returns
The item should return an instance of a class derived from TrackClipObject that contains the data for the item. See Class TrackClipObject.
Default Implementation:
{return NULL;}
1728 { return NULL; }

◆ PasteSubTrack()

virtual void PasteSubTrack ( int  subNum,
TrackClipObject cobj,
Interval  iv,
DWORD  flags 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method is called to paste the specified clip object to the specified sub-anim track.
Parameters
subNumThe number of the sub-anim to paste.
cobjThe data to paste.
ivThe interval of time to paste.
flagsOne or more of the following values:

TIME_INCLEFT
Include the left endpoint.

TIME_INCRIGHT
Include the right endpoint.
Default Implementation:
{}
1741 {}

◆ GetTrackVSpace()

virtual int GetTrackVSpace ( int  lineHeight)
inlinevirtual
Remarks
Returns the vertical space occupied by the track in units of one line.
Parameters
lineHeightThe height of a single line in pixels.
Default Implementation:
{ return 1; }

Reimplemented in DefNoteTrack.

1750 { return 1; }

◆ HitTestTrack()

virtual int HitTestTrack ( TrackHitTab hits,
Rect rcHit,
Rect rcTrack,
float  zoom,
int  scroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to determine which keys lie within the rcHit rectangle. Keys that are hit are added to the hits table.
Parameters
hitsThe table of TrackHitRecords to update. Each key that lies within the hit rectangle (is hit) should be added to this table. It is up to the plug-in to define a scheme that allows it to identify its hits using the data members of Class TrackHitRecord. Also see Class Tab for methods to add to the table.
rcHitThis is the region that was selected for hit testing. This may be a small rectangle about the mouse pick point, or a larger rectangle if the user selected by window.
rcTrackThis is the entire rectangular region of the track.
zoomThe is the time zoom factor.
scrollThis is the time scroll factor.
flagsOne or more of the following value:

HITTRACK_SELONLY
Selected only.

HITTRACK_UNSELONLY
Unselected only.

HITTRACK_ABORTONHIT
Abort hit testing on first hit.

HITCURVE_TESTTANGENTS
Hit test curve tangents.
Returns
One of the following values:

TRACK_DONE
This indicates the track was hit tested.

TRACK_DORANGE
This indicates that the system will handle hit testing to the range bar for the item. For example a node returns this value because it does not have any keys. Therefore it just lets the user hit test the range bar. In general, anything that is not a leaf controller will not implement this method and return the default. The system will then simply hit test the range bar.

TRACK_ASKCLIENT
If a plug-in returns this value then the anim's client will be given a chance to paint the track in Track View. If a client returns this value then the method PaintSubTrack() will be called.
Default Implementation:
{ return TRACK_DORANGE; }

Reimplemented in DefNoteTrack.

1792  { return TRACK_DORANGE; }
#define TRACK_DORANGE
Definition: TrackFlags.h:107

◆ PaintTrack()

virtual int PaintTrack ( ParamDimensionBase dim,
HDC  hdc,
Rect rcTrack,
Rect rcPaint,
float  zoom,
int  scroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to display the item in the track view. If an item needs to draw itself in a special fashion, it implements this method to do so. For example, a sound plug-in may draw its waveform using this method. If an item does not need to draw itself, the default implementation may be used. This draws the range bar for the item.

Note: When drawing something to appear in Track View, a developer should not do any clipping of their own. 3ds Max will take care of all clipping itself.
Parameters
dimThe dimension for the parameter of this track.
hdcThe handle of the device context.
rcTrackThe entire rectangle of the inside of the track.
rcPaintThis is the rectangular region that needs to be repainted - the invalid region.
zoomThe time zoom factor.
scrollThe time scroll factor.
flagsOne or more of the following values which are filters for controllers with more than one curve:

DISPLAY_XCURVE
DISPLAY_YCURVE

Note
RGB controllers interpret X as red, Y as green, and Z as blue. DISPLAY_ZCURVE
Returns
One of the following values:

TRACK_DONE
Indicates the track was painted.

TRACK_DORANGE
Indicates the system should draw the range bars for the item.

TRACK_ASKCLIENT
Indicates the anim's client will be given a chance to paint the track in Track View. See Animatable::PaintSubTrack() which will be called to do this.
Default Implementation:
{ return TRACK_DORANGE; }

Reimplemented in DefNoteTrack.

1832  { return TRACK_DORANGE; }

◆ PaintSubTrack()

virtual int PaintSubTrack ( int  subNum,
ParamDimensionBase dim,
HDC  hdc,
Rect rcTrack,
Rect rcPaint,
float  zoom,
int  scroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method will be called if PaintTrack returns TRACK_ASKCLIENT. This gives the anim's client a chance to paint the tracks in Track View.
Parameters
subNumSpecifies the sub-anim to paint.
dimThe dimension for the parameter of this track.
hdcThe handle of the device context.
rcTrackThe entire rectangle of the inside of the track.
rcPaintThis is the rectangular region that needs to be repainted - the invalid region.
zoomThe time zoom factor.
scrollThe time scroll factor.
flagsOne or more of the following values which are filters for controllers with more than one curve:

DISPLAY_XCURVE
DISPLAY_YCURVE
DISPLAY_ZCURVE
Note
RGB controllers interpret X as red, Y as green, and Z as blue.
Returns
One of the following values:

TRACK_DONE
Indicates the track was painted.

TRACK_DORANGE
Indicates the system should draw the range bars for the item.
Default Implementation:
{return TRACK_DORANGE;}
1867  {return TRACK_DORANGE;}

◆ PaintFCurves()

virtual int PaintFCurves ( ParamDimensionBase dim,
HDC  hdc,
Rect rcGraph,
Rect rcPaint,
float  tzoom,
int  tscroll,
float  vzoom,
int  vscroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to draw the function curve of the anim.
Parameters
dimThe parameter dimension. See Class ParamDimensionBase.
hdcThe handle of the device context.
rcGraphThe entire rectangle of the inside of the graph region.
rcPaintThis is the rectangular region that needs to be repainted - the invalid region.
tzoomThe time zoom factor.
tscrollThe time scroll factor.
vzoomThe value zoom factor.
vscrollThe value scroll factor.
flagsOne or more of the following values which are filters for controllers with more than one curve:

PAINTCURVE_SHOWTANGENTS
Show the curve tangent handles.

PAINTCURVE_FROZEN
Show the curve in a frozen state. DISPLAY_XCURVE
DISPLAY_YCURVE
DISPLAY_ZCURVE
PAINTCURVE_GENCOLOR
Draw the curve in its standard color.

The following options are passed to float controllers indicating a sugested color for drawing:

PAINTCURVE_XCOLOR
Draw the curve in red.

PAINTCURVE_YCOLOR
Draw the curve in green.

PAINTCURVE_ZCOLOR
Draw the curve in blue.
Note
RGB controllers interpret X as red, Y as green and Z as blue.
Returns
A plug-in should always return 0.
Default Implementation:
{ return 0; }

Reimplemented in Control.

1914  { return 0; }

◆ HitTestFCurves()

virtual int HitTestFCurves ( ParamDimensionBase dim,
TrackHitTab hits,
Rect rcHit,
Rect rcGraph,
float  tzoom,
int  tscroll,
float  vzoom,
int  vscroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to hit test the item's function curves. It is called to determine which keys on the curve lie within the rcHit rectangle. Keys that are hit are added to the hits table.
Parameters
dimThe parameter dimension. See Class ParamDimensionBase.
hitsThe table of TrackHitRecords to update. Each key that lies within the hit rectangle (is hit) should be added to this table. It is up to the plug-in to define a scheme that allows it to identify its hits using the data members of Class TrackHitRecord. Also see Class Tab for methods to add to the table.
rcHitThis is the region that was selected for hit testing. This may be a small rectangle about the mouse pick point, or a larger rectangle if the user selected by window.
rcGraphThis is the entire rectangle of the graph region.
tzoomThis is the time zoom factor.
tscrollThis is the time scroll factor.
vzoomThis is the time zoom factor.
vscrollThis is the time scroll factor.
flagsOne or more of the following values:

HITTRACK_SELONLY
Selected only.

HITTRACK_UNSELONLY
Unselected only.

HITTRACK_ABORTONHIT
Abort hit testing on first hit.

HITCURVE_TESTTANGENTS
Hit Test curve tangent handles.

The following are filters for controllers with more than one curve.

DISPLAY_XCURVE

DISPLAY_YCURVE

DISPLAY_ZCURVE
Note
RGB controllers interpret X as red, Y as green and Z as blue.
Returns
One of the following values to indicate what was hit:

HITCURVE_KEY
Hit one or more keys.

HITCURVE_WHOLE
Hit the curve (anywhere).

HITCURVE_TANGENT
Hit a tangent handle.

HITCURVE_NONE
Nothing was hit.

HITCURVE_ASKCLIENT
Ask the client to hit test the function curve. See Animatable::HitTestSubFCurves().
Default Implementation:
{ return HITCURVE_NONE; }
1968  { return HITCURVE_NONE; }
#define HITCURVE_NONE
Definition: TrackFlags.h:115

◆ PaintSubFCurves()

virtual int PaintSubFCurves ( int  subNum,
ParamDimensionBase dim,
HDC  hdc,
Rect rcGraph,
Rect rcPaint,
float  tzoom,
int  tscroll,
float  vzoom,
int  vscroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called to draw the specified sub-anim function curve. This allows the client to paint its function curve.
Parameters
subNumThe sub-anim number to paint.
dimThe parameter dimension. See Class ParamDimensionBase.
hdcThe handle of the device context.
rcGraphThe entire rectangle of the inside of the graph region.
rcPaintThis is the rectangular region that needs to be repainted - the invalid region.
tzoomThe time zoom factor.
tscrollThe time scroll factor.
vzoomThe value zoom factor.
vscrollThe value scroll factor.
flagsOne or more of the following values:

PAINTCURVE_SHOWTANGENTS
Show the curve tangent handles.

PAINTCURVE_FROZEN
Show the curve in a frozen state.

The following values are filters for controllers with more than one curve.

DISPLAY_XCURVE
DISPLAY_YCURVE
DISPLAY_ZCURVE

PAINTCURVE_GENCOLOR
Draw the curve in its standard color.

The following options are passed to float controllers indicating a sugested color for drawing:

PAINTCURVE_XCOLOR
Draw the curve in red.

PAINTCURVE_YCOLOR
Draw the curve in green.

PAINTCURVE_ZCOLOR
Draw the curve in blue.
Note
RGB controllers interpret X as red, Y as green and Z as blue.
Returns
A plug-in should always return 0.
Default Implementation:
{ return 0; }
2015  { return 0; }

◆ HitTestSubFCurves()

virtual int HitTestSubFCurves ( int  subNum,
ParamDimensionBase dim,
TrackHitTab hits,
Rect rcHit,
Rect rcGraph,
float  tzoom,
int  tscroll,
float  vzoom,
int  vscroll,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called if HitTestFCurves() returns HITCURVE_ASKCLIENT. It allows the client to hit test its sub-anim curves.
Parameters
subNumThe sub-anim number to hit test.
dimThe parameter dimension. See Class ParamDimensionBase.
hitsThe table of TrackHitRecord instances to update. Each key that lies within the hit rectangle (is hit) should be added to this table. It is up to the plug-in to define a scheme that allows it to identify its hits using the data members of Class TrackHitRecord. Also see Class Tab for methods to add to the table.
rcHitThis is the region that was selected for hit testing. This may be a small rectangle about the mouse pick point, or a larger rectangle if the user selected by window.
rcGraphThis is the entire rectangle of the graph region.
tzoomThis is the time zoom factor.
tscrollThis is the time scroll factor.
vzoomThis is the time zoom factor.
vscrollThis is the time scroll factor.
flagsOne or more of the following values:

HITTRACK_SELONLY
Selected only.

HITTRACK_UNSELONLY
Unselected only.

HITTRACK_ABORTONHIT
Abort hit testing on first hit.

HITCURVE_TESTTANGENTS
Hit Test curve tangent handles.

The follow are filters for controllers with more than one curve. (RGB controllers interpret X as red, Y as green and Z as blue.)

DISPLAY_XCURVE
DISPLAY_YCURVE
DISPLAY_ZCURVE
Returns
One of the following values to indicate what was hit:

HITCURVE_KEY
Hit one or more keys.

HITCURVE_WHOLE
Hit the curve (anywhere).

HITCURVE_TANGENT
Hit a tangent handle.

HITCURVE_NONE
Nothing was hit.
Default Implementation:
{ return HITCURVE_NONE; }
2069  { return HITCURVE_NONE; }

◆ EditTrackParams()

virtual void EditTrackParams ( TimeValue  t,
ParamDimensionBase dim,
const MCHAR pname,
HWND  hParent,
IObjParam ip,
DWORD  flags 
)
inlinevirtual
Remarks
This method is called for the plug-in to put up a modal dialog and let the user edit the tracks parameters for the selected keys. This function should not return until the user has completed editing at which time any windows that were created should be destroyed. Unlike BeginEditParams() and EndEditParams() this interface is modal.
Parameters
tThis time represents the horizontal position of where the user right clicked to bring up the modal edit track parameters dialog. See the flags below for when this parameter is valid.
dimThe parameter dimension. See Class ParamDimensionBase.
pnameThe name of the parameter as given by the client.
hParentThis is the parent window that should be used to create any dialogs.
ipAn interface pointer available for calling functions in 3ds Max.
flagsOne or more of the following values:

EDITTRACK_FCURVE
The user is in the function curve editor.

EDITTRACK_TRACK
The user is in one of the track views.

EDITTRACK_SCENE
The user is editing a path in the scene.

EDITTRACK_BUTTON
The user invoked by choosing the properties button. In this case the time parameter is NOT valid.

EDITTRACK_MOUSE
The user invoked by right clicking with the mouse. In this case the time parameter is valid.
Default Implementation:
{}

Reimplemented in DefNoteTrack.

2104  {}

◆ TrackParamsType()

virtual int TrackParamsType ( )
inlinevirtual
Remarks
This method returns a value that indicates how the track parameter editing is invoked.
Returns
One of the following values:

TRACKPARAMS_NONE

Has no track parameters. If this is returned then EditTrackParams() will not be called.

TRACKPARAMS_KEY

Entered by right clicking on a selected key. This should be used if the dialog provides parameters for the entire controller (for example as the Noise controller's dialog does).

TRACKPARAMS_WHOLE

Entered by right clicking anywhere in the track. This should be used if the dialog will represent the selection of keys (as a key info type dialog does).
Default Implementation:
{return TRACKPARAMS_NONE;}

Reimplemented in DefNoteTrack.

2125 {return TRACKPARAMS_NONE;}
#define TRACKPARAMS_NONE
Definition: TrackFlags.h:164

◆ GetFCurveExtents()

virtual int GetFCurveExtents ( ParamDimensionBase dim,
float &  min,
float &  max,
DWORD  flags 
)
inlinevirtual

This method is called to calculate the largest and smallest values of the anim.

The values max and min should be initialized before calling this function. A plugin implementing this function should not reset the values passed - in this way if max is passed with a larger value than the curve extents calculated for the current anim, the value of max will be unchanged.

Parameters
dim- The dimension of the anim.
[out]min- The smallest value. These are in the units given by the dimension. For example, if it was an angle parameter that was displayed in degrees, the units returned through min should be in degrees as well. A class should implement this method to not reset this value
[out]max- The largest value. These are in the units given by the dimension. For example, if it was an angle parameter that was displayed in degrees, the units returned through max should be in degrees as well.
flags- One or more of the following values which are filters for controllers with more than one curve:

DISPLAY_XCURVE
DISPLAY_YCURVE
DISPLAY_ZCURVE
Note
RGB controllers interpret X as red, Y as green and Z as blue.
Returns
If this method is processed, return nonzero; otherwise zero.

Reimplemented in Control.

2153  { return 0; }

◆ GetSubFCurveExtents()

virtual int GetSubFCurveExtents ( int  subNum,
ParamDimensionBase dim,
float &  min,
float &  max,
DWORD  flags 
)
inlinevirtual

The values max and min should be initialized before calling this function.

A plugin implementing this function should not reset the values passed - in this way if max is passed with a larger value than the curve extents calculated for the current anim, the value of max will be unchanged.

Parameters
subNum- The index of the SubAnim to query for curve extents
dim- The dimension of the anim.
[out]min- The smallest value. These are in the units given by the dimension. For example, if it was an angle parameter that was displayed in degrees, the units returned through min should be in degrees as well. A class should implement this method to not reset this value
[out]max- The largest value. These are in the units given by the dimension. For example, if it was an angle parameter that was displayed in degrees, the units returned through max should be in degrees as well.
flags- One or more of the following values which are filters for controllers with more than one curve:

DISPLAY_XCURVE
DISPLAY_YCURVE
DISPLAY_ZCURVE
Note
RGB controllers interpret X as red, Y as green and Z as blue.
Returns
If this method is processed, return nonzero; otherwise zero.
2184  { return 0; }

◆ GetParamDimension()

virtual ParamDimension* GetParamDimension ( int  i)
inlinevirtual
Remarks
Returns the type of dimension of the 'i-th' sub-anim. A dimension describes the type and order of magnitude of a sub-anim.
Parameters
iSpecifies the sub-anim (parameter) to return the dimension of.
Returns
The dimension of the 'i-th' sub-anim (parameter).
Default Implementation:
{return defaultDim;}

Reimplemented in IParamBlock2, PFSimpleAction, MultCurveList, and EaseCurveList.

2193 { return defaultDim; }
CoreExport ParamDimension * defaultDim

◆ TrackViewWinProc()

virtual LRESULT CALLBACK TrackViewWinProc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
inlinevirtual

This function is obsolete.

Reimplemented in SimpleSpline, SimpleShape, and DummyObject.

2202  { return 0;}

◆ SelectSubAnim()

virtual BOOL SelectSubAnim ( int  subNum)
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

When a user is in Track View in Edit Keys mode and clicks on the green triangle of a controller then this method will be called on the client with the appropriate sub number that corresponds to it. For instance, the Editable Mesh object implements this to allow the user to select vertices that are animated from the Track View.
Parameters
subNumThe index of the sub-anim that was clicked on.
Returns
TRUE if implemented; otherwise FALSE. (Track View will call RedrawViewports() if something returns TRUE from this method).
Default Implementation:
{return FALSE;}

Reimplemented in SplineShape, PatchObject, and PFSimpleAction.

2219 { return FALSE; }

◆ AddNoteTrack()

CoreExport void AddNoteTrack ( NoteTrack note)
Remarks
Implemented by the System.

This method adds the specified note track.
Parameters
noteThe note track to add. The Note Tracks provided by 3ds Max are derived from Class DefNoteTrack (which is derived from NoteTrack). See that class for the methods and data members used to access Note Tracks.

◆ DeleteNoteTrack()

CoreExport void DeleteNoteTrack ( NoteTrack note,
BOOL  delNote = TRUE 
)
Remarks
Implemented by the System.

This method deletes the specified note track.
Parameters
noteThe note track to delete. The Note Tracks provided by 3ds Max are derived from Class DefNoteTrack (which is derived from NoteTrack). See that class for the methods and data members used to access Note Tracks.
delNoteIf delNote is FALSE the note track will be removed from the anim but not deleted.

◆ HasNoteTracks()

CoreExport BOOL HasNoteTracks ( )
Remarks
Implemented by the System.

This method returns TRUE if the track has note tracks; otherwise FALSE.

◆ NumNoteTracks()

CoreExport int NumNoteTracks ( )
Remarks
Implemented by the System.

This method returns the number of note tracks.

◆ GetNoteTrack()

CoreExport NoteTrack* GetNoteTrack ( int  i)
Remarks
Implemented by the System.

This method retrieves the 'i-th' note track.
Parameters
iSpecifies the note track to retrieve.
Returns
A pointer to a Note Track. The Note Tracks provided by 3ds Max are derived from Class DefNoteTrack (which is derived from NoteTrack). See that class for the methods and data members used to access Note Tracks.

◆ EnumAuxFiles()

virtual CoreExport void EnumAuxFiles ( AssetEnumCallback assetEnum,
DWORD  flags = FILE_ENUM_ALL 
)
virtual
Remarks
This method is used to enumerate any 'auxiliary' files maintained by the item and record the filename with the callback. Entities which actually need to load auxiliary files (for instance texture maps) must implement this method, possibly calling ReferenceMaker::EnumAuxFiles() also. The ReferenceMaker implementation simply calls itself on all its references (see below).

Class Interface has a method that may be used to call this on the entire system. This includes the renderer, materials editor, atmospheric effects, background, video post, lights, etc. – everything that may have auxiliary files associated with it. After specifying the appropriate flags a list of filenames is created that matched the enumeration conditions as specified by the flags. This is used for instance by the Archive function in 3ds Max to grab a list of bitmap files used by the system.
Parameters
assetEnumThe callback object that may be used to record the asset. See Class AssetEnumCallback.
flagsSee Auxiliary File Enumeration Flags
Sample Code:
void MaxShader::EnumAuxFiles(AssetEnumCallback& assetEnum, DWORD flags)
{
return;
if (!(flags & FILE_ENUM_INACTIVE))
return; // not needed by renderer
PBBitmap* bm = NULL;
for(int i=0; i < CHANNEL_MAX; i++)
{
ParamID pid = DIFFUSE_FILE + i;
if (m_PBlock->GetParamDef(pid).type == TYPE_BITMAP)
{
ParamID pid = m_PBlock->IndextoID(i);
m_PBlock->GetValue(pid,0,bm,FOREVER);
if(bm)
{
{
IEnumAuxAssetsCallback* callback = static_cast<IEnumAuxAssetsCallback*>(&assetEnum);
callback->DeclareAsset(MaxShaderAccessor(m_PBlock, DIFFUSE_FILE + i));
}
else
{
bm->bi.EnumAuxFiles(assetEnum,flags);
}
}
}
}
ReferenceTarget::EnumAuxFiles( assetEnum, flags );
}
bool TestAFlag(DWORD mask) const
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:312
Definition: AssetEnumCallback.h:31
BMMExport void EnumAuxFiles(AssetEnumCallback &assetEnum, DWORD vflags)
An extension of AssetEnumCallback that exposes an interface for providing more detailed information a...
Definition: IAssetAccessor.h:299
virtual void DeclareAsset(IAssetAccessor &anAccessor)=0
Allows a client to implement and return an asset accessor object.
Definition: pbbitmap.h:36
BitmapInfo bi
Definition: pbbitmap.h:38
virtual CoreExport void EnumAuxFiles(AssetEnumCallback &assetEnum, DWORD flags)
Enumerate auxiliary files (e.g. bitmaps)
#define A_WORK1
Definition: AnimatableFlags.h:221
#define FILE_ENUM_INACTIVE
Enumerate inactive files.
Definition: FileEnumConstants.h:25
#define FILE_ENUM_ACCESSOR_INTERFACE
The callback object passed through is an IEnumAuxAssetsCallback derived object.
Definition: FileEnumConstants.h:53
#define FILE_ENUM_CHECK_AWORK1
Do not enumerate things with flag A_WORK1 set.
Definition: FileEnumConstants.h:43
short ParamID
The permanent ID of a Parameter.
Definition: iparamb2Typedefs.h:15
@ TYPE_BITMAP
A pointer to a PBBitmap (bitmap) object.
Definition: paramtype.h:76

Reimplemented in MtlBase, MSMtlXtnd, MSPluginMtl, MSTexmapXtnd, MSPluginTexmap, and ReferenceMaker.

◆ FreeAllBitmaps()

virtual void FreeAllBitmaps ( )
inlinevirtual
Remarks
This method is available in release 2.0 and later only.

This method frees all bitmaps in this Animatable but doesn't recurse. This is used for freeing all the scene bitmaps after a render.
Default Implementation:
{}
2293 {}

◆ GetSystemNodes()

virtual void GetSystemNodes ( INodeTab nodes,
SysNodeContext  Context 
)
inlinevirtual
Remarks
The driver controller of a system plug-in should implement this method to give 3ds Max a list of nodes that are part of the system. The driver controller should fill in the given table with the INode pointers of the nodes that are part of the system. This will ensure that operations like cloning and deleting affect the whole system.

Said another way, GetSystemNodes() should be implemented for the driver controller of a system, and should return a list of pointers to all nodes that are part of the system. GetInterface() should be implemented for the driven TM controllers of the system and return a pointer to the driver controller.

3ds Max will use GetInterface() in the TM controller of each selected node to retrieve the driver controller and then call GetSystemNodes() on the driver controller to get the list of nodes.
Parameters
nodesThe table of nodes that are part of the system.
ContextThis parameter is available in release 4.0 and later only. This parameter can be used to specify the context under which the "system nodes" are used. These are; kSNCClone, kSNCDelete, kSNCFileMerge, and kSNCFileSave.
Default Implementation:
{}
2321 {}

◆ IsSubClassOf()

virtual BOOL IsSubClassOf ( Class_ID  classID)
inlinevirtual

returns true if the animatable has sub-classed off the given class

If an object is a sub-class of a particular class, it will have a different ClassID() because it is a different class. This method allows an object to indicate that it is a sub-class of a particular class and therefore can be treated as one. For example, a class could be derived from TriObject. This derived class would have a different ClassID() then the TriObject's class ID however it still can be treated (cast) as a TriObject because it is derived from TriObject. Note the default implelementation: a class is considered to also be a subclass of itself.

Parameters
classIDThe Class_ID of the item that this class is a sub-class of.
Returns
TRUE if this class is a sub-class of classID; otherwise FALSE.
Default Implementation:
{return classID==ClassID();}

Reimplemented in PatchObject.

2341  {
2342  return (classID == ClassID());
2343  }
virtual CoreExport Class_ID ClassID()
Retrieves a constant that uniquely identifies the plugin class.

◆ IsRefMaker()

virtual BOOL IsRefMaker ( )
inlinevirtual

Tells whether it is a ReferenceMaker.

This function differentiates things sub classed from Animatable from subclasses of ReferenceMaker. The implementation of this method (in Animatable) returns FALSE and its implementation in ReferenceMaker returns TRUE.

Returns
Default of FALSE.

Reimplemented in ReferenceMaker.

2353 { return FALSE; }

◆ AddAppDataChunk()

CoreExport void AddAppDataChunk ( const Class_ID cid,
SClass_ID  sid,
DWORD  sbid,
DWORD  len,
void data 
)

Adds application/plugin specific (custom) data to an Animatable.

This method is used to add an AppDataChunk to this Animatable. The chunk is identified using the Class_ID, and SuperClassID of the owner, and an ID for sub-chunks.

Note
Developers who want to add appdata to the scene should see the method Interface::GetScenePointer().
Parameters
cid- The Class_ID of the owner of the chunk.
sid- The SuperClassID of the owner of the chunk.
sbid- An extra ID that lets the owner identify its sub-chunks.
len- The length of the data in bytes.
data- Pointer to the actual data. The data should be allocated on the heap by client code using MAX_malloc(). This will allow the system to free it safely (using MAX_free()). MAX_malloc() and MAX_free() are memory management routines implemented by the system.
Note
Not allocating on the heap the data passed to this method may lead to unexpected behaviour of the application.
Client code does not need to free the data that has been passed to this method. The system will free it when the Animatable is deleted or when client code explicitely removes the custom data chunk from the Animatable by calling Animatable::RemoveAppDataChunk.

◆ GetAppDataChunk()

CoreExport AppDataChunk* GetAppDataChunk ( const Class_ID cid,
SClass_ID  sid,
DWORD  sbid 
)

Retrieves the application/plugin specific (custom) data stored with an Animatable.

This method is used to retrieve a pointer to an AppDataChunk. The chunk is identified using the Class_ID, SuperClassID and sub-chunk ID of the owner.

Parameters
cid- The Class_ID of the owner of the chunk.
sid- The SuperClassID of the owner of the chunk.
sbid- An extra ID that lets the owner identify its sub-chunks.
Returns
A pointer to the previously stored AppDataChunk, or NULL if it could not be found.
See also
class AppDataChunk.

◆ RemoveAppDataChunk()

CoreExport BOOL RemoveAppDataChunk ( const Class_ID cid,
SClass_ID  sid,
DWORD  sbid 
)

Deletes the application/plugin specific (custom) data stored with an Animatable.

This method is used to delete an AppDataChunk. The chunk is identified using the Class_ID, SuperClassID and sub-chunk ID of the owner.

Parameters
cid- The Class_ID of the owner of the chunk.
sid- The SuperClassID of the owner of the chunk.
sbid- An extra ID that lets the owner identify its sub-chunks.
Returns
TRUE if the data was deleted, FALSE if it could not be found.

◆ ClearAllAppData()

CoreExport void ClearAllAppData ( )

Deletes all application/plugin specific (custom) data stored with an Animatable.

Calling this method will remove all the AppData associated with this Animatable.

Note
Plugins that call this method will erase all appdata chunks, not just their own. Therefore, it is usually more appropriate to call RemoveAppDataChunk() to remove custom application data associated with a specific Class_ID.

◆ RegisterAppDataLoadCallback() [1/2]

static CoreExport bool RegisterAppDataLoadCallback ( const Class_ID cid,
SClass_ID  sid,
APPDATALOADPROC  proc 
)
static

Registers a callback proc that is called when an AppDataChunk is read from a scene file.

When an AppDataChunk with the specified SuperClassID and Class_ID is read from the scene file, the specified callback proc is called. This is to permit versioning of the AppDataChunk.
Duplicate callbacks (calls to this method with identical parameters) will not be registered. The values passed through the procs argument list are the Animatable holding the AppData, the Class_ID and SClass_ID of the owner of the AppDataChunk, the ILoad*, and a Tab containing the sub-chunk ids.

void MAXWrapper_AppDataLoadProc(Animatable *anim, const Class_ID& cid, SClass_ID sid, ILoad* iload, Tab<DWORD> &subIDs)
{
for (int i = 0; i < subIDs.Count(); i++)
{
AppDataChunk *ad = anim->GetAppDataChunk(cid, sid, subIDs[i]);
...
}
}
CoreExport AppDataChunk * GetAppDataChunk(const Class_ID &cid, SClass_ID sid, DWORD sbid)
Retrieves the application/plugin specific (custom) data stored with an Animatable.
An application/plugin specific custom data that can be attached to animatables.
Definition: AppDataChunk.h:29
Definition: maxtypes.h:154
Definition: ioapi.h:414
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
ulong SClass_ID
Definition: maxtypes.h:203
Parameters
cid- The Class_ID of the owner of the chunk.
sid- The SuperClassID of the owner of the chunk.
proc- The callback proc to be called.
Returns
true if the callback was registered.

◆ UnRegisterAppDataLoadCallback() [1/2]

static CoreExport bool UnRegisterAppDataLoadCallback ( const Class_ID cid,
SClass_ID  sid,
APPDATALOADPROC  proc 
)
static

Unregisters a callback proc that is called when an AppDataChunk is read from a scene file.

Unregisters the specified callback proc is called. Callback procs do not need to be unregistered prior to 3ds Max shutdown.

Parameters
cid- The Class_ID of the owner of the chunk.
sid- The SuperClassID of the owner of the chunk.
proc- The callback proc to be called.
Returns
true if the callback was unregistered.

◆ RegisterAppDataLoadCallback() [2/2]

static CoreExport bool RegisterAppDataLoadCallback ( DWORD  sbid,
APPDATALOADPROC  proc 
)
static

Registers a callback proc that is called when an AppDataChunk is read from a scene file.

When an AppDataChunk with the specified sub-chunk id is read from the scene file, the specified callback proc is called. This is to permit versioning of the AppDataChunk.
Duplicate callbacks (calls to this method with identical parameters) will not be registered. The values passed through the procs argument list are the Animatable holding the AppData, the Class_ID and SClass_ID of the owner of the AppDataChunk, the ILoad*, and a Tab containing the sub-chunk ids.

void MAXWrapper_AppDataLoadProc(Animatable *anim, const Class_ID& cid, SClass_ID sid, ILoad* iload, Tab<DWORD> &subIDs)
{
for (int i = 0; i < subIDs.Count(); i++)
{
AppDataChunk *ad = anim->GetAppDataChunk(cid, sid, subIDs[i]);
...
}
}
Parameters
sbid- The extra ID that lets the owner identify its sub-chunks.
proc- The callback proc to be called.
Returns
true if the callback was registered.

◆ UnRegisterAppDataLoadCallback() [2/2]

static CoreExport bool UnRegisterAppDataLoadCallback ( DWORD  sbid,
APPDATALOADPROC  proc 
)
static

Unregisters a callback proc that is called when an AppDataChunk is read from a scene file.

Unregisters the specified callback proc is called. Callback procs do not need to be unregistered prior to 3ds Max shutdown.

Parameters
sbid- The extra ID that lets the owner identify its sub-chunks.
proc- The callback proc to be called.
Returns
true if the callback was unregistered.

◆ MouseCycleCompleted()

virtual CoreExport void MouseCycleCompleted ( TimeValue  t)
virtual
Remarks
This method is available in release 2.0 and later only (previously in Class Control in 1.x).

This method is called on whatever controller the user is modifying with the mouse – when the mouse button is released. For example when the user selects a node in the viewports, then drags, then releases the mouse button, this method is called. This method will also be called when the user clicks on a key in the track view and lets up. If a controller performs extensive calculation in its evaluation this method is handy. The controller could perhaps perform a simplified calculation during interactive adjustment of a node. Then when the user releases the mouse button this method is called and the extensive calculations are performed.

The default implementation of this method is recursive so it gets called on all sub-anims affected by a range bar operation.
Parameters
tThe time the mouse was released.

◆ MouseCycleStarted()

virtual CoreExport void MouseCycleStarted ( TimeValue  t)
virtual
Remarks
This method is called on whatever controller the user is modifying with the mouse – when the mouse button is pressed.

The default implementation of this method is recursive so it gets called on all sub-anims affected by a range bar operation.
Parameters
tThe time the mouse was first pressed.

◆ NumParamBlocks()

◆ GetParamBlock()

◆ GetParamBlockByID()

◆ SvSaveData()

CoreExport bool SvSaveData ( ISave isave,
USHORT  id 
)
Remarks
This method is available in release 3.0 and later only.

Implemented by the System.

This is the save method for schematic view data. For classes derived from ReferenceMaker, there is no need to call these. However, if you have a class derived from Animatable and it appears in the schematic view and you want to save schematic view properties for the object (node position, selection state, etc.) then you have to call this in your Save() method.
Parameters
isaveAn interface for saving data. See Class ISave.
idThe Chunk id (choosen by the developer).
Returns
Returns true if saved okay; otherwise false.

◆ SvLoadData()

CoreExport bool SvLoadData ( ILoad iLoad)
Remarks
Implemented by the System.

This is the load method for schematic view data. For classes derived from ReferenceMaker, there is no need to call these. However, if you have a class derived from Animatable and it appears in the schematic view and you want to load schematic view properties for the object (node position, selection state, etc.) then you have to call this in your Load() method.
Parameters
iLoadAn interface for loading data. See Class ILoad.
Returns
Returns true if loaded okay; otherwise false.

◆ SvGetRefIndex()

CoreExport DWORD SvGetRefIndex ( )
Remarks
This method is for internal use only.

◆ SvSetRefIndex()

CoreExport void SvSetRefIndex ( DWORD  i)
Remarks
This method is for internal use only.

◆ SvDeleteRefIndex()

CoreExport bool SvDeleteRefIndex ( )
Remarks
This method is for internal use only.
Operators:

◆ SvTraverseAnimGraph()

virtual CoreExport SvGraphNodeReference SvTraverseAnimGraph ( IGraphObjectManager gom,
Animatable owner,
int  id,
DWORD  flags 
)
virtual
Remarks
This method is available in release 3.0 and later only.

This method traverses the graph of objects in the 3ds Max scene, adding desired objects to the schematic view. Developers can specialize this behaviour by overriding this method and adding whatever objects are interesting to the schematic view. Objects are added to the schematic view by calling IGraphObjectManager::AddAnimatable(...). Reference lines are added to the schematic view by calling IGraphObjectManager::AddReference(...). Implementers of this method should call it recursively to process other objects in the scene.

See Class IGraphObjectManager.
Parameters
gomPoints to the schematic view window manager.
ownerThe owning animatable.
idThis is usually the sub-anim number (but can actually be any value the developer chooses).
flagsSee Flags for AddAnimatable() and SvTravereseAnimGraph().
Returns
A SvGraphNodeReference object.

Reimplemented in SimpleWSMMod, SpecialFX, Modifier, Object, XYZGen, UVGen, TextureOutput, Texmap, MtlBase, CustAttrib, and Control.

◆ SvStdTraverseAnimGraph()

CoreExport SvGraphNodeReference SvStdTraverseAnimGraph ( IGraphObjectManager gom,
Animatable owner,
int  id,
DWORD  flags 
)
Remarks
This method is a default graph traversal function which can be called from SvTraverseAnimGraph(...) above to handle graph traversal in simple cases. This traversal follows the sub-anim and child references. See the code below.
Parameters
gomPoints to the schematic view window manager.
ownerThe owning animatable.
idThis is usually the sub-anim number (but can actually be any value the developer chooses).
flagsSee Flags for AddAnimatable() and SvTravereseAnimGraph().
Returns
A SvGraphNodeReference object.
Default Implementation:
// A default graph traversal function which can be
// called from SvTraverseAnimGraph(...) to handle
// graph traversal in simple cases. Follows sub-anim
// and child references...
{
int i;
SvGraphNodeReference childNodeRef;
gom->PushLevel(this);
nodeRef = gom->AddAnimatable(this, owner, id, flags);
if (nodeRef.stat == SVT_PROCEED) {
for (i = 0; i < NumSubs(); i++) {
if (SubAnim(i)) {
childNodeRef = SubAnim(i)->SvTraverseAnimGraph(gom, this, i, flags);
if (childNodeRef.stat != SVT_DO_NOT_PROCEED)
gom->AddReference(nodeRef.gNode, childNodeRef.gNode, REFTYPE_SUBANIM);
}
}
}
gom->PopLevel();
return nodeRef;
}
CoreExport SvGraphNodeReference SvStdTraverseAnimGraph(IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
virtual int NumSubs()
Definition: Animatable.h:631
virtual CoreExport SvGraphNodeReference SvTraverseAnimGraph(IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
Represents an instance of a schematic view window and provides methods for adding nodes and node poin...
Definition: svcore.h:354
virtual void PopLevel()=0
Pops a level off the animatable ownership stack.
virtual IGraphRef * AddReference(IGraphNode *maker, IGraphNode *target, SvReferenceType type)=0
This method adds a reference from the specified "maker" node to the specified "target" node.
virtual SvGraphNodeReference AddAnimatable(Animatable *anim, Animatable *owner, int id, DWORD flags=0)=0
Adds an Animatable to the schematic view.
virtual void PushLevel(Animatable *anim, int id=SV_NO_ID)=0
Push a level onto the animatable ownership stack.
A small container type class that associates graph nodes with traversal status.
Definition: svcore.h:332
SvTraverseStatus stat
The traversal status.
Definition: svcore.h:338
IGraphNode * gNode
Points to the interface for the node in the schematic view.
Definition: svcore.h:336
@ SVT_PROCEED
The traversal should proceed.
Definition: svcore.h:15
@ SVT_DO_NOT_PROCEED
The traversal should not proceed.
Definition: svcore.h:17
@ REFTYPE_SUBANIM
Definition: svcore.h:24

◆ SvCanInitiateLink()

virtual CoreExport bool SvCanInitiateLink ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Returns true if this animatable can be the initiator of a link operation in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.

Reimplemented in Modifier, Mtl, and Control.

◆ SvCanConcludeLink()

virtual CoreExport bool SvCanConcludeLink ( IGraphObjectManager gom,
IGraphNode gNode,
IGraphNode gNodeChild 
)
virtual
Remarks
Returns true if this animatable can be the receiver (parent) of a link operation in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
gNodeChildPoints to the child node in the schematic view.
Default Implementation:
{ return false; }

Reimplemented in Modifier, and Control.

◆ SvGetName()

virtual CoreExport MSTR SvGetName ( IGraphObjectManager gom,
IGraphNode gNode,
bool  isBeingEdited 
)
virtual
Remarks
Returns the name of the object as it appears in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
isBeingEditedTRUE if the item is being edited; FALSE if not.
Default Implementation:
{
Animatable *owner;
int subNum;
MSTR name;
owner = gNode->GetOwner();
subNum = gNode->GetID();
name = owner->SubAnimName(subNum);
return name;
}

Reimplemented in Modifier, Object, XYZGen, UVGen, TextureOutput, MtlBase, and Control.

◆ SvCanSetName()

virtual CoreExport bool SvCanSetName ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Return true to permit the object's name to be edited in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Default Implementation:
{ return false; }

Reimplemented in Modifier, and MtlBase.

◆ SvSetName()

virtual CoreExport bool SvSetName ( IGraphObjectManager gom,
IGraphNode gNode,
const MSTR name 
)
virtual
Remarks
Called when the user changes the name of the object in the schematic view.
Parameters
gom<Points to the schematic view window manager.
gNodePoints to this node in the schematic view.
nameThe new name to set.
Returns
TRUE if the name was changed; FALSE if not.

Reimplemented in Modifier, and MtlBase.

◆ SvCanRemoveThis()

virtual CoreExport bool SvCanRemoveThis ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is available in release 3.0 and later only.

Return true if this object can be removed in the schematic view; false if not.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Default Implementation:
{ return false; }

Reimplemented in Modifier.

◆ SvRemoveThis()

virtual CoreExport bool SvRemoveThis ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual

Called when the user deletes this object in the schematic view...

Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Returns
true if deleted; false if not.

Reimplemented in Modifier.

◆ SvIsSelected()

virtual CoreExport bool SvIsSelected ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual

Returns true if the object is selected in its schematic view.

Reimplemented in Modifier, Object, and MtlBase.

◆ SvIsHighlighted()

virtual CoreExport bool SvIsHighlighted ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Returns true if the object is to be highlighted in the schematic view; otherwise false.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Default Implementation:
{ return false; }

◆ SvHighlightColor()

virtual CoreExport COLORREF SvHighlightColor ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is available in release 3.0 and later only.

Returns the highlight color for this node. The highlight color is used to outline nodes in the schematic view when SvIsHighlighted(...) returns true.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Returns
See COLORREF-DWORD format.
Default Implementation:
{ return gom->SvGetUIColor(SV_UICLR_PLUGIN_HIGHLIGHT); }

Reimplemented in Modifier, Object, and MtlBase.

◆ SvGetSwatchColor()

virtual CoreExport COLORREF SvGetSwatchColor ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is available in release 3.0 and later only.

Returns a color which is used to paint the triangular color swatch that appears in the upper-right hand corner of the node in the schematic view. One can return SV_NO_SWATCH to indicate that no swatch is to be drawn.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Returns
See COLORREF-DWORD format.
Default Implementation:
{ return SV_NO_SWATCH; }

◆ SvIsInactive()

virtual CoreExport bool SvIsInactive ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is available in release 3.0 and later only.

Returns true if this object is inactive; false is active. The schematic view draws inactive nodes in a grayed-out state.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to this node in the schematic view.
Default Implementation:
{ return false; }

◆ SvLinkChild()

virtual CoreExport bool SvLinkChild ( IGraphObjectManager gom,
IGraphNode gNodeThis,
IGraphNode gNodeChild 
)
virtual
Remarks
This method is called to link this object to the gNodeChild passed.
Parameters
gomPoints to the schematic view window manager.
gNodeThisPoints to this node in the schematic view.
gNodeChildPoints to the child node in the schematic view.
Returns
true if linked; false if not.
Default Implementation:
{ return false; }

Reimplemented in Modifier, and Control.

◆ SvHandleDoubleClick()

virtual CoreExport bool SvHandleDoubleClick ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is available in release 3.0 and later only.

This method is called when this node is double-clicked in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
Returns
true is handled; false if not interested in the event.
Default Implementation:
{ return false; }

Reimplemented in Modifier, Object, MtlBase, and Control.

◆ SvGetMultiSelectCallback()

virtual CoreExport MultiSelectCallback* SvGetMultiSelectCallback ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is called before a multiple select/deselect operation in the schematic view. Returns a callback used to perform the (de)selection. May return NULL if this object cannot be selected in some principle editor outside the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
Returns
A pointer to the callback object. See Class MultiSelectCallback.
Default Implementation:
{ return NULL; }

Reimplemented in Modifier, Object, and MtlBase.

◆ SvCanSelect()

virtual CoreExport bool SvCanSelect ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Returns true if this object can be selected in some editor (viewport, material editor, plug-in specific editor, etc.). Selection is actually accomplished by via the SvGetMultiSelectCallback(...) mechanism described above.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
Default Implementation:
{ return false; }

Reimplemented in Modifier, Object, and MtlBase.

◆ SvEditProperties()

virtual CoreExport bool SvEditProperties ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is reserved for future use.
Default Implementation:
{ return false; }

Reimplemented in Control.

◆ SvGetTip()

virtual CoreExport MSTR SvGetTip ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Returns a string to be displayed in the tip window for this object in the schematic view.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
Default Implementation:
{ return SvGetName(gom, gNode, false); }

◆ SvGetRefTip()

virtual CoreExport MSTR SvGetRefTip ( IGraphObjectManager gom,
IGraphNode gNode,
IGraphNode gNodeMaker 
)
virtual
Remarks
Returns a string to be displayed in the tip window in the schematic view for a reference from "gNodeMaker" to this.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
gNodeMakerPoints to the Maker node in the schematic view.
Sample Code:
{
return gNodeMaker->GetAnim()->SvGetName(gom, gNodeMaker, false) + " -> " + SvGetName(gom, gNode, false);
}
virtual CoreExport MSTR SvGetName(IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)

◆ SvCanDetach()

virtual CoreExport bool SvCanDetach ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
Returns true is this object can respond to the SvDetach(...) method; false if not.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
Default Implementation:
{ return false;}

◆ SvDetach()

virtual CoreExport bool SvDetach ( IGraphObjectManager gom,
IGraphNode gNode 
)
virtual
Remarks
This method is called to detach this object from its owner.
Parameters
gomPoints to the schematic view window manager.
gNodePoints to the node in the schematic view.
Returns
Returns true if detached; otherwise false.
Default Implementation:
{ return false;}

◆ SvGetRelTip()

virtual CoreExport MSTR SvGetRelTip ( IGraphObjectManager gom,
IGraphNode gNodeTarget,
int  id,
IGraphNode gNodeMaker 
)
virtual

Returns a string to be displayed in the tip window in the schematic view for a relationship from "gNodeMaker" to "gNodeTarget"...

Parameters
gomPoints to the schematic view window manager.
gNodeTargetthe IGraphNode that represents the target of the relationship.
idThe value passed as the IGraphObjectManager::AddRelationship ID parameter. Usually the subanim number.
gNodeMakerThe IGraphNode that represents the maker of the relationship (the animatable being called)
Returns
A string to be displayed in the tooltip
Sample Code
{
return SvGetName(gom, gNodeMaker, false) + " -> " + gNodeTarget->GetAnim()->SvGetName(gom, gNodeTarget, false);
}

◆ SvCanDetachRel()

virtual CoreExport bool SvCanDetachRel ( IGraphObjectManager gom,
IGraphNode gNodeTarget,
int  id,
IGraphNode gNodeMaker 
)
virtual

Returns true if this object can respond to the SvDetachRel(...) method...

Parameters
gomPoints to the schematic view window manager.
gNodeTargetthe IGraphNode that represents the target of the relationship.
idThe value passed as the IGraphObjectManager::AddRelationship ID parameter. Usually the subanim number.
gNodeMakerThe IGraphNode that represents the maker of the relationship (the animatable being called)
Returns
true if this animatable can process a call to SvDetachRel
Default Implementation:
{
return false;
}

◆ SvDetachRel()

virtual CoreExport bool SvDetachRel ( IGraphObjectManager gom,
IGraphNode gNodeTarget,
int  id,
IGraphNode gNodeMaker 
)
virtual

Detach this relationship.

gNodeMaker is called to detach gNodeTarget

Parameters
gomPoints to the schematic view window manager.
gNodeTargetthe IGraphNode that represents the target of the relationship.
idThe value passed as the IGraphObjectManager::AddRelationship ID parameter. Usually the subanim number.
gNodeMakerThe IGraphNode that represents the maker of the relationship (the animatable being called)
Returns
true if the relationship was detached
Default Implementation:
{
return false;
}

◆ SvHandleRelDoubleClick()

virtual CoreExport bool SvHandleRelDoubleClick ( IGraphObjectManager gom,
IGraphNode gNodeTarget,
int  id,
IGraphNode gNodeMaker 
)
virtual

Called when this relationship is double-clicked in the schematic view...

Parameters
gomPoints to the schematic view window manager.
gNodeTargetthe IGraphNode that represents the target of the relationship.
idThe value passed as the IGraphObjectManager::AddRelationship ID parameter. Usually the subanim number.
gNodeMakerThe IGraphNode that represents the maker of the relationship (the animatable being called)
Returns
true if the double click was handled
Default Implementation:
{
return false;
}

◆ GetCustAttribContainer()

CoreExport ICustAttribContainer* GetCustAttribContainer ( )

This method returns a pointer to the custom attributes container interface class.

See Class ICustAttribContainer for more information.

◆ AllocCustAttribContainer()

CoreExport void AllocCustAttribContainer ( )

This method allocates space for a custom attributes container.

◆ DeleteCustAttribContainer()

CoreExport void DeleteCustAttribContainer ( )

This method deletes space used by a custom attributes container.

◆ IsParamBlockDesc2Used()

virtual bool IsParamBlockDesc2Used ( ParamBlockDesc2 desc)
inlinevirtual

Returns true if the passed description is being used.

When plugins use a dynamic Paramblock2 system, and build a ParamBlockDesc2 on demand, the list maintained by the ClassDesc may not reflect the active configuration in the plugin. This method lets the system filter the list maintained by asking the plugin (such as the DxMaterial) whether the current ParamBlockDesc2 is currently used by the plugin. Anybody querying the ClassDesc for the ParamBlockDesc2 needs to make sure that the descriptor is currently being used by the plugin.
This mostly goes for maxscript.

Parameters
descThe description to test
Returns
true if the plugin is currently using a parameter block built from desc.
Default Implementation:
{
return true;
}
3026 { return true; }

◆ GetMacroRecorderName()

virtual bool GetMacroRecorderName ( bool  used_as_rhs_value,
MSTR objectSpecifiedName 
)
inlinevirtual

This method is called to access the object specified name to use for the Maxscript macrorecorder.

The Maxscript macrorecorder will determine the name of the object to use when emitting code. In some cases it cannot determine a name for the object, for example when setting a value on a ParamBlock when the ParamBlock owner is a utility plugin singleton. This method allows the object to specify the name to be used.
If this method returns true and objectSpecifiedName is empty, no code will be emitted. This is useful in the case where you don't changes to an object's parameters to be macro recorded.

Parameters
used_as_rhs_value[in] The object is being assigned to a property, return constructor expression (i.e., "box()").
objectSpecifiedName[out] The object name for Maxscript macrorecorder to use.
Returns
Returns true if a name is specified; otherwise false. If true and objectSpecifiedName is empty, no code will be emitted.
3037 { return false; }

Friends And Related Function Documentation

◆ ISaveImp

friend class ISaveImp
friend

◆ ILoadImp

friend class ILoadImp
friend

Member Data Documentation

◆ kInvalidAnimHandle

const AnimHandle kInvalidAnimHandle = 0
static

◆ aflag

DWORD aflag
protected

◆ aprops

AnimPropertyList aprops
protected