3ds Max C++ API Reference
Loading...
Searching...
No Matches
ReferenceTarget Class Referenceabstract

A scene entity that is being owned and listened to by other scene entities. More...

#include <ref.h>

+ Inheritance diagram for ReferenceTarget:

Public Member Functions

CoreExport void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class.
 
CoreExport SClass_ID SuperClassID () override
 Retrieves a constant representing the type of the plugin.
 
Testing for Class / Cyclic References/ Dependencies
BOOL IsRefTarget () override
 Checks if this is a ReferenceTarget.
 
CoreExport RefResult TestForLoop (const Interval &refInterval, RefMakerHandle hmaker)
 Tests for a cyclical reference.
 
CoreExport BOOL HasDependents ()
 Checks if a ReferenceTarget has references.
 
CoreExport BOOL HasRealDependents ()
 Checks if this has Real (Strong) Dependents.
 
void BeginDependencyTest ()
 Starts Dependency Test.
 
BOOL EndDependencyTest ()
 Ends Dependency Test.
 
Adding / Deleting / Transferring References
virtual void RefAdded (RefMakerHandle rm)
 Called after a reference is made to a target.
 
virtual void RefAddedUndoRedo (RefMakerHandle rm)
 Called after a reference is made to a target because of undo or redo.
 
 __declspec (deprecated) virtual void RefDeleted() final
 
virtual void RefDeleted (ReferenceMaker *oldOwner)
 Called after a reference to this is deleted.
 
 __declspec (deprecated) virtual void RefDeletedUndoRedo() final
 
virtual void RefDeletedUndoRedo (RefMakerHandle oldOwner)
 Called after a reference to this is deleted because of undo or redo.
 
CoreExport RefResult DeleteAllRefsToMe () override
 Deletes all references to this ReferenceTarget.
 
CoreExport RefResult TransferReferences (RefTargetHandle oldTarget, BOOL delOld=FALSE)
 Transfers all the references from oldTarget to this.
 
Dependent Enumeration


CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network.
 
Cloning
virtual CoreExport RefTargetHandle Clone (RemapDir &remap)
 This method is used by 3ds Max to clone an object.
 
virtual CoreExport void BaseClone (ReferenceTarget *from, ReferenceTarget *to, RemapDir &remap)
 This method copies base class data from an object to its clone.
 
Dependent Notification
CoreExport RefResult NotifyDependents (const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=nullptr, NotifyDependentsOption notifyDependentsOption=REFNOTIFY_ALLOW_OPTIMIZATIONS) override
 Notify all dependent RefMakers concerned with the message.
 
void FlagDependents (TimeValue t, PartID which=PART_PUT_IN_FG)
 This sends the REFMSG_FLAGDEPENDENTS message up the pipeline.
 
virtual void NotifyForeground (TimeValue t)
 This method is called to flag dependents into the FG.
 
virtual void NotifyTarget (int message, ReferenceMaker *hMaker)
 Sends messages to ReferenceTargets.
 
Methods introduced in 3DS Max version 4.2


CoreExport voidGetInterface (ULONG id) override
 Inherited from Animatable.
 
CoreExport BaseInterfaceGetInterface (Interface_ID id) override
 Inherited from Animatable.
 
- Public Member Functions inherited from ReferenceMaker
void GetClassName (MSTR &s, bool localized=true) const override
 Retrieves the name of the plugin class.
 
CoreExport SClass_ID SuperClassID () override
 Retrieves a constant representing the type of the plugin.
 
CoreExport RefResult ReplaceReference (int which, RefTargetHandle newtarg, BOOL delOld=TRUE)
 Used when cloning reference makers.
 
CoreExport RefResult DeleteAllRefsFromMe ()
 Deletes all references from this ReferenceMaker.
 
CoreExport RefResult DeleteAllRefs ()
 Deletes all references both to and from this item.
 
CoreExport RefResult DeleteReference (int i)
 Deletes the specified reference.
 
virtual BOOL CanTransferReference (int i)
 Tells whether this reference can be transfered.
 
CoreExport ReferenceSaveManagerGetReferenceSaveManager ()
 Access the ReferenceSaveManager of this ReferenceMaker.
 
virtual CoreExport IOResult Save (ISave *isave)
 Called for saving data.
 
virtual CoreExport IOResult Save (ISave *isave, ChannelMask)
 Access the ReferenceSaveManager of this ReferenceMaker.
 
virtual CoreExport IOResult Load (ILoad *iload)
 Called for loading data.
 
virtual CoreExport IOResult Load (ILoad *iload, ChannelMask)
 Access the ReferenceSaveManager of this ReferenceMaker.
 
virtual int RemapRefOnLoad (int iref)
 Used to load old files with references.
 
virtual CoreExport void RescaleWorldUnits (float f)
 Rescale size of all world units in reference hierarchy.
 
CoreExport void EnumAuxFiles (AssetEnumCallback &assetEnum, DWORD flags) override
 Enumerate auxiliary files (e.g. bitmaps)
 
virtual CoreExport void SaveEnum (SaveEnumProc &sep, BOOL isNodeCall=0)
 The default save enumeration.
 
virtual CoreExport bool SpecifySaveReferences (ReferenceSaveManager &referenceSaveManager)
 Used to specify reference slot remapping during scene file save.
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network.
 
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.
 
CoreExport int FindRef (RefTargetHandle rtarg)
 Get the index of the ReferenceTarget.
 
BOOL IsRefMaker () override
 Tells whether it is a ReferenceMaker.
 
virtual BOOL IsRealDependency (ReferenceTarget *rtarg)
 Returns whether this is a "real" (strong) dependency or not.
 
virtual BOOL ShouldPersistWeakRef (RefTargetHandle rtarg)
 Specifies whether a weak reference is to be persisted on a partial load or save.
 
CoreExport ReferenceMaker ()
 Constructor.
 
CoreExport void DeleteMe ()
 Deletes an instance of this class.
 
virtual CoreExport int NumRefs ()
 Returns the total number of references this ReferenceMaker can hold.
 
virtual CoreExport RefTargetHandle GetReference (int i)
 Returns the 'i-th' reference.
 
- 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
 
virtual BOOL SetKeyBufferPresent ()
 returns true if there is a "Set Key" buffer present
 
virtual CoreExport void SubAnimCommitSetKeyBuffer (TimeValue t, int subNum)
 Commit any "Set Key" buffers on the given sub-anim.
 
virtual void CommitSetKeyBuffer (TimeValue t)
 Commit any "Set Key" buffers.
 
virtual CoreExport void SubAnimRevertSetKeyBuffer (int subNum)
 Revert any "Set Key" buffers on the given sub-anim.
 
virtual void RevertSetKeyBuffer ()
 Revert any "Set Key" buffers.
 
virtual LRESULT CALLBACK TrackViewWinProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 This function is obsolete.
 
virtual BOOL IsRefMaker ()
 Tells whether it is a ReferenceMaker.
 
virtual bool IsParamBlockDesc2Used (ParamBlockDesc2 *desc)
 Returns true if the passed description is being used.
 
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.
 
CoreExport Animatable ()
 Constructor.
 
virtual CoreExport void DeleteThis ()
 Deletes an instance of this class.
 
MSTR ClassName (bool localized=true) const
 Returns the name of the plugin class.
 
virtual CoreExport Class_ID ClassID ()
 Retrieves a constant that uniquely identifies the plugin class.
 
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.
 
CoreExport AnimPropertyFindProperty (DWORD id)
 Find any property.
 
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.
 
CoreExport AppDataChunkGetAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Retrieves the application/plugin specific (custom) data stored with an Animatable.
 
CoreExport BOOL RemoveAppDataChunk (const Class_ID &cid, SClass_ID sid, DWORD sbid)
 Deletes the application/plugin specific (custom) data stored with an Animatable.
 
CoreExport void ClearAllAppData ()
 Deletes all application/plugin specific (custom) data stored with an Animatable.
 
virtual int NumSubs ()
 
virtual AnimatableSubAnim (int i)
 
 __declspec (deprecated) 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.
 
virtual ParamDimensionGetParamDimension (int i)
 
virtual BOOL SelectSubAnim (int subNum)
 
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)
 
virtual BOOL AssignController (Animatable *control, int subAnim)
 
virtual BOOL CanAssignController (int subAnim)
 Return true if we can reassign the subanim specified.
 
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 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.
 
virtual BOOL IsSubCurveSelected (int subNum)
 Returns the selected state of the sub-curve whose index is passed.
 
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)
 
virtual CoreExport BOOL IsAnimated ()
 
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)
 
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)
 
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.
 
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
 
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...
 
virtual CoreExport bool SvIsSelected (IGraphObjectManager *gom, IGraphNode *gNode)
 Returns true if the object is selected in its schematic view.
 
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"...
 
virtual CoreExport bool SvCanDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Returns true if this object can respond to the SvDetachRel(...) method...
 
virtual CoreExport bool SvDetachRel (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Detach this relationship.
 
virtual CoreExport bool SvHandleRelDoubleClick (IGraphObjectManager *gom, IGraphNode *gNodeTarget, int id, IGraphNode *gNodeMaker)
 Called when this relationship is double-clicked in the schematic view...
 
CoreExport ICustAttribContainerGetCustAttribContainer ()
 This method returns a pointer to the custom attributes container interface class.
 
CoreExport void AllocCustAttribContainer ()
 This method allocates space for a custom attributes container.
 
CoreExport void DeleteCustAttribContainer ()
 This method deletes space used by a custom attributes container.
 
void SetAFlag (DWORD mask)
 
void ClearAFlag (DWORD mask)
 Clears one or more bits in the Animatable flags.
 
bool TestAFlag (DWORD mask) const
 Tests one or more bits in the Animatable flags.
 
void SetAFlagEx (DWORD mask)
 Sets one or more bits in the Animatable extended flags.
 
void ClearAFlagEx (DWORD mask)
 Clears one or more bits in the Animatable extended flags.
 
bool TestAFlagEx (DWORD mask) const
 Tests one or more bits in the Animatable extended flags.
 
CoreExport bool TestFlagBit (int index)
 Tests the specified flag bit.
 
CoreExport void SetFlagBit (int index, bool newValue=true)
 Sets the specified flag bit.
 
CoreExport void ClearFlagBit (int index)
 Clears the specified flag bit.
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Protected Member Functions

CoreExport int DoEnumDependentsImpl (DependentEnumProc *dep) override
 Method to perform an enumeration on a ReferenceTarget.
 
- Protected Member Functions inherited from ReferenceMaker
virtual CoreExport ~ReferenceMaker ()=0
 Destructor.
 
virtual CoreExport void SetReference (int i, RefTargetHandle rtarg)
 Stores a ReferenceTarget as its 'i-th' reference`.
 
void BlockEval ()
 Validates a given reference link between this reference maker and its reference target.
 
void UnblockEval ()
 Validates a given reference link between this reference maker and its reference target.
 
int Evaluating ()
 Validates a given reference link between this reference maker and its reference target.
 
CoreExport RefResult StdNotifyRefChanged (const Interval &changeInt, RefTargetHandle hTarget, PartID partID, RefMessage message, BOOL propagate, NotifyDependentsOption notifyDependentsOption)
 Validates a given reference link between this reference maker and its reference target.
 
- Protected Member Functions inherited from Animatable
virtual CoreExport ~Animatable ()=0
 Destructor.
 
- Protected Member Functions inherited from Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Friends

class DependentIterator
 
class DeleteRefRestore
 
class MakeRefRestore
 
class ReferenceMaker
 

Construction, destruction of instances

virtual CoreExport ~ReferenceTarget ()=0
 Destructor.
 
CoreExport ReferenceTarget ()
 Constructor.
 
virtual CoreExport RefResult AutoDelete ()
 Deletes the object when it has no more real dependents.
 
CoreExport RefResult MaybeAutoDelete ()
 Deletes the object when it has no more real dependents.
 

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.
 
static CoreExport AnimHandle GetHandleByAnim (Animatable *anim)
 Get the unique handle for an Animatable object.
 
static CoreExport AnimatableGetAnimByHandle (AnimHandle handle)
 Get an Animatable object from its unique handle.
 
static CoreExport AnimHandle GetNextHandle ()
 Get the unique handle for the next Animatable object to be created.
 
static CoreExport void EnumerateAllAnimatables (EnumAnimList &enumProcObject)
 Enumerator to enumerate across all animatables.
 
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.
 
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.
 
static CoreExport bool RegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Registers a callback proc that is called when an AppDataChunk is read from a scene file.
 
static CoreExport bool UnRegisterAppDataLoadCallback (DWORD sbid, APPDATALOADPROC proc)
 Unregisters a callback proc that is called when an AppDataChunk is read from a scene file.
 
static CoreExport void ClearAFlagInAllAnimatables (DWORD mask)
 Clears one or more bits in the Animatable flags in all Animatables.
 
static CoreExport void ClearAFlagExInAllAnimatables (DWORD mask)
 Clears one or more bits in the Animatable extended flags in all Animatables.
 
static CoreExport int RequestFlagBit ()
 Requests an unique flag bit index.
 
static CoreExport void ReleaseFlagBit (int index)
 Releases the flag bit index.
 
static CoreExport void ClearFlagBitInAllAnimatables (int index)
 Clears the specified flag bit in all Animatables.
 
- 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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- Static Public Attributes inherited from Animatable
static const AnimHandle kInvalidAnimHandle = 0
 
- Protected Attributes inherited from Animatable
DWORD aflag
 
AnimPropertyList aprops
 

Detailed Description

A scene entity that is being owned and listened to by other scene entities.

ReferenceTarget is the base class for scene entities that allow to be referenced by instances of class ReferenceMaker. Most plugins are derived from this class.

This class exposes methods for sending notification messages to its dependent ReferenceMaker objects, enumerating their dependents, etc.

Note that RefTargetHandle is a typename for pointers to an object of type ReferenceTarget.

Constructor & Destructor Documentation

◆ ~ReferenceTarget()

virtual CoreExport ~ReferenceTarget ( )
protectedpure virtual

Destructor.

Instances of class ReferenceTarget and classes derived from it should be deleted by calling ReferenceTarget::MaybeAutoDelete() or ReferenceMaker::DeleteMe() on them, rather then calling the delete operator. This will ensure that the object drops all references made to it and the references it makes to other objects.

◆ ReferenceTarget()

Constructor.

Member Function Documentation

◆ AutoDelete()

virtual CoreExport RefResult AutoDelete ( )
virtual

Deletes the object when it has no more real dependents.

This function is called by 3ds Max in order to delete a plugin object when its last real dependent has been deleted. It also allows derived classes to control the lifetime of their instances. The default implementation of this method will drop the references this object makes to other objects, and if the undo system is engaged (holding) it will ensure that the deletion is undo/redo-able. Override this method only if you don't want instances of your plugin to be automatically deleted when the last reference to them is deleted. Most subclasses of class ReferenceTarget will not need to override this method. Plugins should call ReferenceTarget::MaybeAutoDelete() or ReferenceMaker::DeleteMe() to delete instances of plugin objects. For more information on how 3ds Max deletes reference targets, see ReferenceTarget::MaybeAutoDelete()

Returns
Default implementation always returns REF_SUCCEED. Overwrites should also always return REF_SUCCEED.
Note
Classes that overwrite this method to prevent deletion of their instances, should be deleted by calling ReferenceMaker::DeleteMe() on them.

Reimplemented in MtlLib, and MtlBaseLib.

◆ MaybeAutoDelete()

CoreExport RefResult MaybeAutoDelete ( )

Deletes the object when it has no more real dependents.

The system calls this method to check if it can delete objects that had a reference to them deleted (dropped). If there are no more real dependents on this object, this function will ask the object to auto-delete itself. See ReferenceTarget::AutoDelete() for more information on this. Note that "weak" references will not prevent the deletion of the object. Plugins should also call this method when they need to delete plugin instances. See ReferenceTarget::AutoDelete() for more information on deleting plugin instances.

Returns
REF_SUCCEED if this object was deleted successfully, or REF_FAIL if the object has outstanding real dependents to it and as a result it cannot be deleted.
Note
Objects can prevent their own deletion by overwriting ReferenceTarget::AutoDelete(). Examples of objects that may want to do this are singletons such as class MtlLib.

◆ GetClassName()

CoreExport void GetClassName ( MSTR s,
bool  localized = true 
) const
overridevirtual

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

Reimplemented in MSPluginObject< GenCamera >, MSPluginObject< GeomObject >, MSPluginObject< HelperObject >, MSPluginObject< GenLight >, MSPluginObject< ShapeObject >, MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< GenLight, MSPluginLight >, MSObjectXtnd< ShapeObject, MSPluginShape >, MSPluginSpecialFX< Atmospheric >, MSPluginSpecialFX< Effect8 >, MSSpecialFXXtnd< Atmospheric, MSPluginAtmos >, MSSpecialFXXtnd< Effect, MSPluginEffect >, SimplePolyObject, SimpleOSMToWSMMod, SimpleOSMToWSMMod2, SimpleObjectBase, SimpleWSMObject, SimpleParticle, SimpleShape, SimpleSpline, SplineShape, TriObject, and UnifiedRenderer.

◆ SuperClassID()

CoreExport SClass_ID SuperClassID ( )
overridevirtual

Retrieves a constant representing the type of the plugin.

Returns
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids.
See also
SClass_ID

Reimplemented from ReferenceMaker.

Reimplemented in IRenderElement, MaxBakeElement, Renderer, Sampler, Atmospheric, Effect, FilterKernel, BaseShader, ShadowType, SimpleOSMToWSMMod, SimpleOSMToWSMMod2, SoundObj, IXRefAtmospheric, IXRefObject, ToneOperator, UnifiedRenderer, and UnifiedRenderer.

◆ IsRefTarget()

BOOL IsRefTarget ( )
inlineoverridevirtual

Checks if this is a ReferenceTarget.

This function differentiates things subclassed from ReferenceMaker from subclasses of ReferenceTarget.

Returns
Returns TRUE.

Reimplemented from ReferenceMaker.

1917{ return TRUE; }

◆ TestForLoop()

CoreExport RefResult TestForLoop ( const Interval refInterval,
RefMakerHandle  hmaker 
)

Tests for a cyclical reference.

Implemented by the System. This method may be called to test for cyclical references.

Parameters
refInterval- This interval is reserved for future use. Currently any plugin should specify FOREVER for this interval.
hmaker- The reference maker performing the loop test.
Returns
REF_SUCCEED if a cyclic reference would be created; otherwise REF_FAIL.

◆ HasDependents()

CoreExport BOOL HasDependents ( )

Checks if a ReferenceTarget has references.

Implemented by the System.

Returns
Returns 1 if the reference target has items that reference it, otherwise 0.

◆ HasRealDependents()

CoreExport BOOL HasRealDependents ( )

Checks if this has Real (Strong) Dependents.

This function goes through it's list of dependents or ReferenceMakers and queries the results of their IsRealDependency Functions.

Returns
TRUE if any one of them are, FALSE otherwise.

◆ BeginDependencyTest()

void BeginDependencyTest ( )
inline

Starts Dependency Test.

To see if this reference target depends on something:

void ClearAFlag(DWORD mask)
Clears one or more bits in the Animatable flags.
Definition: Animatable.h:330
#define A_DEPENDENCY_TEST
Used to test for a dependency.
Definition: AnimatableFlags.h:198

◆ EndDependencyTest()

BOOL EndDependencyTest ( )
inline

Ends Dependency Test.

To see if this reference target depends on something:

1958{ return TestAFlag(A_DEPENDENCY_TEST); }
bool TestAFlag(DWORD mask) const
Tests one or more bits in the Animatable flags.
Definition: Animatable.h:338

◆ RefAdded()

virtual void RefAdded ( RefMakerHandle  rm)
inlinevirtual

Called after a reference is made to a target.

This is called after a reference is made to this. If the target (this) needs to know that a reference to made to it, the target (this) can override this function.

Parameters
rm- The ReferenceMaker creating the reference.
Note
This method is not called when performing an undo of removing a reference to a reference target, or redoing of setting a reference.
See also
RefAddedUndoRedo

Reimplemented in Mtl, Texmap, MSCustAttrib, MSPluginObject< GenCamera >, MSPluginObject< GeomObject >, MSPluginObject< HelperObject >, MSPluginObject< GenLight >, MSPluginObject< ShapeObject >, MSPluginSimpleObject, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSPluginModifier, MSPluginSimpleMod, MSPluginTexmap, MSPluginMtl, MSPluginSpecialFX< Atmospheric >, and MSPluginSpecialFX< Effect8 >.

1971{ UNUSED_PARAM(rm); }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

◆ RefAddedUndoRedo()

virtual void RefAddedUndoRedo ( RefMakerHandle  rm)
inlinevirtual

Called after a reference is made to a target because of undo or redo.

Called when reference is added because of an undo or a redo. Otherwise it is similar to RefAdded.

Parameters
rm- The ReferenceMaker creating the reference.

Reimplemented in MSCustAttrib, MSPluginObject< GenCamera >, MSPluginObject< GeomObject >, MSPluginObject< HelperObject >, MSPluginObject< GenLight >, MSPluginObject< ShapeObject >, MSPluginSimpleObject, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSPluginModifier, MSPluginSimpleMod, MSPluginTexmap, MSPluginMtl, MSPluginSpecialFX< Atmospheric >, and MSPluginSpecialFX< Effect8 >.

1979{ UNUSED_PARAM(rm); }

◆ __declspec() [1/2]

__declspec ( deprecated  )
inlinefinal
Deprecated:
Deprecated method in terms of implementation as of 3ds Max 2024 - re-implement with ReferenceMaker* method signature
1986 {
1987 RefDeleted(nullptr);
1988 }
virtual void RefDeleted(ReferenceMaker *oldOwner)
Called after a reference to this is deleted.
Definition: ref.h:2004

◆ RefDeleted()

virtual void RefDeleted ( ReferenceMaker oldOwner)
inlinevirtual

Called after a reference to this is deleted.

This is called after deleting a reference to a reference target.

Note
Prior to 3ds Max 2024, this method was called from ReferenceTarget::MaybeAutoDelete only when the target was not deleted when the reference to it was dropped. Starting in 3ds Max 2024, this method is called from ReferenceMaker::DeleteReference whenever a reference is dropped.
This method is not called when performing an undo of setting a reference to a reference target, or redoing removing a reference
Parameters
oldOwner- The ReferenceMaker removing its reference.
See also
RefDeletedUndoRedo
2004{UNUSED_PARAM(oldOwner);}

◆ __declspec() [2/2]

__declspec ( deprecated  )
inlinefinal
Deprecated:
Deprecated method in terms of implementation as of 3ds Max 2024 - re-implement with ReferenceMaker* method signature
2011 {
2012 RefDeletedUndoRedo(nullptr);
2013 }
virtual void RefDeletedUndoRedo(RefMakerHandle oldOwner)
Called after a reference to this is deleted because of undo or redo.
Definition: ref.h:2021

◆ RefDeletedUndoRedo()

virtual void RefDeletedUndoRedo ( RefMakerHandle  oldOwner)
inlinevirtual

Called after a reference to this is deleted because of undo or redo.

Called when reference is removed because of an undo or a redo. Otherwise it is similar to RefDeleted.

Parameters
oldOwner- The ReferenceMaker removing its reference.

Reimplemented in MSCustAttrib, MSPluginObject< GenCamera >, MSPluginObject< GeomObject >, MSPluginObject< HelperObject >, MSPluginObject< GenLight >, MSPluginObject< ShapeObject >, MSPluginSimpleObject, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSPluginModifier, MSPluginSimpleMod, MSPluginTexmap, MSPluginMtl, MSPluginSpecialFX< Atmospheric >, and MSPluginSpecialFX< Effect8 >.

2021{UNUSED_PARAM(oldOwner);}

◆ DeleteAllRefsToMe()

CoreExport RefResult DeleteAllRefsToMe ( )
overridevirtual

Deletes all references to this ReferenceTarget.

implemented by the System. Deletes all references to this ReferenceTarget.

Returns
always returns REF_SUCCEED.

Reimplemented from ReferenceMaker.

◆ TransferReferences()

CoreExport RefResult TransferReferences ( RefTargetHandle  oldTarget,
BOOL  delOld = FALSE 
)

Transfers all the references from oldTarget to this.

Implemented by the System. This method is used to transfer all the references from oldTarget to this reference target.

Parameters
oldTarget- The previous reference target.
delOld- If this is TRUE the previous reference target is deleted.
Returns
Always returns REF_SUCCEED.

◆ DoEnumDependents()

CoreExport int DoEnumDependents ( DependentEnumProc dep)

Begins an enumeration that searches back in the dependency network.

Implemented by the System. This method is called to initiate an enumeration of all the references to the ReferenceTarget. This method prepares the DependentEnumProc for enumeration, and calls DoEnumDependentsImpl on the ReferenceTarget. To enumerate the down the reference hierarchy, see EnumRefHierarchy.

Parameters
dep- The callback object called for each dependent.
Returns
Return 1 to stop the enumeration and 0 to continue.
See also
EnumRefHierarchy

◆ Clone()

virtual 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* Clone(RemapDir& remap)
{
ReferenceTarget* result = new MyDerivedPlugin();
BaseClone(this, result, remap);
return result;
}
void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap)
{
if (!to || !from || from == to)
return;
MyBasePlugin::BaseClone(from, to, remap);
to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE)));
}
};
virtual CoreExport RefTargetHandle GetReference(int i)
Returns the 'i-th' reference.
CoreExport RefResult ReplaceReference(int which, RefTargetHandle newtarg, BOOL delOld=TRUE)
Used when cloning reference makers.
A scene entity that is being owned and listened to by other scene entities.
Definition: ref.h:1849
For remapping references during a Clone.
Definition: ref.h:830
virtual RefTargetHandle CloneRef(RefTargetHandle oldTarg)
Creates a clone of a reference target only if it hasn't been cloned already.

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 in EaseCurveList, MultCurveList, DummyObject, SphereGizmoObject, CylGizmoObject, BoxGizmoObject, CollisionPlane, CollisionSphere, CollisionMesh, LinearShape, DADBitmapCarrier, MtlLib, MtlBaseLib, DefNoteTrack, PatchObject, PolyObject, SimpleOSMToWSMMod, SimpleOSMToWSMMod2, SplineShape, TriObject, MSCustAttrib, MSPluginGeomObject, MSGeomObjectXtnd, MSPluginHelper, MSHelperXtnd, MSPluginLight, MSLightXtnd, MSPluginCamera, MSCameraXtnd, MSPluginShape, MSShapeXtnd, MSPluginSimpleObject, MSSimpleObjectXtnd, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, MSPluginSimpleMod, MSSimpleModXtnd, MSPluginTexmap, MSTexmapXtnd, MSPluginMtl, MSMtlXtnd, MSPluginEffect, MSEffectXtnd, MSPluginAtmos, MSAtmosXtnd, MSPluginTrackViewUtility, UnifiedRenderer, PFSimpleAction, SimpleShape, and SimpleSpline.

◆ BaseClone()

virtual CoreExport void BaseClone ( ReferenceTarget from,
ReferenceTarget to,
RemapDir remap 
)
virtual

This method copies base class data from an object to its clone.

This method is available in release 4.0 and later only. Virtual method.

Note
All plugins that implement a Clone() method have to call this BaseClone() method from that Clone() method with the old and the new object as parameters. The ordering in regards to when this method is called is unimportant, however this method must, of course, be called after the cloned object is created. This method allows base classes to copy their data into a new object created by the clone operation. As described in the Clone method, the Clone method should just create a new instance and then call the BaseClone method. The BaseClone method should then clones any references and sets any other necessary data. This allows classes that derive from this class to clone cleanly. See the Clone method documentation for a code example. All overrides of BaseClone() must call the base class implementation. The base class implementation copies the CustAttrib objects into the newly created object.
Parameters
from- Points to the old object to clone.
to- Points to the new object created.
remap- This class is used for remapping references during a Clone.

Reimplemented in Control, and MtlBase.

◆ NotifyDependents()

CoreExport RefResult NotifyDependents ( const Interval changeInt,
PartID  partID,
RefMessage  message,
SClass_ID  sclass = NOTIFY_ALL,
BOOL  propagate = TRUE,
RefTargetHandle  hTarg = nullptr,
NotifyDependentsOption  notifyDependentsOption = REFNOTIFY_ALLOW_OPTIMIZATIONS 
)
overridevirtual

Notify all dependent RefMakers concerned with the message.

Implemented by the System. This method broadcasts the message specified by the message parameter to all the items which reference this item. Note the following on how reference messages propagate (that is, travel to the dependents):

  • When a plugin sends a message via NotifyDependents(), the message
    1. Propagates to ALL the items that reference it.
    2. And also to all the items which reference those items.
    3. And so on.
  • The only exceptions to this are as follows:
  1. The propagate parameter passed is FALSE. In that case the message only goes to the immediate dependents.
  2. If the SClass_ID sclass = NOTIFY_ALL parameter limits the dependents to a certain specified Super Class.
  3. If one of the items that references the plugin, processes the message inside its NotifyRefChanged() and returns REF_STOP instead of REF_SUCCEED. In this case, the message is not further propagated.

Also, whenever a message propagates, the hTarget parameter received in NotifyRefChanged() is reset to the this pointer of the immediate dependent (not the originator) who propagates the message.

Parameters
changeInt- Currently all plug-ins must pass FOREVER for this interval. This indicates the interval of time over which the change reported by the message is in effect. The exception is the REFMSG_FLAGDEPENDENTS notification. In that case, changeInt.Start() is the timepoint to perform the dependency test.
partID- This parameter is used to pass message specific information to the items which will receive the message. See the ReferenceMaker::NotifiyRefChanged() method for more details.
message- The message to broadcast to all dependents. See the ReferenceMaker::NotifiyRefChanged() method for more details.
sclass- This parameter defaults to NOTIFY_ALL. If this value is passed to NotifyDependents() all dependents will be notified. Other super class values may be passed to only send the message to certain items whose SuperClassID matches the one passed.
propagate- This parameter defaults to TRUE. This indicates that the message should be sent to all 'nested' dependencies. If passed as FALSE, this parameter indicates the message should only be sent to first level dependents. Normally this should be left to default to TRUE.
hTarg- This parameter must always default to NULL.
notifyDependentsOption- This parameter specifies whether duplicate messages to the same refmaker can potentially be optimized away
Returns
This method always returns REF_SUCCEED.

Reimplemented from ReferenceMaker.

◆ FlagDependents()

void FlagDependents ( TimeValue  t,
PartID  which = PART_PUT_IN_FG 
)
inline

This sends the REFMSG_FLAGDEPENDENTS message up the pipeline.

This sends the REFMSG_FLAGDEPENDENTS message up the pipeline. There are two reasons to flag dependents:

  1. To put the node in the FG plane. (PART_PUT_IN_FG)
  2. To set the node's mesh color to green to indicate it is a dependent. (PART_SHOW_DEPENDENCIES). If the PART_SHOWDEP_ON bit is set, the dependency display is turned on, otherwise it is turned off.
    Parameters
    t- the timepoint to perform the dependency test.
    which- The part id that is sent with REFMSG_FLAGDEPENDENTS
2193 {
2195 }
Definition: interval.h:36
CoreExport RefResult NotifyDependents(const Interval &changeInt, PartID partID, RefMessage message, SClass_ID sclass=NOTIFY_ALL, BOOL propagate=TRUE, RefTargetHandle hTarg=nullptr, NotifyDependentsOption notifyDependentsOption=REFNOTIFY_ALLOW_OPTIMIZATIONS) override
Notify all dependent RefMakers concerned with the message.
#define REFMSG_FLAGDEPENDENTS
Used Internally.
Definition: ref.h:254

◆ NotifyForeground()

virtual void NotifyForeground ( TimeValue  t)
inlinevirtual

This method is called to flag dependents into the FG.

This method is called to flag dependents into the FG. (Note that the above method is obsolete) The default implementation just sends out the notification REFMSG_FLAGDEPENDENTS with PART_PUT_IN_FG as the partID. In particular, a driven controller could override this method and call its driver's version of this method

2205 {
2207 }
const PartID PART_PUT_IN_FG
Put in Foreground.
Definition: ref.h:167

◆ NotifyTarget()

virtual void NotifyTarget ( int  message,
ReferenceMaker hMaker 
)
inlinevirtual

Sends messages to ReferenceTargets.

This method is available in release 4.0 and later only. Used by a ReferenceMaker to send 'reverse' notification messages to its ReferenceTargets, or to this ReferenceTarget.

Parameters
message- The message sent to the reference target.
hMaker- The ReferenceMaker sending the message.

Reimplemented in PFSimpleAction.

2216{ UNUSED_PARAM(message); UNUSED_PARAM(hMaker); }

◆ GetInterface() [1/2]

◆ GetInterface() [2/2]

◆ DoEnumDependentsImpl()

CoreExport int DoEnumDependentsImpl ( DependentEnumProc dep)
overrideprotectedvirtual

Method to perform an enumeration on a ReferenceTarget.

Implemented by the System. This method is initially called by DoEnumDependents. This method allows a ReferenceTarget to call the given callback object's proc on itself, and then optionally enumerate all references to it. How to continue enumeration is based on the return value from the callback object's proc. All ReferenceTargets have a list of back pointers to entities that directly reference it. The default implementation of this method first checks to see if this ReferenceTarget was previously processed as part of the enumeration, and if so immediately returns 0. If the ReferenceTarget was not previously processed, it calls the callback object's proc on itself and then, dependent on the return value from the callback object's proc, enumerates those back pointers calling DoEnumDependentsImpl once per dependent. Normally you will not need to override this method. If you do override this method, you should use DependentEnumProc::CheckIfAndSetAsVisited to process your instance and its dependents only if it was not previously processed.

Parameters
dep- The callback object called for each dependent.
Returns
Return 1 to stop the enumeration and 0 to continue.
See also
DependentEnumProc::CheckIfAndSetAsVisited(ReferenceMaker *rmaker)
// If already processed this reftarg once, no need to process it or its dependents again
if (dep->CheckIfAndSetAsVisited(this))
return 0;
int res = dep->proc(this);
if (res == DEP_ENUM_SKIP)
return 0;
else if (res)
return 1;
return mOwner.ProcessEnumDependents(dep);
}
A callback class for enumerating dependents.
Definition: ref.h:990
virtual int proc(ReferenceMaker *rmaker)=0
This is the method called by system from ReferenceTarget::DoEnumDependentsImpl().
CoreExport bool CheckIfAndSetAsVisited(ReferenceMaker *rmaker)
This method sets and checks whether a ReferenceMaker was visited.
int DoEnumDependentsImpl(DependentEnumProc *dep)
Allows a reference target to enumerate all references to it.
#define DEP_ENUM_SKIP
Skip enumeration.
Definition: ref.h:984

Reimplemented from ReferenceMaker.

Friends And Related Function Documentation

◆ DependentIterator

friend class DependentIterator
friend

◆ DeleteRefRestore

friend class DeleteRefRestore
friend

◆ MakeRefRestore

friend class MakeRefRestore
friend

◆ ReferenceMaker

friend class ReferenceMaker
friend