#include <mxsPlugin.h>
Public Member Functions |
|
MSPluginModifier () | |
MSPluginModifier (MSPluginClass *pc, BOOL loading) | |
~MSPluginModifier () | |
void | DeleteThis () |
HWND | AddRollupPage (HINSTANCE hInst, MCHAR *dlgTemplate, DLGPROC dlgProc, MCHAR *title, LPARAM param=0, DWORD flags=0, int category=ROLLUP_CAT_STANDARD) |
void | DeleteRollupPage (HWND hRollup) |
IRollupWindow * | GetRollupWindow () |
ReferenceTarget * | get_delegate () |
void | GetClassName (MSTR &s) |
Retrieves the name of the plugin class.
|
|
Class_ID | ClassID () |
Retrieves a constant that uniquely
identifies the plugin class. |
|
SClass_ID | SuperClassID () |
Retrieves a constant representing the type
of the plugin. |
|
void | FreeCaches () |
int | NumSubs () |
Animatable * | SubAnim (int i) |
MSTR | SubAnimName (int i) |
int | NumParamBlocks () |
IParamBlock2 * | GetParamBlock (int i) |
IParamBlock2 * | GetParamBlockByID (BlockID id) |
void * | GetInterface (ULONG id) |
Inherited from Animatable. |
|
RefResult | NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message) |
int | NumRefs () |
Returns the total number of references this
ReferenceMaker can hold. |
|
RefTargetHandle | GetReference (int i) |
Returns the 'i-th' reference. |
|
void | RefDeleted () |
void | RefAdded (RefMakerHandle rm) |
RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
IOResult | Save (ISave *isave) |
Implemented by the System. |
|
IOResult | Load (ILoad *iload) |
Implemented by the System. |
|
void | NotifyTarget (int msg, RefMakerHandle rm) |
MCHAR * | GetObjectName () |
void | BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev) |
void | EndEditParams (IObjParam *ip, ULONG flags, Animatable *next) |
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. |
|
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). |
|
void | GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box) |
This method returns the world space bounding
box for Objects (see below for the Sub-object gizmo or Modifiers
gizmo version). |
|
void | GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box) |
This is the object space bounding box, the
box in the object's local coordinates. |
|
void | Snap (TimeValue t, INode *inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt) |
Checks the point passed for a snap and
updates the SnapInfo
structure. |
|
CreateMouseCallBack * | GetCreateMouseCallBack () |
This method allows the system to retrieve a
callback object used in creating an object in the 3D viewports.
|
|
BOOL | HasUVW () |
It is called to find out if the object is
has UVW coordinates. |
|
void | SetGenUVW (BOOL sw) |
This method is called to change the state of
its Generate UVW boolean. |
|
Interval | LocalValidity (TimeValue t) |
This method returns the validity interval of
a modifier. |
|
ChannelMask | ChannelsUsed () |
These are channels that the modifier needs
in order to perform its modification. |
|
ChannelMask | ChannelsChanged () |
These are the channels that the modifier
actually modifies. |
|
void | NotifyInputChanged (Interval changeInt, PartID partID, RefMessage message, ModContext *mc) |
This method is called when an item in the
modifier stack before this modifier sends a
REFMSG_CHANGE message via NotifyDependents().
|
|
void | ModifyObject (TimeValue t, ModContext &mc, ObjectState *os, INode *node) |
This is the method that actually modifies
the input object. |
|
BOOL | DependOnTopology (ModContext &mc) |
Modifiers that place a dependency on
topology should return TRUE for this method. |
|
Class_ID | InputType () |
This is the type of object that the modifier
knows how to modify. |
|
IOResult | SaveLocalData (ISave *isave, LocalModData *ld) |
When a 3ds Max file is being saved, this
method is called so that the modifier can save the localData
structure that is hung off each
ModContext. |
|
IOResult | LoadLocalData (ILoad *iload, LocalModData **pld) |
When a 3ds Max file is being loaded, this
method is called so that the modifier can load the LocalModData
structure that is hung off each
ModContext. |
|
Static Public Member Functions |
|
static RefTargetHandle | create (MSPluginClass *pc, BOOL loading) |
Public Attributes |
|
IObjParam * | ip |
Protected Member Functions |
|
virtual void | SetReference (int i, RefTargetHandle rtarg) |
Stores a
ReferenceTarget as its 'i-th' reference`. |
MSPluginModifier | ( | ) | [inline] |
{ }
MSPluginModifier | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) |
~MSPluginModifier | ( | ) | [inline] |
{ DeleteAllRefsFromMe(); }
static RefTargetHandle create | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) | [static] |
void DeleteThis | ( | ) | [inline] |
HWND AddRollupPage | ( | HINSTANCE | hInst, |
MCHAR * | dlgTemplate, | ||
DLGPROC | dlgProc, | ||
MCHAR * | title, | ||
LPARAM | param = 0 , |
||
DWORD | flags = 0 , |
||
int | category =
ROLLUP_CAT_STANDARD |
||
) | [virtual] |
Implements MSPlugin.
void DeleteRollupPage | ( | HWND | hRollup | ) | [virtual] |
Implements MSPlugin.
IRollupWindow* GetRollupWindow | ( | ) | [virtual] |
Implements MSPlugin.
ReferenceTarget* get_delegate | ( | ) | [inline, virtual] |
void GetClassName | ( | MSTR & | s | ) | [inline, virtual] |
Retrieves the name of the plugin class.
This name is usually used internally for debugging purposes. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.
s | Reference to a string filled in with the name of the plugin class |
Reimplemented from ReferenceTarget.
Reimplemented in MSModifierXtnd.
Class_ID ClassID | ( | ) | [inline, virtual] |
Retrieves a constant that uniquely identifies the plugin class.
This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
{ return pc->class_id; }
SClass_ID SuperClassID | ( | ) | [inline, virtual] |
Retrieves a constant representing the type of the plugin.
Reimplemented from Modifier.
Reimplemented in MSModifierXtnd.
{ return pc->sclass_id; }
void FreeCaches | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
{ }
int NumSubs | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
Animatable* SubAnim | ( | int | i | ) | [inline, virtual] |
i | This is the index of the sub-anim to return. |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
{ return pblocks[i]; }
MSTR SubAnimName | ( | int | i | ) | [inline, virtual] |
i | The index of the parameter name to return |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
{ return pblocks[i]->GetLocalName(); }
int NumParamBlocks | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
IParamBlock2* GetParamBlock | ( | int | i | ) | [inline, virtual] |
i | The zero based index of the ParamBlock2 to return. |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
{ return pblocks[i]; }
IParamBlock2* GetParamBlockByID | ( | BlockID | id | ) | [inline] |
Reimplemented from MSPlugin.
Reimplemented in MSModifierXtnd.
{ return MSPlugin::GetParamBlockByID(id); }
void* GetInterface | ( | ULONG | id | ) | [inline, virtual] |
Inherited from Animatable.
Returns a pointer to the interface.
id | - The id of the interface. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ if (id == I_MAXSCRIPTPLUGIN) return (MSPlugin*)this; else return Modifier::GetInterface(id); }
RefResult NotifyRefChanged | ( | Interval | changeInt, |
RefTargetHandle | hTarget, | ||
PartID & | partID, | ||
RefMessage | message | ||
) | [inline] |
int NumRefs | ( | ) | [virtual] |
Returns the total number of references this ReferenceMaker can hold.
The plugin implements this method to indicate the total number of of references it can make. This includes all references whether they are NULL (inactive) or non-NULL (active) at the time when this method is called. A plugin can hold a variable number of references, thus the return value of this method is not to be cached and reused by client code.
Reimplemented from ReferenceMaker.
Reimplemented in MSModifierXtnd.
RefTargetHandle GetReference | ( | int | i | ) | [virtual] |
Returns the 'i-th' reference.
The plugin implements this method to return its 'i-th' reference. The plug-in simply keeps track of its references using an integer index for each one. This method is normally called by the system.
i | - The index of the reference to retrieve. Valid values are from 0 to NumRefs()-1. |
Reimplemented from ReferenceMaker.
Reimplemented in MSModifierXtnd.
virtual void SetReference | ( | int | i, |
RefTargetHandle | rtarg | ||
) | [protected, virtual] |
Stores a ReferenceTarget as its 'i-th' reference`.
The plugin implements this method to store the reference handle passed to it as its 'i-th' reference. In its implementation of this method, the plugin should simply assign the reference handle passed in as a parameter to the member variable that holds the 'i-th' reference. Other reference handling methods such as ReferenceMaker::DeleteReference(), or ReferenceMaker::ReplaceReference() should not be called from within this method. The plugin itself or other plugins should not call this method directly. The system will call this method when a new reference is created or an existing one is replaced by calling ReferenceMaker::ReplaceReference().
i | - The index of the reference to store. Valid values are from 0 to NumRefs()-1. |
rtarg | - The reference handle to store. |
Reimplemented from ReferenceMaker.
Reimplemented in MSModifierXtnd.
void RefDeleted | ( | ) | [inline] |
void RefAdded | ( | RefMakerHandle | rm | ) | [inline] |
RefTargetHandle Clone | ( | RemapDir & | remap | ) | [virtual] |
This method is used by 3ds Max to clone an object.
class MyDerivedPlugin : public MyBasePlugin { const int MY_REFERENCE = 1; ReferenceTarget* Clone(RemapDir& remap) { ReferenceTarget* result = new MyDerivedPlugin(); BaseClone(this, result, remap); return result; } void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap) { if (!to || !from || from == to) return; MyBasePlugin::BaseClone(from, to, remap); to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE))); } };
This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations
remap | - A RemapDir instance used for remapping references during a Clone. |
Reimplemented from ReferenceTarget.
Reimplemented in MSModifierXtnd.
Implemented by the System.
This method handles saving the modifier name. This method should be called by the derived class BEFORE it saves any chunks. See the sample code below.
isave | You may use this pointer to call methods of ISave to write data. |
IOResult DispMod::Save(ISave *isave) { // First save the modifier name by calling the base class version. Modifier::Save(isave); // Then save this modifiers data. isave->BeginChunk(BMIO_CHUNK); bi.Save(isave); isave->EndChunk(); return IO_OK; }
Reimplemented from Modifier.
{ MSPlugin::Save(isave); return Modifier::Save(isave); }
Implemented by the System.
iload | You may use this pointer to call methods of ILoad to read data. |
Reimplemented from Modifier.
{ MSPlugin::Load(iload); return Modifier::Load(iload); }
void NotifyTarget | ( | int | msg, |
RefMakerHandle | rm | ||
) | [inline] |
Reimplemented from MSPlugin.
{ MSPlugin::NotifyTarget(msg, rm); } // LAM - 9/7/01 - ECO 624
MCHAR* GetObjectName | ( | ) | [inline, virtual] |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ return pc->class_name->to_string(); }
void BeginEditParams | ( | IObjParam * | ip, |
ULONG | flags, | ||
Animatable * | prev | ||
) | [virtual] |
ip | Interface pointer. The developer can use it to call methods such as AddRollupPage(). Note that this pointer is only valid between BeginEditParams() and EndEditParams(). It should not be used outside this interval. |
flags | Describe which branch of the command panel or dialog the item
is being edited in. The following are possible values: BEGIN_EDIT_CREATE Indicates an item is being edited in the create branch. BEGIN_EDIT_MOTION Indicates a controller is being edited in the motion branch. BEGIN_EDIT_HIERARCHY Indicates a controller is being edited in the Pivot subtask of the hierarchy branch. BEGIN_EDIT_IK Indicates a controller is being edited in the IK subtask of the hierarchy branch. BEGIN_EDIT_LINKINFO Indicates a controller is being edited in the Link Info subtask of the hierarchy branch. |
prev | Pointer to an Animatable object. This parameter may be used in the motion and hierarchy branches of the command panel. This pointer allows a plug-in to look at the ClassID of the previous item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel, but simply update the values displayed in the UI fields. This prevents the UI from 'flickering' when the current item begins its edit. For example, if you are in the motion branch and are looking at an item's PRS controller values, and then select another item that is displayed with a PRS controller, the UI will not change - only the values displayed in the fields will change. If however you selected a target camera that has a lookat controller (not a PRS controller) the UI will change because a different set of parameters need to be displayed. Note that for items that are edited in the modifier branch this field can be ignored. |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
void EndEditParams | ( | IObjParam * | ip, |
ULONG | flags, | ||
Animatable * | next | ||
) | [virtual] |
ip | An interface pointer. The developer may use the interface
pointer to call methods such as DeleteRollupPage(). |
flags | The following flag may be set: END_EDIT_REMOVEUI If TRUE, the item's user interface should be removed. |
next | Animatable pointer. Can be used in the motion and hierarchy branches of the command panel. It allows a plug-in to look at the ClassID of the next item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel. Note that for items that are edited in the modifier branch this field can be ignored. |
Reimplemented from Animatable.
Reimplemented in MSModifierXtnd.
int HitTest | ( | TimeValue | t, |
INode * | inode, | ||
int | type, | ||
int | crossing, | ||
int | flags, | ||
IPoint2 * | p, | ||
ViewExp * | vpt | ||
) | [inline, virtual] |
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.
t | The time to perform the hit test. |
inode | A pointer to the node to test. |
type | The type of hit testing to perform. See Scene and Node Hit Test Types. for details. |
crossing | The state of the crossing setting. If TRUE crossing selection is on. |
flags | The hit test flags. See Scene and Node Hit Testing Flags for details. |
p | The screen point to test. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ return 0; }
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.
t | The time to display the object. |
inode | The node to display. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
flags | See Display Flags. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ return 0; }
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.
t | The time to compute the bounding box. |
inode | The node to calculate the bounding box for. |
vp | An interface pointer that can be used to call methods associated with the viewports. |
box | Contains the returned bounding box. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ }
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.
t | The time to retrieve the bounding box. |
inode | The node to calculate the bounding box for. |
vp | An interface pointer that may be used to call methods associated with the viewports. |
box | Contains the returned bounding box. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ }
void Snap | ( | TimeValue | t, |
INode * | inode, | ||
SnapInfo * | snap, | ||
IPoint2 * | p, | ||
ViewExp * | vpt | ||
) | [inline, virtual] |
Checks the point passed for a snap and updates the SnapInfo structure.
t | The time to check. |
inode | The node to check. |
snap | The snap info structure to update. |
p | The screen point to check. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ }
CreateMouseCallBack* GetCreateMouseCallBack | ( | ) | [inline, virtual] |
This method allows the system to retrieve a callback object used in creating an object in the 3D viewports.
This method returns a pointer to an instance of a class derived from CreateMouseCallBack. This class has a method proc() which is where the programmer defines the user/mouse interaction during the object creation phase.
Implements BaseObject.
Reimplemented in MSModifierXtnd.
{ return NULL; }
BOOL HasUVW | ( | ) | [inline, virtual] |
It is called to find out if the object is 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; Interval v; pblock->GetValue(PB_GENUVS, 0, genUVs, v); return genUVs; } void SphereObject::SetGenUVW(BOOL sw) { if (sw==GetGenUVW()) return; pblock->SetValue(PB_GENUVS,0, sw); }
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 from BaseObject.
Reimplemented in MSModifierXtnd.
{ return 1; }
void SetGenUVW | ( | BOOL | sw | ) | [inline, virtual] |
This method is called to change the state of its Generate UVW boolean.
If the state changes, the object must send a REFMSG_CHANGE up the pipeline by calling NotifyDependents(). This applies to map channel 1.
sw | The new state for the generate UVW flag. |
Reimplemented from BaseObject.
Reimplemented in MSModifierXtnd.
{ }
Interval LocalValidity | ( | TimeValue | t | ) | [virtual] |
This method returns the validity interval of a modifier.
It is simply the combination of the validity of all the modifier's parameters. It's used to determine when to cache in the pipeline, but is not directly responsible for determining when ModifyObject() is called. ModifyObject() is called when the pipeline needs to be evaluated either because someone sent a REFMSG_CHANGE message or the validity of the object does not include the current time.
NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
t | The time to calculate the Interval. |
Reimplemented from Modifier.
Reimplemented in MSModifierXtnd.
ChannelMask ChannelsUsed | ( | ) | [inline, virtual] |
These are channels that the modifier needs in order to perform its modification.
This should at least include the channels specified in ChannelsChanged() but may include more. Note that ChannelsUsed() is called many times but the channels returned should not change on the fly.
{ return GEOM_CHANNEL|TOPO_CHANNEL; }
Implements Modifier.
Reimplemented in MSModifierXtnd.
{ return GEOM_CHANNEL; } // pretend this thing mods geometry in order to get parameters eval'd
ChannelMask ChannelsChanged | ( | ) | [inline, virtual] |
These are the channels that the modifier actually modifies.
Note that ChannelsChanged() is called many times but the channels returned should not change on the fly.
Implements Modifier.
Reimplemented in MSModifierXtnd.
{ return GEOM_CHANNEL; }
void NotifyInputChanged | ( | Interval | changeInt, |
PartID | partID, | ||
RefMessage | message, | ||
ModContext * | mc | ||
) | [inline, virtual] |
This method is called when an item in the modifier stack before this modifier sends a REFMSG_CHANGE message via NotifyDependents().
Consider the following example: Assume the modifier stack contains a Sphere Object, then a Bend, then a Edit Mesh. The Edit Mesh modifier does not have a reference to the Bend or the Sphere because it does not officially depend on these items. However it does depend on them in a certain sense, because it modifies the data that these items produce. So, if they change it may affect the modifier. A modifier may build a cache based on its input object. The modifier needs a way to know when to discard this cache because the input object has changed. Whenever one of the items before this modifier in the stack sends out a REFMSG_CHANGE message via NotifyDependents() to indicate it has changed this method is called. The modifier may respond in a way appropriate to it, for example by discarding its cache of the input object. It is not legal, to issue a NotifyDependent()'s in the NotifyInputChanged() method of a modifier, without checking for reentrancy. Imagine, you have an instanced modifier applied to the same object in the stack. Sending a refmsg from the NotifyInputChanged method will casue an endles loop. Simply putting a guard in, that checks for reentrancy should get rid of the problem.
changeInt | This is the interval from the message. It is reserved for future use - now it will always be FOREVER. |
partID | This is the partID from the message. |
message | This is the message sent. |
mc | The ModContext for the pipeline that changed. If a modifier is applied to multiple objects, then there are ModApps in each pipeline that it is applied to. These ModApps are pointing to the same modifier. Consider the following example: Say you apply a Bend modifier to a Sphere, a Cylinder and a Box object. There are three ModApps but only one Bend modifier. Then you go to the Sphere and adjust its Radius. This will cause NotifyInputChanged() to be called on the Bend because the Bend's input changed. However only one of its inputs changed - only the Sphere changed and not the Cylinder or the Box. Therefore NotifyInputChanged() will be called once, and the ModContext passed in will be for the Sphere's changed pipeline. It is possible that all three objects could change at the same time. If an instanced float controller was assigned to the radius, width, and height - one parameter for each object - then the controller was adjusted in the function curve editor, all three items would change. In this case NotifyInputChanged() would be called three times on the Bend. Once for each pipeline, once with each ModContext. |
Reimplemented from Modifier.
Reimplemented in MSModifierXtnd.
{ Modifier::NotifyInputChanged(changeInt, partID, message, mc); }
void ModifyObject | ( | TimeValue | t, |
ModContext & | mc, | ||
ObjectState * | os, | ||
INode * | node | ||
) | [inline, virtual] |
This is the method that actually modifies the input object.
This method is responsible for altering the object and then updating the validity interval of the object to reflect the validity of the modifier.
t | The time at which the modification is being done. |
mc | A reference to the ModContext. |
os | The object state flowing through the pipeline. This contains a pointer to the object to modify. |
node | The node the modifier is applied to. This parameter is always NULL for Object Space Modifiers and non-NULL for World Space Modifiers (Space Warps). This is because a given WSM is only applied to a single node at a time whereas an OSM may be applied to several nodes. This may be used for example by particle system space warps to get the transformation matrix of the node at various times. |
Implements Modifier.
Reimplemented in MSModifierXtnd.
{ os->obj->UpdateValidity(GEOM_CHAN_NUM, LocalValidity(t)); }
BOOL DependOnTopology | ( | ModContext & | mc | ) | [inline, virtual] |
Modifiers that place a dependency on topology should return TRUE for this method.
An example would be a modifier that stores a selection set base on vertex indices. This modifier depends on the indices being intact for it to operate correctly.
mc | Reference to the ModContext. |
Reimplemented from Modifier.
Reimplemented in MSModifierXtnd.
{ return Modifier::DependOnTopology(mc); }
Class_ID InputType | ( | ) | [inline, virtual] |
This is the type of object that the modifier knows how to modify.
Simple modifiers that just modify points of an object can operate on generic 'Deformable' objects. Deformable objects are any type of object that has points. A modifier could also work on a particular type of object such as a TriObject or PatchObject.
Implements Modifier.
Reimplemented in MSModifierXtnd.
{ return Class_ID(DEFORM_OBJ_CLASS_ID,0); }
IOResult SaveLocalData | ( | ISave * | isave, |
LocalModData * | ld | ||
) | [inline, virtual] |
When a 3ds Max file is being saved, this method is called so that the modifier can save the localData structure that is hung off each ModContext.
If the modifier doesn't store any data in the ModContext it can ignore this method.
isave | You may use this pointer to call methods of ISave to write data. |
ld | Pointer to the LocalModData for the modifier. |
Reimplemented from Modifier.
Reimplemented in MSModifierXtnd.
{ return Modifier::SaveLocalData(isave, ld); }
IOResult LoadLocalData | ( | ILoad * | iload, |
LocalModData ** | pld | ||
) | [inline, virtual] |
When a 3ds Max file is being loaded, this method is called so that the modifier can load the LocalModData structure that is hung off each ModContext.
If the modifier doesn't store any data in the ModContext it can ignore this method.
iload | You may use this pointer to call methods of ILoad to read data. |
pld | A pointer to a pointer in the ModContext. The modifier must set this pointer to point at a new LocalModData derived class. |
Reimplemented from Modifier.
Reimplemented in MSModifierXtnd.
{ return Modifier::LoadLocalData(iload, pld); }