DefNoteTrack Class Reference

DefNoteTrack Class Reference

#include <notetrck.h>

Class Description

See also
Class NoteKeyTab, Class Animatable.

Description:
This class is 3ds Max's implementation of Note Tracks. It provides implementation for the Animatable methods that let the keys work in Track View. Developers use this class to access the table of keys associated with a track. Methods of class Animatable are available to get access to this class.
+ Inheritance diagram for DefNoteTrack:

Public Member Functions

 DefNoteTrack ()
 
CoreExport DefNoteTrack (DefNoteTrack &n)
 
DefNoteTrackoperator= (DefNoteTrack &track)
 
CoreExport void HoldTrack ()
 
Class_ID ClassID ()
 Retrieves a constant that uniquely identifies the plugin class. More...
 
virtual void GetClassName (MSTR &s)
 Retrieves the (localizable) name of the plugin class. More...
 
int NumKeys ()
 
TimeValue GetKeyTime (int index)
 
CoreExport void MapKeys (TimeMap *map, DWORD flags)
 
CoreExport void DeleteKeys (DWORD flags)
 
CoreExport void CloneSelectedKeys (BOOL offset)
 
CoreExport void DeleteTime (Interval iv, DWORD flags)
 
CoreExport void ReverseTime (Interval iv, DWORD flags)
 
CoreExport void ScaleTime (Interval iv, float s)
 
CoreExport void InsertTime (TimeValue ins, TimeValue amount)
 
CoreExport void AddNewKey (TimeValue t, DWORD flags)
 
CoreExport int GetSelKeyCoords (TimeValue &t, float &val, DWORD flags)
 
CoreExport void SetSelKeyCoords (TimeValue t, float val, DWORD flags)
 
CoreExport int GetTrackVSpace (int lineHeight)
 
CoreExport BOOL CanCopyTrack (Interval iv, DWORD flags)
 
CoreExport BOOL CanPasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
CoreExport TrackClipObjectCopyTrack (Interval iv, DWORD flags)
 
CoreExport void PasteTrack (TrackClipObject *cobj, Interval iv, DWORD flags)
 
CoreExport Interval GetTimeRange (DWORD flags)
 
CoreExport int HitTestTrack (TrackHitTab &hits, Rect &rcHit, Rect &rcTrack, float zoom, int scroll, DWORD flags)
 
CoreExport int PaintTrack (ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
CoreExport void SelectKeys (TrackHitTab &sel, DWORD flags)
 
CoreExport void SelectKeyByIndex (int i, BOOL sel)
 
CoreExport int NumSelKeys ()
 
CoreExport void FlagKey (TrackHitRecord hit)
 
CoreExport int GetFlagKeyIndex ()
 
CoreExport BOOL IsAnimated ()
 
CoreExport void EditTrackParams (TimeValue t, ParamDimensionBase *dim, const MCHAR *pname, HWND hParent, IObjParam *ip, DWORD flags)
 
CoreExport int TrackParamsType ()
 
CoreExport BOOL SupportTimeOperations ()
 
CoreExport IOResult Save (ISave *isave)
 Called for saving data. More...
 
CoreExport IOResult Load (ILoad *iload)
 Called for loading data. More...
 
CoreExport void DeleteThis ()
 Deletes an instance of this class. More...
 
RefResult NotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message, BOOL propagate)
 Receives and responds to messages. More...
 
CoreExport RefTargetHandle Clone (RemapDir &remap)
 This method is used by 3ds Max to clone an object. More...
 
- Public Member Functions inherited from NoteTrack
SClass_ID SuperClassID ()
 Retrieves a constant representing the type of the plugin. More...
 
RefResult AutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
- Public Member Functions inherited from ReferenceTarget
virtual BOOL IsRefTarget ()
 Checks if this is a ReferenceTarget. More...
 
CoreExport RefResult TestForLoop (const Interval &refInterval, RefMakerHandle hmaker)
 Tests for a cyclical reference. More...
 
CoreExport BOOL HasDependents ()
 Checks if a ReferenceTarget has references. More...
 
CoreExport BOOL HasRealDependents ()
 Checks if this has Real (Strong) Dependents. More...
 
void BeginDependencyTest ()
 Starts Dependency Test. More...
 
BOOL EndDependencyTest ()
 Ends Dependency Test. More...
 
virtual void RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target. More...
 
virtual void RefAddedUndoRedo (RefMakerHandle rm)
 Called after a reference is made to a target because of undo or redo. More...
 
virtual void RefDeleted ()
 Called after a references to this is deleted. More...
 
virtual void RefDeletedUndoRedo ()
 Called after a references to this is deleted because of undo or redo. More...
 
CoreExport RefResult DeleteAllRefsToMe ()
 Deletes all references to this ReferenceTarget. More...
 
CoreExport RefResult TransferReferences (RefTargetHandle oldTarget, BOOL delOld=FALSE)
 Transfers all the references from oldTarget to this. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
virtual CoreExport void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone. More...
 
virtual CoreExport RefResult NotifyDependents (const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=NULL, NotifyDependentsOption notifyDependentsOption=REFNOTIFY_ALLOW_OPTIMIZATIONS)
 Notify all dependent RefMakers concerned with the message. More...
 
void FlagDependents (TimeValue t, PartID which=PART_PUT_IN_FG)
 This sends the REFMSG_FLAGDEPENDENTS message up the pipeline. More...
 
virtual void NotifyForeground (TimeValue t)
 This method is called to flag dependents into the FG. More...
 
virtual void NotifyTarget (int message, ReferenceMaker *hMaker)
 Sends messages to ReferenceTargets. More...
 
virtual CoreExport voidGetInterface (ULONG id)
 Inherited from Animatable. More...
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id)
 Inherited from Animatable. More...
 
CoreExport ReferenceTarget ()
 Constructor. More...
 
CoreExport RefResult MaybeAutoDelete ()
 Deletes the object when it has no more real dependents. More...
 
- Public Member Functions inherited from ReferenceMaker
CoreExport RefResult ReplaceReference (int which, RefTargetHandle newtarg, BOOL delOld=TRUE)
 Used when cloning reference makers. More...
 
CoreExport RefResult DeleteAllRefsFromMe ()
 Deletes all references from this ReferenceMaker. More...
 
CoreExport RefResult DeleteAllRefs ()
 Deletes all references both to and from this item. More...
 
CoreExport RefResult DeleteReference (int i)
 Deletes the specified reference. More...
 
virtual BOOL CanTransferReference (int i)
 Tells whether this reference can be transfered. More...
 
CoreExport ReferenceSaveManagerGetReferenceSaveManager ()
 Access the ReferenceSaveManager of this ReferenceMaker. More...
 
virtual int RemapRefOnLoad (int iref)
 Used to load old files with references. More...
 
virtual CoreExport void RescaleWorldUnits (float f)
 Rescale size of all world units in reference hierarchy. More...
 
virtual CoreExport void EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags)
 Enumerate auxiliary files (e.g. bitmaps) More...
 
virtual CoreExport void SaveEnum (SaveEnumProc &sep, BOOL isNodeCall=0)
 The default save enumeration. More...
 
virtual CoreExport bool SpecifySaveReferences (ReferenceSaveManager &referenceSaveManager)
 Used to specify reference slot remapping during scene file save. More...
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network. More...
 
CoreExport bool EnumRefHierarchy (RefEnumProc &proc, bool includeCustAttribs=true, bool includeIndirectRefs=true, bool includeNonPersistentRefs=true, bool preventDuplicatesViaFlag=true)
 This method provides a general purpose reference enumerator. More...
 
CoreExport int FindRef (RefTargetHandle rtarg)
 Get the index of the ReferenceTarget. More...
 
virtual BOOL IsRefMaker ()
 Tells whether it is a ReferenceMaker. More...
 
virtual BOOL IsRealDependency (ReferenceTarget *rtarg)
 Returns whether this is a "real" (strong) dependency or not. More...
 
virtual BOOL ShouldPersistWeakRef (RefTargetHandle rtarg)
 Specifies whether a weak reference is to be persisted on a partial load or save. More...
 
CoreExport ReferenceMaker ()
 Constructor. More...
 
CoreExport void DeleteMe ()
 Deletes an instance of this class. More...
 
virtual CoreExport int NumRefs ()
 Returns the total number of references this ReferenceMaker can hold. More...
 
virtual CoreExport RefTargetHandle GetReference (int i)
 Returns the 'i-th' reference. More...
 
- Public Member Functions inherited from Animatable
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 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...
 
CoreExport Animatable ()
 Constructor. More...
 
MSTR ClassName () const
 Returns the name of the plugin class. More...
 
virtual void BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev=NULL)
 
virtual void EndEditParams (IObjParam *ip, ULONG flags, Animatable *next=NULL)
 
virtual CoreExport void ReleaseInterface (ULONG id, void *i)
 
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...
 
virtual int NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
virtual CoreExport MSTR SubAnimName (int i)
 
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)
 
virtual BOOL BypassTreeView ()
 
virtual BOOL BypassTrackBar ()
 
virtual BOOL BypassPropertyLevel ()
 
virtual BOOL InvisibleProperty ()
 
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)
 
virtual BOOL AssignController (Animatable *control, int subAnim)
 
virtual BOOL CanAssignController (int subAnim)
 Return true if we can reassign the subanim specified. More...
 
virtual BOOL CanMakeUnique ()
 
CoreExport int EnumAnimTree (AnimEnum *animEnum, Animatable *client, int subNum)
 
virtual int RenderBegin (TimeValue t, ULONG flags=0)
 
virtual int RenderEnd (TimeValue t)
 
virtual void EditTimeRange (Interval range, DWORD flags)
 
virtual void DeleteKeyByIndex (int index)
 
virtual void SelectSubKeys (int subNum, TrackHitTab &sel, DWORD flags)
 
virtual void SelectSubCurve (int subNum, BOOL sel)
 
virtual BOOL IsKeySelected (int i)
 
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 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)
 
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)
 
virtual int PaintSubTrack (int subNum, ParamDimensionBase *dim, HDC hdc, Rect &rcTrack, Rect &rcPaint, float zoom, int scroll, DWORD flags)
 
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 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...
 
CoreExport void AddNoteTrack (NoteTrack *note)
 
CoreExport void DeleteNoteTrack (NoteTrack *note, BOOL delNote=TRUE)
 
CoreExport BOOL HasNoteTracks ()
 
CoreExport int NumNoteTracks ()
 
CoreExport NoteTrackGetNoteTrack (int i)
 
virtual void FreeAllBitmaps ()
 
virtual void GetSystemNodes (INodeTab &nodes, SysNodeContext Context)
 
virtual BOOL IsSubClassOf (Class_ID classID)
 returns true if the animatable has sub-classed off the given class More...
 
virtual CoreExport void MouseCycleCompleted (TimeValue t)
 
virtual CoreExport void MouseCycleStarted (TimeValue t)
 
virtual int NumParamBlocks ()
 
virtual IParamBlock2GetParamBlock (int i)
 
virtual IParamBlock2GetParamBlockByID (short id)
 
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...
 
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...
 
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...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Public Attributes

NoteKeyTab keys
 
MSTR trackName
 

Additional Inherited Members

- Static Public Member Functions inherited from Animatable
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 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 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...
 
- 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 Public Attributes inherited from Animatable
static const AnimHandle kInvalidAnimHandle = 0
 
- Protected Member Functions inherited from ReferenceTarget
virtual CoreExport int DoEnumDependentsImpl (DependentEnumProc *dep)
 Method to perform an enumeration on a ReferenceTarget. More...
 
virtual CoreExport ~ReferenceTarget ()=0
 Destructor. More...
 
- Protected Member Functions inherited from ReferenceMaker
virtual CoreExport ~ReferenceMaker ()=0
 Destructor. More...
 
virtual CoreExport void SetReference (int i, RefTargetHandle rtarg)
 Stores a ReferenceTarget as its 'i-th' reference`. More...
 
void BlockEval ()
 
void UnblockEval ()
 
int Evaluating ()
 
CoreExport RefResult StdNotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID partID, RefMessage message, BOOL propagate, NotifyDependentsOption notifyDependentsOption)
 
- Protected Member Functions inherited from Animatable
virtual CoreExport ~Animatable ()=0
 Destructor. More...
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 
- Protected Attributes inherited from Animatable
DWORD aflag
 
AnimPropertyList aprops
 

Constructor & Destructor Documentation

DefNoteTrack ( )
inline
149 {}

Member Function Documentation

DefNoteTrack& operator= ( DefNoteTrack track)
inline
151 {keys=track.keys;return *this;}
NoteKeyTab keys
Definition: notetrck.h:146
CoreExport void HoldTrack ( )
Class_ID ClassID ( )
inlinevirtual

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 definititions in plugapi.h.

Reimplemented from Animatable.

154 {return Class_ID(NOTETRACK_CLASS_ID,0);}
#define NOTETRACK_CLASS_ID
Definition: plugapi.h:337
Definition: maxtypes.h:140
virtual void GetClassName ( MSTR s)
inlinevirtual

Retrieves the (localizable) name of the plugin class.

This name is usually used internally for debugging purposes. 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

Reimplemented from ReferenceTarget.

155 { s = _M("DefNoteTrack"); } // from Animatable
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67
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 from Animatable.

158 {return keys.Count();}
NoteKeyTab keys
Definition: notetrck.h:146
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219
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 from Animatable.

159 {return keys[index]->time;}
NoteKeyTab keys
Definition: notetrck.h:146
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;
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();
}
}
}

Reimplemented from Animatable.

CoreExport void DeleteKeys ( DWORD  flags)
virtual
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 from Animatable.

CoreExport void CloneSelectedKeys ( BOOL  offset)
virtual
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 from Animatable.

CoreExport void DeleteTime ( Interval  iv,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport void ReverseTime ( Interval  iv,
DWORD  flags 
)
virtual
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();
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();
}
}

Reimplemented from Animatable.

CoreExport void ScaleTime ( Interval  iv,
float  s 
)
virtual
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();
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();
}
}

Reimplemented from Animatable.

CoreExport void InsertTime ( TimeValue  ins,
TimeValue  amount 
)
virtual
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();
for (int i = 0; i < n; i++) {
if ( keys[i].time >= ins ) {
keys[i].time += amount;
}
}
keys.Invalidate();
Invalidate();
}
}

Reimplemented from Animatable.

CoreExport void AddNewKey ( TimeValue  t,
DWORD  flags 
)
virtual
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.
Default Implementation:
{}

Reimplemented from Animatable.

CoreExport int GetSelKeyCoords ( TimeValue t,
float &  val,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport void SetSelKeyCoords ( TimeValue  t,
float  val,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport 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 from Animatable.

172 {return 1;}
CoreExport 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 from Animatable.

173 {return 1;}
CoreExport 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 from Animatable.

174 {return cobj->ClassID()==ClassID();}
virtual Class_ID ClassID()=0
Class_ID ClassID()
Retrieves a constant that uniquely identifies the plugin class.
Definition: notetrck.h:154
CoreExport TrackClipObject* CopyTrack ( Interval  iv,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport void PasteTrack ( TrackClipObject cobj,
Interval  iv,
DWORD  flags 
)
virtual
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 from Animatable.

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 from Animatable.

CoreExport int HitTestTrack ( TrackHitTab hits,
Rect rcHit,
Rect rcTrack,
float  zoom,
int  scroll,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport int PaintTrack ( ParamDimensionBase dim,
HDC  hdc,
Rect rcTrack,
Rect rcPaint,
float  zoom,
int  scroll,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport void SelectKeys ( TrackHitTab sel,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport void SelectKeyByIndex ( int  i,
BOOL  sel 
)
virtual
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 from Animatable.

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

Reimplemented from Animatable.

CoreExport void FlagKey ( TrackHitRecord  hit)
virtual
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);
}

Reimplemented from Animatable.

CoreExport int GetFlagKeyIndex ( )
virtual
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 from Animatable.

CoreExport BOOL IsAnimated ( )
inlinevirtual
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 from Animatable.

185 {return TRUE;}
CoreExport void EditTrackParams ( TimeValue  t,
ParamDimensionBase dim,
const MCHAR pname,
HWND  hParent,
IObjParam ip,
DWORD  flags 
)
virtual
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 from Animatable.

CoreExport 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 from Animatable.

187 {return TRACKPARAMS_KEY;}
#define TRACKPARAMS_KEY
Definition: TrackFlags.h:162
CoreExport 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 from Animatable.

188 {return TRUE;}
CoreExport IOResult Save ( ISave isave)
virtual

Called for saving data.

Called by the system to allow the plugin to save its data.

Parameters
isave- This pointer may be used to call methods to write data to disk. See the section on Loading and Saving Plug-in Data for an overview of the load/save process.
Returns
The default implementation is return IO_OK.
  • IO_OK means the result was acceptable, with no errors.
  • IO_ERROR This should be returned if an error occurred.

Reimplemented from ReferenceMaker.

CoreExport IOResult Load ( ILoad iload)
virtual

Called for loading data.

Called by the system to allow the plug-in to load its data. See the section on Loading and Saving Plug-in Data for an overview of the load - save process.

Parameters
iload- This interface pointer may be used to call methods to read data from disk.
Returns
The default implementation is return IO_OK.
  • IO_OK means the result was acceptable, with no errors.
  • IO_ERROR This should be returned if an error occurred.

Reimplemented from ReferenceMaker.

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 from Animatable.

RefResult NotifyRefChanged ( const Interval changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message,
BOOL  propagate 
)
inlinevirtual

Receives and responds to messages.

A plugin which makes references must implement a method to receive and respond to messages broadcast by its dependents. This is done by implementing NotifyRefChanged(). The plugin developer usually implements this method as a switch statement where each case is one of the messages the plugin needs to respond to. The Method StdNotifyRefChanged calls this, which can change the partID to new value. If it doesn't depend on the particular message& partID, it should return REF_DONTCARE.

  • For developer that need to update a dialog box with data about an object you reference note the following related to this method: This method may be called many times. For instance, say you have a dialog box that displays data about an object you reference. This method will get called many time during the drag operations on that object. If you updated the display every time you'd wind up with a lot of 'flicker' in the dialog box. Rather than updating the dialog box each time, you should just invalidate the window in response to the NotifyRefChanged() call. Then, as the user drags the mouse your window will still receive paint messages. If the scene is complex the user may have to pause (but not let up on the mouse) to allow the paint message to go through since they have a low priority. This is the way many windows in 3ds Max work.
Parameters
changeInt- This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval, with the exception of REFMSG_FLAGDEPENDENTS notifications. In that case, changeInt.Start() is the timepoint to perform the dependency test.
hTarget- This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message.
partID- This contains information specific to the message passed in. Some messages don't use the partID at all. See the section List of Reference Messages for more information about the meaning of the partID for some common messages.
message- The message parameters passed into this method is the specific message which needs to be handled.
propagate- If called through ReferenceMaker::NotifyDependents(), the value of 'propagate' passed to it. Used if calling NotifyDependents() from within NotifyRefChanged().
Returns
The return value from this method is of type RefResult. This is usually REF_SUCCEED indicating the message was processed. Sometimes, the return value may be REF_STOP. This return value is used to stop the message from being propagated to the dependents of the item.

Implements ReferenceMaker.

195  {return REF_SUCCEED;}
The operation succeeded.
Definition: ref.h:725
CoreExport RefTargetHandle Clone ( RemapDir remap)
virtual

This method is used by 3ds Max to clone an object.

See also
CloneRefHierarchy(), class RemapDir This method is called by 3ds Max to have the plugin clone itself. The plug-in's implementation of this method should copy both the data structure and all the data residing in the data structure of this reference target. The plugin should clone all its references as well. Also, the plug-in's implementation of this method must call BaseClone(). In order for classes derived from this class to clone cleanly, the Clone method should just create the new instance, and then call an implementation of BaseClone that clones the references and copies any other necessary data. For example:
class MyDerivedPlugin
: public MyBasePlugin
{
const int MY_REFERENCE = 1;
{
ReferenceTarget* result = new MyDerivedPlugin();
BaseClone(this, result, remap);
return result;
}
{
if (!to || !from || from == to)
return;
MyBasePlugin::BaseClone(from, to, remap);
to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE)));
}
};

This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations

Note
See the remarks in method BaseClone() below.
Parameters
remap- A RemapDir instance used for remapping references during a Clone.
Returns
A pointer to the cloned item.

Reimplemented from ReferenceTarget.

Member Data Documentation

NoteKeyTab keys
MSTR trackName