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

This is the base class for objects and modifiers. More...

#include <object.h>

+ Inheritance diagram for BaseObject:

Public Member Functions

virtual CoreExport unsigned long GetObjectDisplayRequirement () const
 
virtual CoreExport bool PrepareDisplay (const MaxSDK::Graphics::UpdateDisplayContext &prepareDisplayContext)
 
virtual CoreExport bool UpdatePerNodeItems (const MaxSDK::Graphics::UpdateDisplayContext &updateDisplayContext, MaxSDK::Graphics::UpdateNodeContext &nodeContext, MaxSDK::Graphics::IRenderItemContainer &targetRenderItemContainer)
 
virtual CoreExport bool UpdatePerViewItems (const MaxSDK::Graphics::UpdateDisplayContext &updateDisplayContext, MaxSDK::Graphics::UpdateNodeContext &nodeContext, MaxSDK::Graphics::UpdateViewContext &viewContext, MaxSDK::Graphics::IRenderItemContainer &targetRenderItemContainer)
 
virtual CoreExport const MaxSDK::Graphics::RenderItemHandleArrayGetRenderItems () const
 
virtual CoreExport voidGetInterface (ULONG id) override
 
virtual CoreExport BaseInterfaceGetInterface (Interface_ID id) override
 
CoreExport BaseObject ()
 
virtual CoreExport ~BaseObject ()
 
virtual BOOL HasViewDependentBoundingBox ()
 This method return true if GetWorldBoundBox returns different boxes for different viewports.
 
Object Level Display, Hit Test, Snap, and Bounding Box Methods
virtual int HitTest (TimeValue t, INode *inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt)
 This method is called to determine if the specified screen point intersects the item.
 
virtual void SetExtendedDisplay (int flags)
 This method is used for storing mode-dependent display attributes.
 
virtual int Display (TimeValue t, INode *inode, ViewExp *vpt, int flags)
 This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).
 
virtual void Snap (TimeValue t, INode *inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt)
 Checks the point passed for a snap and updates the SnapInfo structure.
 
virtual void GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vp, Box3 &box)
 This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).
 
virtual void GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vp, Box3 &box)
 This is the object space bounding box, the box in the object's local coordinates.
 
Object Name and Create Callback
virtual CreateMouseCallBackGetCreateMouseCallBack ()=0
 This method allows the system to retrieve a callback object used in creating an object in the 3D viewports.
 
 __declspec (deprecated) virtual const MCHAR *GetObjectName() MAX_SEALED
 
virtual const MCHARGetObjectName (bool localized) const
 
Topology Methods
virtual CoreExport BOOL OKToChangeTopology (MSTR &modName)
 Implemented by the System.
 
virtual BOOL ChangeTopology ()
 This method asks the question of an object or modifier "Do you change topology"? An object or modifier returns TRUE if it is capable of changing topology when its parameters are being edited; otherwise FALSE.
 
virtual void ForceNotify (Interval &i)
 Notifies dependents of a change.
 
Parameter Block Access
virtual IParamArrayGetParamBlock ()
 An object or modifier should implement this method if it wishes to make its parameter block available for other plug-ins to access it.
 
virtual IParamBlock2GetParamBlock (int i) override
 An object or modifier should implement this method if it wishes to make its parameter block available for other plug-ins to access it.
 
virtual int GetParamBlockIndex (int id)
 If a plug-in makes its parameter block available (using GetParamBlock()) then it will need to provide #defines for indices into the parameter block.
 
Sub-Object Selection - Affine transformation methods
virtual void Move (TimeValue t, Matrix3 &partm, Matrix3 &tmAxis, Point3 &val, BOOL localOrigin=FALSE)
 When this method is called the plug-in should respond by moving its selected sub-object components.
 
virtual void Rotate (TimeValue t, Matrix3 &partm, Matrix3 &tmAxis, Quat &val, BOOL localOrigin=FALSE)
 When this method is called the plug-in should respond by rotating its selected sub-object components.
 
virtual void Scale (TimeValue t, Matrix3 &partm, Matrix3 &tmAxis, Point3 &val, BOOL localOrigin=FALSE)
 When this method is called the plug-in should respond by scaling its selected sub-object components.
 
virtual void TransformStart (TimeValue t)
 This method is called before the first Move(), Rotate() or Scale() call and before a hold is in effect.
 
virtual void TransformHoldingStart (TimeValue t)
 This method is called before the first Move(), Rotate() or Scale() call and after a hold is in effect.
 
virtual void TransformHoldingFinish (TimeValue t)
 This method is called after the user has completed the Move(), Rotate() or Scale() operation and before the undo object has been accepted.
 
virtual void TransformFinish (TimeValue t)
 This method is called after the user has completed the Move(), Rotate() or Scale() operation and the undo object has been accepted.
 
virtual void TransformCancel (TimeValue t)
 This method is called when the transform operation is canceled by a right-click and the undo has been canceled.
 
Sub-Object Selection Methods

These methods are for sub-object selection.

If the derived class is NOT a modifier, the modContext pointer passed to some of these methods will be NULL.

virtual int HitTest (TimeValue t, INode *inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt, ModContext *mc)
 This method is used in modifier gizmo hit testing.
 
virtual int Display (TimeValue t, INode *inode, ViewExp *vpt, int flags, ModContext *mc)
 When this method is called the plug-in should respond by performing a quick render of the modifier gizmo in viewport using the current TM.
 
virtual void GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box, ModContext *mc)
 This method computes the world space bounding box of the modifier gizmo (or any object that when in sub-object mode has a gizmo).
 
virtual void CloneSelSubComponents (TimeValue t)
 This method is called to make a copy of the selected sub-object components of the item.
 
virtual void AcceptCloneSelSubComponents (TimeValue t)
 This method is called when the user mouses up after shift-cloning a sub-object selection.
 
virtual void SelectSubComponent (HitRecord *hitRec, BOOL selected, BOOL all, BOOL invert=FALSE)
 This method is called to change the selection state of the component identified by hitRec.
 
virtual void ClearSelection (int selLevel)
 This method is called to clear the selection for the given sub-object level.
 
virtual void SelectAll (int selLevel)
 This method is called to select every element of the given sub-object level.
 
virtual void InvertSelection (int selLevel)
 This method is called to invert the specified sub-object level.
 
virtual int SubObjectIndex (HitRecord *hitRec)
 Returns the index of the sub-object element identified by the HitRecord hitRec.
 
virtual void ActivateSubobjSel (int level, XFormModes &modes)
 When the user changes the selection of the sub-object drop down, this method is called to notify the plug-in.
 
virtual BOOL SupportsNamedSubSels ()
 An object that supports sub-object selection can choose to support named sub object selection sets.
 
virtual void ActivateSubSelSet (MSTR &setName)
 When the user chooses a name from the drop down list this method is called.
 
virtual void NewSetFromCurSel (MSTR &setName)
 If the user types a new name into the named selection set drop down then this method is called.
 
virtual void RemoveSubSelSet (MSTR &setName)
 If the user selects a set from the drop down and then chooses Remove Named Selections from the Edit menu this method is called.
 
virtual void SetupNamedSelDropDown ()
 To support the Edit Named Selections dialog, plug-ins must implement this method.
 
virtual int NumNamedSelSets ()
 To support the Edit Named Selections dialog, plug-ins must implement this method.
 
virtual MSTR GetNamedSelSetName (int i)
 To support the Edit Named Selections dialog, plug-ins must implement this method.
 
virtual void SetNamedSelSetName (int i, MSTR &newName)
 To support the Edit Named Selections dialog, plug-ins must implement this method.
 
virtual void NewSetByOperator (MSTR &newName, Tab< int > &sets, int op)
 To support the Edit Named Selections dialog, plug-ins must implement this method.
 
Sub-Object Centers and TMs

New way of dealing with sub object coordinate systems.

Plug-in enumerates its centers or TMs and calls the callback once for each. NOTE:cb->Center() should be called the same number of times and in the same order as cb->TM() NOTE: The SubObjAxisCallback class is defined in animatable and used in both the controller version and this version of GetSubObjectCenters() and GetSubObjectTMs()

virtual void GetSubObjectCenters (SubObjAxisCallback *cb, TimeValue t, INode *node, ModContext *mc)
 When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis.
 
virtual void GetSubObjectTMs (SubObjAxisCallback *cb, TimeValue t, INode *node, ModContext *mc)
 When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis.
 
virtual void NotifyPreCollapse (INode *node, IDerivedObject *derObj, int index)
 This method is called before a modifier or object is collapsed.
 
virtual void NotifyPostCollapse (INode *node, Object *obj, IDerivedObject *derObj, int index)
 This method is called after a modifier or object is collapsed.
 
virtual int NumSubObjTypes ()
 Objects and modifiers that support subobjects have to overwrite this method - as well as GetSubObjType() - and return a class derived from ISubObjType in GetSubObjType().
 
virtual ISubObjTypeGetSubObjType (int i)
 Returns a pointer to the sub-object type for the sub-object whose index is passed.
 
virtual CoreExport int GetSubObjectLevel ()
 This method returns an integer which indicates the current sub-object level of the modifier or base object.
 
UVW Methods
virtual BOOL HasUVW ()
 Call this method to find out if the object has UVW coordinates.
 
virtual BOOL HasUVW (int mapChannel)
 Call this method to find out if the object is has UVW coordinates for the specified mapping channel.
 
virtual void SetGenUVW (BOOL sw)
 This method is called to change the state of its Generate UVW boolean.
 
virtual void SetGenUVW (int mapChannel, BOOL sw)
 This method is called to change the state of its Generate UVW boolean for the specified mapping channel.
 
virtual void ShowEndResultChanged (BOOL showEndResult)
 This method notifies the BaseObject that the end result display has been switched (the "Show End Result" button has been toggled).
 
- Public Member Functions inherited from ReferenceTarget
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.
 
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.
 
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.
 
CoreExport int DoEnumDependents (DependentEnumProc *dep)
 Begins an enumeration that searches back in the dependency network.
 
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.
 
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.
 
CoreExport voidGetInterface (ULONG id) override
 Inherited from Animatable.
 
CoreExport BaseInterfaceGetInterface (Interface_ID id) override
 Inherited from Animatable.
 
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.
 
- 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 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 Attributes

MaxSDK::Graphics::RenderItemHandleArray mRenderItemHandles
 
- Protected Attributes inherited from Animatable
DWORD aflag
 
AnimPropertyList aprops
 

Friends

class ModifyTaskImp
 

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 Member Functions inherited from ReferenceTarget
CoreExport int DoEnumDependentsImpl (DependentEnumProc *dep) override
 Method to perform an enumeration on a ReferenceTarget.
 
virtual CoreExport ~ReferenceTarget ()=0
 Destructor.
 
- 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 ()
 

Detailed Description

This is the base class for objects and modifiers.

Anything with a representation in the 3D viewports is derived from BaseObject (including modifiers and controllers whose gizmos appear in the viewports). The methods here are things such as displaying the object in the viewports, checking for intersection of the object and points the user clicks with the mouse, snapping to the object, and computing various bounding boxes for the object. Also there are methods for returning the name of the object to appear in the modifier stack, a method to deal with creating the object in the viewports (if appropriate), and named selection set related methods. There are also methods that allow other plug-ins to access the changeable parameters of the object. Finally there are several method that deal with sub-object selection, sub-object display, sub-object hit testing, and moving/rotating/scaling sub-object components of the object.

See also
Class ReferenceTarget, Class INode, Class ViewExp, Class Box3, Class IPoint2
Class Matrix3, Structure SnapInfo, Class Point3, Class CreateMouseCallBack
Template Class Tab, Class Interface.

Constructor & Destructor Documentation

◆ BaseObject()

◆ ~BaseObject()

virtual CoreExport ~BaseObject ( )
virtual

Member Function Documentation

◆ GetObjectDisplayRequirement()

◆ PrepareDisplay()

◆ UpdatePerNodeItems()

◆ UpdatePerViewItems()

◆ GetRenderItems()

◆ GetInterface() [1/2]

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

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

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

#define GetControlInterface(anim)
virtual CoreExport void * GetInterface(ULONG id) override
Definition: control.h:1055
#define I_CONTROL
An Animatable supporting this interface is a Control.
Definition: AnimatableInterfaceIDs.h:33
A plug-in developer may use this macro as follows:

Control *c = GetControlInterface(anim);

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

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

#define I_USERINTERFACE 0x0000ffff

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

void* Control::GetInterface(ULONG id)
{
if (id==I_CONTROL) {
return this;
}
else {
}
}
virtual CoreExport void * GetInterface(ULONG id)
CoreExport void * GetInterface(ULONG id)

Reimplemented from Animatable.

Reimplemented in IDerivedObject, PatchObject, SimpleObjectBase, SimpleParticle, SplineShape, TriObject, 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 >, MSPluginSimpleObject, MSSimpleObjectXtnd, MSSimpleObjectXtnd, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSSimpleManipulatorXtnd, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSModifierXtnd, MSPluginSimpleMod, MSSimpleModXtnd, MSSimpleModXtnd, IDerivedObject, Object, LightObject, ShapeObject, WSMObject, SimplePolyObject, and SplineShape.

◆ GetInterface() [2/2]

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

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

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

Reimplemented from Animatable.

Reimplemented in SimpleManipulator, MSPluginSimpleManipulator, MSSimpleManipulatorXtnd, PFSimpleAction, PFSimpleOperator, PFSimpleTest, IXRefObject8, 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 >, IDerivedObject, Object, LightObject, SimpleObjectBase, TriObject, ShapeObject, SimplePolyObject, and SplineShape.

◆ HitTest() [1/2]

virtual int HitTest ( TimeValue  t,
INode inode,
int  type,
int  crossing,
int  flags,
IPoint2 p,
ViewExp vpt 
)
inlinevirtual

This method is called to determine if the specified screen point intersects the item.

The method returns nonzero if the item was hit; otherwise 0.

Parameters
tThe time to perform the hit test.
inodeA pointer to the node to test.
typeThe type of hit testing to perform. See Scene and Node Hit Test Types. for details.
crossingThe state of the crossing setting. If TRUE crossing selection is on.
flagsThe hit test flags. See Scene and Node Hit Testing Flags for details.
pThe screen point to test.
vptAn interface pointer that may be used to call methods associated with the viewports.
Returns
Nonzero if the item was hit; otherwise 0.

Reimplemented in DummyObject, GizmoObject, LinearShape, PatchObject, PolyObject, SimpleObjectBase, SimpleWSMObject, SimpleParticle, SimpleShape, SimpleSpline, SplineShape, TriObject, ShapeObject, SimplePolyObject, 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 >, MSHelperXtnd, MSLightXtnd, MSCameraXtnd, MSShapeXtnd, MSSimpleObjectXtnd, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, SimpleManipulator, and Manipulator.

575{return 0;};

◆ SetExtendedDisplay()

virtual void SetExtendedDisplay ( int  flags)
inlinevirtual

This method is used for storing mode-dependent display attributes.

Before an object's Display() method is called, the appropriate bits of the extended display flag variable are set and this method is called. After that, the Display() method is called. If the object must display itself differently based on the settings of the extended display bit fields, then the object must save the flags passed into the this method. Otherwise, there is no need for the object to store the flags.

Parameters
flagsThe flags to store.

Reimplemented in MSObjectXtnd< GenCamera, MSPluginCamera >, MSObjectXtnd< GeomObject, MSPluginGeomObject >, MSObjectXtnd< HelperObject, MSPluginHelper >, MSObjectXtnd< GenLight, MSPluginLight >, MSObjectXtnd< ShapeObject, MSPluginShape >, and MSModifierXtnd.

586{}

◆ Display() [1/2]

virtual int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  flags 
)
inlinevirtual

This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).

Note: For this method to be called the object's validity interval must be invalid at the specified time t. If the interval is valid, the system may not call this method since it thinks the display is already valid.

Parameters
tThe time to display the object.
inodeThe node to display.
vptAn interface pointer that may be used to call methods associated with the viewports.
flagsSee Display Flags.
Returns
Default return value is -1, means this object doesn't have display function. 0 means it didn't draw anything in current frame. Otherwise return positive values..

Reimplemented in DummyObject, GizmoObject, LinearShape, PatchObject, PolyObject, SimpleObjectBase, SimpleWSMObject, SimpleParticle, SimpleShape, SimpleSpline, SplineShape, TriObject, ShapeObject, SimplePolyObject, 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 >, MSHelperXtnd, MSLightXtnd, MSCameraXtnd, MSSimpleObjectXtnd, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, SimpleManipulator, and Manipulator.

599{ return -1; };

◆ Snap()

virtual void Snap ( TimeValue  t,
INode inode,
SnapInfo snap,
IPoint2 p,
ViewExp vpt 
)
inlinevirtual

Checks the point passed for a snap and updates the SnapInfo structure.

Note
Developers wanting to find snap points on an Editable Mesh object should see the method XmeshSnap::Snap() in /MAXSDK/SAMPLES/SNAPS/XMESH/XMESH.CPP.
Parameters
tThe time to check.
inodeThe node to check.
snapThe snap info structure to update.
pThe screen point to check.
vptAn interface pointer that may be used to call methods associated with the viewports.

Reimplemented in DummyObject, LinearShape, PatchObject, PolyObject, SimpleObjectBase, SimpleWSMObject, SimpleShape, SimpleSpline, SplineShape, TriObject, 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 >, MSHelperXtnd, MSLightXtnd, MSCameraXtnd, MSSimpleObjectXtnd, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, MSSimpleModXtnd, and SimplePolyObject.

610{}

◆ GetWorldBoundBox() [1/2]

virtual void GetWorldBoundBox ( TimeValue  t,
INode inode,
ViewExp vp,
Box3 box 
)
inlinevirtual

This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).

The bounding box returned by this method does not need to be precise. It should however be calculated rapidly. The object can handle this by transforming the 8 points of its local bounding box into world space and take the minimums and maximums of the result. Although this isn't necessarily the tightest bounding box of the objects points in world space, it is close enough.

Parameters
tThe time to compute the bounding box.
inodeThe node to calculate the bounding box for.
vpAn interface pointer that can be used to call methods associated with the viewports.
boxContains the returned bounding box.

Reimplemented in MSHelperXtnd, MSLightXtnd, MSCameraXtnd, GizmoObject, LinearShape, SimpleManipulator, PatchObject, PolyObject, SimpleObjectBase, SimpleWSMObject, SimpleParticle, SimpleShape, SimpleSpline, SplineShape, TriObject, 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 >, MSSimpleObjectXtnd, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, SimplePolyObject, and DummyObject.

623{};

◆ GetLocalBoundBox()

virtual void GetLocalBoundBox ( TimeValue  t,
INode inode,
ViewExp vp,
Box3 box 
)
inlinevirtual

This is the object space bounding box, the box in the object's local coordinates.

The system expects that requesting the object space bounding box will be fast.

Parameters
tThe time to retrieve the bounding box.
inodeThe node to calculate the bounding box for.
vpAn interface pointer that may be used to call methods associated with the viewports.
boxContains the returned bounding box.

Reimplemented in Manipulator, MSHelperXtnd, MSLightXtnd, MSCameraXtnd, GizmoObject, LinearShape, SimpleManipulator, PatchObject, PolyObject, SimpleObjectBase, SimpleWSMObject, SimpleParticle, SplineShape, TriObject, 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 >, MSSimpleObjectXtnd, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, MSSimpleModXtnd, SimplePolyObject, SimpleShape, SimpleSpline, and DummyObject.

632{};

◆ GetCreateMouseCallBack()

virtual CreateMouseCallBack * GetCreateMouseCallBack ( )
pure virtual

◆ __declspec()

__declspec ( deprecated  ) const
inline
Note
This method has been deprecated in terms of implementation as of 3ds Max 2022. Plugin developers should implement GetObjectName(bool localized) const instead. This method can no longer be overriden and calls to it are now forwarded to the function that replaced it with a "bool localized" value of true. This is done so that plugin developers who do not localize their plugins don't have to update all the places where they call this method. Plugin developers who do localize their plugins should analyze the places where they call this method to decide what value to pass it for the "bool localized" parameter.
See also
BaseObject::GetObjectName(bool localized) const
654 {
655 return GetObjectName(true);
656 }
virtual const MCHAR * GetObjectName(bool localized) const
Definition: object.h:662

◆ GetObjectName()

virtual const MCHAR * GetObjectName ( bool  localized) const
inlinevirtual
Returns
the name that will appear in the modifier stack.
Parameters
localizedIf true, then the object name returned should be localized in the language 3ds Max is currently using. Otherwise it should be the object name in English. If a plugin does not provide localized string resources, it can disregard this parameter and always return the object name in English.

Reimplemented in PFSimpleAction, DummyObject, SphereGizmoObject, CylGizmoObject, BoxGizmoObject, LinearShape, 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 >, MSPluginSimpleObject, MSSimpleObjectXtnd, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMod, MSSimpleModXtnd, PatchObject, PolyObject, SimpleOSMToWSMMod, SimpleOSMToWSMMod2, SplineShape, and TriObject.

662{ return _M("Object"); }
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67

◆ OKToChangeTopology()

virtual CoreExport BOOL OKToChangeTopology ( MSTR modName)
virtual

Implemented by the System.

This method is called to see if any modifiers down in the pipeline depend on topology. It sends the message REFMSG_IS_OK_TO_CHANGE_TOPOLOGY to see if any modifiers or objects down the pipeline depend on topology.

Parameters
modNameThis parameter is set to the dependent modifier's name if there is an item that depends on topology.
Returns
TRUE if it is okay to change the topology; FALSE if it is not okay to change the topology.

Reimplemented in PFSimpleAction.

◆ ChangeTopology()

virtual BOOL ChangeTopology ( )
inlinevirtual

This method asks the question of an object or modifier "Do you change topology"? An object or modifier returns TRUE if it is capable of changing topology when its parameters are being edited; otherwise FALSE.

When an item is selected for editing, and there is a modifier in the pipeline that depends on topology, the system calls this method to see if it may potentially change the topology. If this method returns TRUE the system will put up a warning message indicating that a modifier exists in the stack that depends on topology.

Reimplemented in SimpleWSMMod, MSModifierXtnd, MSPluginSimpleMeshMod, MSSimpleModXtnd, and SimpleModBase.

688{return TRUE;}

◆ ForceNotify()

virtual void ForceNotify ( Interval i)
inlinevirtual

Notifies dependents of a change.

Reimplemented in Modifier.

692 {
694 }
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_CHANGE
Sent to dependents of a ReferenceTarget that has changed in some way.
Definition: ref.h:251
const PartID PART_ALL
Combination of ALL_CHANNELS and PART_TM.
Definition: ref.h:92

◆ GetParamBlock() [1/2]

virtual IParamArray * GetParamBlock ( )
inlinevirtual

An object or modifier should implement this method if it wishes to make its parameter block available for other plug-ins to access it.

The system itself doesn't actually call this method. This method is optional.

Returns
A pointer to the item's parameter block. See Class IParamArray.

Reimplemented in SimpleWSMMod, SimpleWSMObject, SimpleParticle, SimpleShape, SimpleSpline, SimpleMod, and SimpleObject.

704{return nullptr;}

◆ GetParamBlock() [2/2]

virtual IParamBlock2 * GetParamBlock ( int  i)
inlineoverridevirtual

An object or modifier should implement this method if it wishes to make its parameter block available for other plug-ins to access it.

The system itself doesn't actually call this method. This method is optional.

Returns
A pointer to the item's parameter block. See Class IParamArray.

Reimplemented from Animatable.

Reimplemented in DynamModObject, PFSimpleAction, 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 >, MSPluginSimpleObject, MSSimpleObjectXtnd, MSPluginSimpleSpline, MSPluginSimpleManipulator, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMod, MSSimpleModXtnd, SimplePolyObject, SimpleMod2, and SimpleObject2.

virtual IParamBlock2 * GetParamBlock(int i)
Definition: Animatable.h:2558

◆ GetParamBlockIndex()

virtual int GetParamBlockIndex ( int  id)
inlinevirtual

If a plug-in makes its parameter block available (using GetParamBlock()) then it will need to provide #defines for indices into the parameter block.

These defines should not be directly used with the parameter block but instead converted by this function that the plug-in implements. This way if a parameter moves around in a future version of the plug-in the #define can be remapped. A return value of -1 indicates an invalid parameter id.

Parameters
idThe parameter block id. See Parameter Block IDs.
Returns
The parameter block index or -1 if it is invalid.

Reimplemented in SimpleWSMMod, SimpleWSMObject, SimpleParticle, SimpleShape, SimpleSpline, SimpleMod, and SimpleObject.

719{return -1;}

◆ Move()

virtual void Move ( TimeValue  t,
Matrix3 partm,
Matrix3 tmAxis,
Point3 val,
BOOL  localOrigin = FALSE 
)
inlinevirtual

When this method is called the plug-in should respond by moving its selected sub-object components.

Parameters
tThe time of the transformation.
partmThe 'parent' transformation matrix. This matrix represents a transformation that would take points in the modifier's space and convert them into world space points. This is constructed as the node's transformation matrix times the inverse of the ModContext's transformation matrix. The node whose transformation is used is the node the user clicked on in the scene - modifiers can be instanced so there could be more than one node.
tmAxisThe matrix that represents the axis system. This is the space in which the transformation is taking place.
valThis value is a vector with X, Y, and Z representing the movement along each axis.
localOriginWhen TRUE the transformation is occurring about the sub-object's local origin.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, MSModifierXtnd, and SimpleModBase.

738{}

◆ Rotate()

virtual void Rotate ( TimeValue  t,
Matrix3 partm,
Matrix3 tmAxis,
Quat val,
BOOL  localOrigin = FALSE 
)
inlinevirtual

When this method is called the plug-in should respond by rotating its selected sub-object components.

Parameters
tThe time of the transformation.
partmThe 'parent' transformation matrix. This matrix represents a transformation that would take points in the modifier's space and convert them into world space points. This is constructed as the node's transformation matrix times the inverse of the ModContext's transformation matrix. The node whose transformation is used is the node the user clicked on in the scene - modifiers can be instanced so there could be more than one node.
tmAxisThe matrix that represents the axis system. This is the space in which the transformation is taking place.
valThe amount to rotate the selected components.
localOriginWhen TRUE the transformation is occurring about the sub-object's local origin. Note: This information may be passed onto a transform controller (if there is one) so they may avoid generating 0 valued position keys for rotation and scales. For example if the user is rotating an item about anything other than its local origin then it will have to translate in addition to rotating to achieve the result. If a user creates an object, turns on the animate button, and rotates the object about the world origin, and then plays back the animation, the object does not do what the was done interactively. The object ends up in the same position, but it does so by both moving and rotating. Therefore both a position and a rotation key are created. If the user performs a rotation about the local origin however there is no need to create a position key since the object didn't move (it only rotated). So a transform controller can use this information to avoid generating 0 valued position keys for rotation and scales.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, MSModifierXtnd, and SimpleModBase.

766{}

◆ Scale()

virtual void Scale ( TimeValue  t,
Matrix3 partm,
Matrix3 tmAxis,
Point3 val,
BOOL  localOrigin = FALSE 
)
inlinevirtual

When this method is called the plug-in should respond by scaling its selected sub-object components.

Parameters
tThe time of the transformation.
partmThe 'parent' transformation matrix. This matrix represents a transformation that would take points in the modifier's space and convert them into world space points. This is constructed as the node's transformation matrix times the inverse of the ModContext's transformation matrix. The node whose transformation is used is the node the user clicked on in the scene - modifiers can be instanced so there could be more than one node.
tmAxisThe matrix that represents the axis system. This is the space in which the transformation is taking place.
valThis value is a vector with X, Y, and Z representing the scale along X, Y, and Z respectively.
localOriginWhen TRUE the transformation is occurring about the sub-object's local origin. See the note above in the Rotate method. The following methods may be used to receive notification about the starting and ending phases of transforming the item when in sub-object selection.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, MSModifierXtnd, and SimpleModBase.

786{}

◆ TransformStart()

virtual void TransformStart ( TimeValue  t)
inlinevirtual

This method is called before the first Move(), Rotate() or Scale() call and before a hold is in effect.

Parameters
tThe current time when this method is called.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

791{}

◆ TransformHoldingStart()

virtual void TransformHoldingStart ( TimeValue  t)
inlinevirtual

This method is called before the first Move(), Rotate() or Scale() call and after a hold is in effect.

Parameters
tThe current time when this method is called.

Reimplemented in MSShapeXtnd, and MSModifierXtnd.

796{}

◆ TransformHoldingFinish()

virtual void TransformHoldingFinish ( TimeValue  t)
inlinevirtual

This method is called after the user has completed the Move(), Rotate() or Scale() operation and before the undo object has been accepted.

Parameters
tThe current time when this method is called.

Reimplemented in MSShapeXtnd, and MSModifierXtnd.

802{}

◆ TransformFinish()

virtual void TransformFinish ( TimeValue  t)
inlinevirtual

This method is called after the user has completed the Move(), Rotate() or Scale() operation and the undo object has been accepted.

Parameters
tThe current time when this method is called.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

808{}

◆ TransformCancel()

virtual void TransformCancel ( TimeValue  t)
inlinevirtual

This method is called when the transform operation is canceled by a right-click and the undo has been canceled.

Parameters
tThe current time when this method is called.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

813{}

◆ HitTest() [2/2]

virtual int HitTest ( TimeValue  t,
INode inode,
int  type,
int  crossing,
int  flags,
IPoint2 p,
ViewExp vpt,
ModContext mc 
)
inlinevirtual

This method is used in modifier gizmo hit testing.

It is called to determine if the specified screen point intersects the gizmo. The method returns nonzero if the item was hit; otherwise 0.

Parameters
tThe time to perform the hit test.
inodeA pointer to the node to test.
typeThe type of hit testing to perform. See Scene and Node Hit Test Types. for details.
crossingThe state of the crossing setting. If TRUE crossing selection is on.
flagsThe hit test flags. See Scene and Node Hit Testing Flags for details.
pThe screen point to test.
vptAn interface pointer that may be used to call methods associated with the viewports.
mcA pointer to the modifiers ModContext.
Returns
Nonzero if the item was hit; otherwise 0.

Reimplemented in PatchObject, SplineShape, ShapeObject, SimpleModBase, MSShapeXtnd, MSModifierXtnd, and MSSimpleModXtnd.

835{ return 0; }

◆ Display() [2/2]

virtual int Display ( TimeValue  t,
INode inode,
ViewExp vpt,
int  flags,
ModContext mc 
)
inlinevirtual

When this method is called the plug-in should respond by performing a quick render of the modifier gizmo in viewport using the current TM.

Note for Modifiers: For this method to be called properly, one must send two reference messages using NotifyDependents. In BeginEditParams send: NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);

In EndEditParams send: NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF);

Parameters
tThe time to display the item.
inodeThe node to render.
vptAn interface pointer that may be used to call methods associated with the viewports.
flagsSee Display Flags.
mcA pointer to the modifiers ModContext.
Returns
Default return value is -1, means this object doesn't have display function. 0 means it didn't draw anything in current frame. Otherwise return positive values..

Reimplemented in PatchObject, SplineShape, SimpleModBase, MSModifierXtnd, and MSSimpleModXtnd.

851{ return -1; }; // quick render in viewport, using current TM.

◆ GetWorldBoundBox() [2/2]

virtual void GetWorldBoundBox ( TimeValue  t,
INode inode,
ViewExp vpt,
Box3 box,
ModContext mc 
)
inlinevirtual

This method computes the world space bounding box of the modifier gizmo (or any object that when in sub-object mode has a gizmo).

Parameters
tThe time to compute the bounding box.
inodeThe node to calculate the bounding box for.
vptAn interface pointer that may be used to call methods associated with the viewports.
boxThe returned bounding box.
mcA pointer to the modifiers ModContext.

Reimplemented in PatchObject, SplineShape, MSModifierXtnd, MSSimpleModXtnd, and SimpleModBase.

860{}

◆ CloneSelSubComponents()

virtual void CloneSelSubComponents ( TimeValue  t)
inlinevirtual

This method is called to make a copy of the selected sub-object components of the item.

If this is called on an object, the selection level of the object is used to determine which type of sub-objects are cloned. For instance in a Mesh, the selection level determines if selected verticies, edges or faces are cloned. If this is called on a Modifier then the selection level of the modifier is used. Modifiers call Interface::GetModContexts() to get a list of ModContexts, one for each object the modifier is applied to. Then the selected sub-objects are cloned for each object in the list.

Parameters
tThe time at which to clone the selected sub-object components.

Reimplemented in MSShapeXtnd, and MSModifierXtnd.

872{}

◆ AcceptCloneSelSubComponents()

virtual void AcceptCloneSelSubComponents ( TimeValue  t)
inlinevirtual

This method is called when the user mouses up after shift-cloning a sub-object selection.

Parameters
tThe time at which the clone of the selected components is being done.

Reimplemented in MSShapeXtnd, and MSModifierXtnd.

877{}

◆ SelectSubComponent()

virtual void SelectSubComponent ( HitRecord hitRec,
BOOL  selected,
BOOL  all,
BOOL  invert = FALSE 
)
inlinevirtual

This method is called to change the selection state of the component identified by hitRec.

Parameters
hitRecIdentifies the component whose selected state should be set. See Class HitRecord .
selectedTRUE if the item should be selected; FALSE if the item should be de-selected.
allTRUE if all components in the HitRecord chain should be selected; FALSE if only the top-level HitRecord should be selected. (A HitRecord contains a Next() pointer; typically you want to do whatever you're doing to all the Next()'s until Next() returns NULL).
invertThis is set to TRUE when all is also set to TRUE and the user is holding down the Shift key while region selecting in select mode. This indicates the items hit in the region should have their selection state inverted

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

892 {}

◆ ClearSelection()

virtual void ClearSelection ( int  selLevel)
inlinevirtual

This method is called to clear the selection for the given sub-object level.

All sub-object elements of this type should be deselected. This will be called when the user chooses Select None from the 3ds Max Edit menu.

Parameters
selLevelSpecifies the selection level to clear.

Reimplemented in SplineShape, PatchObject, MSShapeXtnd, and MSModifierXtnd.

898{}

◆ SelectAll()

virtual void SelectAll ( int  selLevel)
inlinevirtual

This method is called to select every element of the given sub-object level.

This will be called when the user chooses Select All from the 3ds Max Edit menu.

Parameters
selLevelSpecifies the selection level to select.

Reimplemented in SplineShape, PatchObject, MSShapeXtnd, and MSModifierXtnd.

904{}

◆ InvertSelection()

virtual void InvertSelection ( int  selLevel)
inlinevirtual

This method is called to invert the specified sub-object level.

If the element is selected it should be deselected. If it's deselected it should be selected. This will be called when the user chooses Select Invert from the 3ds Max Edit menu.

Parameters
selLevelSpecifies the selection level to invert.

Reimplemented in SplineShape, PatchObject, MSShapeXtnd, and MSModifierXtnd.

911{}

◆ SubObjectIndex()

virtual int SubObjectIndex ( HitRecord hitRec)
inlinevirtual

Returns the index of the sub-object element identified by the HitRecord hitRec.

See Class HitRecord. The sub-object index identifies a sub-object component. The relationship between the index and the component is established by the modifier. For example an edit modifier may allow the user to select a group of faces and these groups of faces may be identified as group 0, group 1, group 2, etc. Given a hit record that identifies a face, the edit modifier's implementation of this method would return the group index that the face belonged to.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

922{return 0;}

◆ ActivateSubobjSel()

virtual void ActivateSubobjSel ( int  level,
XFormModes modes 
)
inlinevirtual

When the user changes the selection of the sub-object drop down, this method is called to notify the plug-in.

This method should provide instances of a class derived from CommandMode to support move, rotate, non-uniform scale, uniform scale, and squash modes. These modes replace their object mode counterparts however the user still uses the move/rotate/scale tool buttons in the toolbar to activate them. If a certain level of sub-object selection does not support one or more of the modes NULL may be passed. If NULL is specified the corresponding toolbar button will be grayed out.

Parameters
levelThe sub-object selection level the command modes should be set to support. A level of 0 indicates object level selection. If level is greater than or equal to 1 the index refers to the types registered by the object in the order they appeared in the list when registered by Interface::RegisterSubObjectTypes(). See Class Interface.
modesThe command modes to support
Sample Code:
{
switch ( level ) {
case 1: // Modifier box
modes = XFormModes(moveMode,rotMode,nuscaleMode,uscaleMode,squashMode,NULL);
break;
case 2: // Modifier Center
modes = XFormModes(moveMode,NULL,NULL,NULL,NULL,NULL);
break;
}
}
#define NULL
Definition: autoptr.h:18
CoreExport void ActivateSubobjSel(int level, XFormModes &modes) override
When the user changes the selection of the sub-object drop down, this method is called to notify the ...
This class contains a set of six command mode pointers that make up the XForm modes.
Definition: cmdmode.h:133
const PartID PART_DISPLAY
See DISP_ATTRIB_CHANNEL.
Definition: ref.h:72
#define FOREVER
Definition: interval.h:168
See also
Class XFormModes.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, MSModifierXtnd, and SimpleModBase.

956{}

◆ SupportsNamedSubSels()

virtual BOOL SupportsNamedSubSels ( )
inlinevirtual

An object that supports sub-object selection can choose to support named sub object selection sets.

Methods in the interface passed to objects allow them to add items to the sub-object selection set drop down list. A modifier that wishes to support this capability maintains its list of named sub-object selections. When a user enters the sub-object selection mode, the modifier adds its named selection sets into the drop down (using Interface::AppendSubObjectNamedSelSet()).

Returns
true if the plug-in supports named sub-object selection sets, false otherwise.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

968{return FALSE;}

◆ ActivateSubSelSet()

virtual void ActivateSubSelSet ( MSTR setName)
inlinevirtual

When the user chooses a name from the drop down list this method is called.

The plug-in should respond by selecting the set identified by the name passed.

Parameters
setNameThe name of the set to select.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

974{}

◆ NewSetFromCurSel()

virtual void NewSetFromCurSel ( MSTR setName)
inlinevirtual

If the user types a new name into the named selection set drop down then this method is called.

The plug-in should respond by creating a new set and give it the specified name.

Parameters
setNameThe name for the selection set.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

980{}

◆ RemoveSubSelSet()

virtual void RemoveSubSelSet ( MSTR setName)
inlinevirtual

If the user selects a set from the drop down and then chooses Remove Named Selections from the Edit menu this method is called.

The plug-in should respond by removing the specified selection set.

Parameters
setNameThe selection set to remove.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

986{}

◆ SetupNamedSelDropDown()

virtual void SetupNamedSelDropDown ( )
inlinevirtual

To support the Edit Named Selections dialog, plug-ins must implement this method.

It is called to rebuild the named selection set drop down list. This is usually done by calling Interface::ClearSubObjectNamedSelSets() followed by calls to Interface:: AppendSubObjectNamedSelSet().

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

994{}

◆ NumNamedSelSets()

virtual int NumNamedSelSets ( )
inlinevirtual

To support the Edit Named Selections dialog, plug-ins must implement this method.

Returns
the number of named selection sets.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

999{return 0;}

◆ GetNamedSelSetName()

virtual MSTR GetNamedSelSetName ( int  i)
inlinevirtual

To support the Edit Named Selections dialog, plug-ins must implement this method.

Parameters
iThe index of the selection set whose name is returned.
Returns
the name of the 'i-th' named selection set.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

1005{return _M("");}

◆ SetNamedSelSetName()

virtual void SetNamedSelSetName ( int  i,
MSTR newName 
)
inlinevirtual

To support the Edit Named Selections dialog, plug-ins must implement this method.

It sets the name of the selection set whose index is passed to the name passed. Note: Developers need to implement Undo / Redo for modifications to their named selection sets.

Parameters
iThe index of the selection set whose name is to be set.
newNameThe new name for the selection set the plug-in should store.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

1014{}

◆ NewSetByOperator()

virtual void NewSetByOperator ( MSTR newName,
Tab< int > &  sets,
int  op 
)
inlinevirtual

To support the Edit Named Selections dialog, plug-ins must implement this method.

The user may bring up the Edit Named Selections dialog via the Edit / Edit Named Selection ... command. This dialog allows the user to create new selection sets using 'boolean' operations to the sets including 'Combine', 'Subtract (A-B)', 'Subtract (B-A)' and 'Intersection'. This method is called on the plug-in to generate a new selection set via one of these operations. This method assumes the developer will append a new seleciton set with the name passed. This will result in two sets with identical names. Then the system will call RemoveSubSelSet() afterwards, so that the first one that is found (the old one, since the new one was appended) will be deleted. Note: Developers need to implement Undo / Redo for modifications to their named selection sets. See /MAXSDK/SAMPLES/MODIFIERS/MESHSEL.CPP for an example.

Parameters
newNameThe new name for the selection set is passed here.
setsA table of the selection sets to operate on. There are sets.Count() sets in the table.
opOne of the following values defined in Arguments for BaseObject::NewSetByOperator()

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, and MSModifierXtnd.

1036{}

◆ GetSubObjectCenters()

virtual void GetSubObjectCenters ( SubObjAxisCallback cb,
TimeValue  t,
INode node,
ModContext mc 
)
inlinevirtual

When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis.

This method specifies the position of the center. The plug-in enumerates its centers and calls the callback cb once for each.

Parameters
cbThe callback object whose methods may be called. See Class SubObjAxisCallback.
tThe time to enumerate the centers.
nodeA pointer to the node.
mcA pointer to the ModContext.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, MSModifierXtnd, MSSimpleModXtnd, and SimpleModBase.

1058{}

◆ GetSubObjectTMs()

virtual void GetSubObjectTMs ( SubObjAxisCallback cb,
TimeValue  t,
INode node,
ModContext mc 
)
inlinevirtual

When the user is in a sub-object selection level, the system needs to get the reference coordinate system definition from the current modifier being edited so that it can display the axis.

This method returns the axis system of the reference coordinate system. The plug-in enumerates its TMs and calls the callback cb once for each. See Sub-Object Coordinate Systems.

Parameters
cbThe callback object whose methods may be called.
tThe time to enumerate the TMs.
nodeA pointer to the node.
mcA pointer to the ModContext.

Reimplemented in PatchObject, SplineShape, MSShapeXtnd, MSModifierXtnd, MSSimpleModXtnd, and SimpleModBase.

1070{}

◆ NotifyPreCollapse()

virtual void NotifyPreCollapse ( INode node,
IDerivedObject derObj,
int  index 
)
inlinevirtual

This method is called before a modifier or object is collapsed.

See also
Class NotifyCollapseEnumProc.
Parameters
nodePoints to the node for the object being collapsed.
derObjIf the object associated with node above is a Modifier this points to the derived object.If it's an object then this is NULL.
indexIf the object associated with node above is a Modifier this is the index of this modifier in the DerivedObject.. If it's an object then this is 0.
1079{};

◆ NotifyPostCollapse()

virtual void NotifyPostCollapse ( INode node,
Object obj,
IDerivedObject derObj,
int  index 
)
inlinevirtual

This method is called after a modifier or object is collapsed.

See also
Class NotifyCollapseEnumProc.
Parameters
nodePoints to the node for the object being collapsed.
obj
derObjIf the object associated with node above is a Modifier this points to the derived object. If it's an object then this is NULL.
indexIf the object associated with node above is a Modifier this is the index of this modifier in the DerivedObject. If it's an object then this is 0.
1089{};

◆ NumSubObjTypes()

virtual int NumSubObjTypes ( )
inlinevirtual

Objects and modifiers that support subobjects have to overwrite this method - as well as GetSubObjType() - and return a class derived from ISubObjType in GetSubObjType().

Developers can use the GenSubObjType for convenience. If the parameter passed into GetSubObjType is -1, the system requests a ISubObjType, for the current SubObjectLevel that flows up the modifier stack. If the subobject selection of the modifier or base object does not affect the subobj selection that flows up the stack, the method must return NULL. See meshsel.cpp for a sample implementation.

Returns
The number of sub-object types supported by the object or modifier.

Reimplemented in PatchObject, SplineShape, and SimpleModBase.

1102{ return 0;}

◆ GetSubObjType()

virtual ISubObjType * GetSubObjType ( int  i)
inlinevirtual

Returns a pointer to the sub-object type for the sub-object whose index is passed.

If the parameter i passed is -1 the system requests an ISubObjType for the current SubObjectLevel that flows up the modifier stack. If the subobject selection of the modifier or base object does not affect the sub-object selection that flows up the stack NULL must be returned. See the sample code in /MAXSDK/SAMPLES/MODIFIERS/MESHSEL.CPP.

Parameters
iThe zero based index of the sub-object type to get. See the remarks above.
Returns
The sub-object type. See Class ISubObjType.

Reimplemented in PatchObject, SplineShape, and SimpleModBase.

1113{ return NULL; }

◆ GetSubObjectLevel()

virtual CoreExport int GetSubObjectLevel ( )
virtual

This method returns an integer which indicates the current sub-object level of the modifier or base object.

Returns
A value of 0 indicates object level. A value of 1 through NumSubObjTypes() are the sub-object levels in the same order as they are returned by GetSubObjType(int i) (with an offset of 1 of course).

Reimplemented in PatchObject.

◆ HasUVW() [1/2]

virtual BOOL HasUVW ( )
inlinevirtual

Call this method to find out if the object has UVW coordinates.

This method returns TRUE if the object has UVW coordinates; otherwise FALSE. In 3ds Max 2.0 and later there is code in the renderer that will automatically turn on the UVW coordinates of the base object if UV's are missing (and needed). The base object has to implement two simple methods to make this work: HasUVW() and SetGenUVW(). Developers are encouraged to put these methods in their objects: it makes using the program easier for the user. If they are not implemented, it doesn't cause any real harm: it will just operate as before and put up the missing UVW's message. Here is how the procedural sphere implements these methods:

BOOL SphereObject::GetGenUVW()
{
BOOL genUVs;
pblock->GetValue(PB_GENUVS, 0, genUVs, v);
return genUVs;
}
void SphereObject::SetGenUVW(BOOL sw)
{
if (sw==GetGenUVW()) return;
pblock->SetValue(PB_GENUVS,0, sw);
}
Definition: interval.h:36

Important Note: The pblock->SetValue() will cause a call to NotifyDependents(FOREVER, PART_TEXMAP, REFMSG_CHANGE), which will invalidate the UVW cache. It is essential that this call be made, so if the 'generate UVW' boolean is not handled by a parameter block, then NotifyDependents() needs to be called explicitly. Also Note: For "modifiable objects" that pass up the pipeline getting modified, such as TriObject, EditTriObject, etc., which cannot generate their own UVWs, but can carry them in their data structures, only this HasUVW() method needs to be implemented. For example, here is the implementation for TriObject: BOOL TriObject::HasUVW() { return mesh.tvFace?1:0; }

Reimplemented in PolyObject, TriObject, 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 >, MSPluginShape, MSShapeXtnd, MSPluginSimpleObject, MSSimpleObjectXtnd, MSPluginSimpleSpline, MSSimpleManipulatorXtnd, MSPluginModifier, MSModifierXtnd, MSPluginSimpleMeshMod, MSSimpleModXtnd, Object, and ShapeObject.

1163{ return 0; }

◆ HasUVW() [2/2]

virtual BOOL HasUVW ( int  mapChannel)
inlinevirtual

Call this method to find out if the object is has UVW coordinates for the specified mapping channel.

This method returns TRUE if the object has UVW coordinates; otherwise FALSE. See the method HasUVW() above for more details.

Parameters
mapChannelSee Mapping Channels.

Reimplemented in PolyObject, TriObject, MSModifierXtnd, Object, and ShapeObject.

1169{ return (mapChannel==1) ? HasUVW() : FALSE; }
virtual BOOL HasUVW()
Call this method to find out if the object has UVW coordinates.
Definition: object.h:1163

◆ SetGenUVW() [1/2]

◆ SetGenUVW() [2/2]

virtual void SetGenUVW ( int  mapChannel,
BOOL  sw 
)
inlinevirtual

This method is called to change the state of its Generate UVW boolean for the specified mapping channel.

If the state changes, the object must send a REFMSG_CHANGE up the pipeline by calling NotifyDependents().

Parameters
mapChannelThe mapping channel index. See Mapping Channels.
swThe new state for the generate UVW flag.

Reimplemented in MSModifierXtnd, and ShapeObject.

1181{ if (mapChannel==1) SetGenUVW (sw); }
virtual void SetGenUVW(BOOL sw)
This method is called to change the state of its Generate UVW boolean.
Definition: object.h:1174

◆ ShowEndResultChanged()

virtual void ShowEndResultChanged ( BOOL  showEndResult)
inlinevirtual

This method notifies the BaseObject that the end result display has been switched (the "Show End Result" button has been toggled).

Sometimes this is needed for display changes. This method is implemented in Edit Mesh, which uses it as shown below: void EditMeshMod::ShowEndResultChanged(BOOL showEndResult) {

NotifyDependents(FOREVER, PART_DISPLAY, REFMSG_CHANGE);

}

This allows the Edit Mesh modifier to update itself in repsonse to a user click of the "Show End Result" button in the modifier panel.

Parameters
showEndResultTRUE if Show End Result is on; FALSE if off.

Reimplemented in PatchObject, SplineShape, and MSModifierXtnd.

1193{ }

◆ HasViewDependentBoundingBox()

virtual BOOL HasViewDependentBoundingBox ( )
inlinevirtual

This method return true if GetWorldBoundBox returns different boxes for different viewports.

It is used to inhibit a caching of the bounding box for all viewports. This was added to allow developers to disable the bounding box cache. It may be overridden to return true if an object has a dynamic drawing style, or as the method suggests is view dependent.

Returns
true if the bounding box should not be cached for use on all viewports, false otherwise.
1202{ return false; }

Friends And Related Function Documentation

◆ ModifyTaskImp

friend class ModifyTaskImp
friend

Member Data Documentation

◆ mRenderItemHandles

MaxSDK::Graphics::RenderItemHandleArray mRenderItemHandles
protected