This reference page is linked to from the following overview topics: Modifier Validity, World Space Modifier Plug-in Overview.
#include <simpmod.h>
Public Member Functions |
|
CoreExport | SimpleWSMMod () |
virtual CoreExport | ~SimpleWSMMod () |
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. |
|
CoreExport void | ModifyObject (TimeValue t, ModContext &mc, ObjectState *os, INode *node) |
This is the method that actually modifies
the input object. |
|
Class_ID | InputType () |
This is the type of object that the modifier
knows how to modify. |
|
CoreExport Interval | LocalValidity (TimeValue t) |
This method returns the validity interval of
a modifier. |
|
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. |
|
CreateMouseCallBack * | GetCreateMouseCallBack () |
This method allows the system to retrieve a
callback object used in creating an object in the 3D viewports.
|
|
int | NumRefs () |
Returns the total number of references this
ReferenceMaker can hold. |
|
CoreExport RefTargetHandle | GetReference (int i) |
Returns the 'i-th' reference. |
|
int | NumSubs () |
CoreExport Animatable * | SubAnim (int i) |
CoreExport MSTR | SubAnimName (int i) |
CoreExport RefResult | NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message) |
Receives and responds to messages. |
|
CoreExport IParamArray * | GetParamBlock () |
An object or modifier should implement this
method if it wishes to make its parameter block available for other
plug-ins to access it. |
|
CoreExport 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. |
|
CoreExport WSMObject * | GetWSMObject (TimeValue t) |
CoreExport void | SimpleWSMModClone (SimpleWSMMod *smodSource) |
CoreExport void | SimpleWSMModClone (SimpleWSMMod *smodSource, RemapDir &remap) |
CoreExport void | BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev) |
CoreExport void | EndEditParams (IObjParam *ip, ULONG flags, Animatable *next) |
virtual Deformer & | GetDeformer (TimeValue t, ModContext &mc, Matrix3 &mat, Matrix3 &invmat)=0 |
virtual void | InvalidateUI () |
virtual Interval | GetValidity (TimeValue t) |
virtual ParamDimension * | GetParameterDim (int pbIndex) |
virtual MSTR | GetParameterName (int pbIndex) |
virtual void | InvalidateParamMap () |
CoreExport SvGraphNodeReference | SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags) |
Public Attributes |
|
WSMObject * | obRef |
INode * | nodeRef |
IParamBlock * | pblock |
Static Public Attributes |
|
static CoreExport IObjParam * | ip |
static SimpleWSMMod * | editMod |
Protected Member Functions |
|
virtual CoreExport void | SetReference (int i, RefTargetHandle rtarg) |
Stores a
ReferenceTarget as its 'i-th' reference`. |
CoreExport SimpleWSMMod | ( | ) |
virtual CoreExport ~SimpleWSMMod | ( | ) | [virtual] |
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.
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.
{ return PART_GEOM; }
CoreExport void ModifyObject | ( | TimeValue | t, |
ModContext & | mc, | ||
ObjectState * | os, | ||
INode * | node | ||
) | [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.
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.
{return defObjectClassID;}
CoreExport 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.
BOOL ChangeTopology | ( | ) | [inline, virtual] |
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 from BaseObject.
{return FALSE;}
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.
{return NULL;}
int NumRefs | ( | ) | [inline, 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.
{return 3;}
CoreExport 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 SimpleWSMMod2.
virtual CoreExport 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 SimpleWSMMod2.
int NumSubs | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
{return 1;}
CoreExport Animatable* SubAnim | ( | int | i | ) | [virtual] |
i | This is the index of the sub-anim to return. |
Reimplemented from Animatable.
Reimplemented in SimpleWSMMod2.
CoreExport MSTR SubAnimName | ( | int | i | ) | [virtual] |
i | The index of the parameter name to return |
Reimplemented from Animatable.
CoreExport RefResult NotifyRefChanged | ( | Interval | changeInt, |
RefTargetHandle | hTarget, | ||
PartID & | partID, | ||
RefMessage | message | ||
) | [virtual] |
Receives and responds to messages.
A plugin which makes references must implement a method to receive and respond to messages broadcast by its dependents. This is done by implementing NotifyRefChanged(). The plugin developer usually implements this method as a switch statement where each case is one of the messages the plugin needs to respond to. The Method StdNotifyRefChanged calls this, which can change the partID to new value. If it doesn't depend on the particular message& partID, it should return REF_DONTCARE.
changeInt | - This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval. |
hTarget | - This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message. |
partID | - This contains information specific to the message passed in. Some messages don't use the partID at all. See the section List of Reference Messages for more information about the meaning of the partID for some common messages. |
message | - The message parameters passed into this method is the specific message which needs to be handled. |
Implements ReferenceMaker.
CoreExport IParamArray* GetParamBlock | ( | ) | [virtual] |
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.
Reimplemented from BaseObject.
CoreExport int GetParamBlockIndex | ( | int | id | ) | [virtual] |
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.
id | The parameter block id. See Parameter Block IDs. |
Reimplemented from BaseObject.
CoreExport WSMObject* GetWSMObject | ( | TimeValue | t | ) |
CoreExport void SimpleWSMModClone | ( | SimpleWSMMod * | smodSource | ) |
CoreExport void SimpleWSMModClone | ( | SimpleWSMMod * | smodSource, |
RemapDir & | remap | ||
) |
CoreExport 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.
CoreExport 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.
virtual Deformer& GetDeformer | ( | TimeValue | t, |
ModContext & | mc, | ||
Matrix3 & | mat, | ||
Matrix3 & | invmat | ||
) | [pure virtual] |
Implemented in SimpleOSMToWSMMod, and SimpleOSMToWSMMod2.
virtual void InvalidateUI | ( | ) | [inline, virtual] |
{}
virtual Interval GetValidity | ( | TimeValue | t | ) | [inline, virtual] |
Reimplemented in SimpleOSMToWSMMod, and SimpleOSMToWSMMod2.
{return FOREVER;}
virtual ParamDimension* GetParameterDim | ( | int | pbIndex | ) | [inline, virtual] |
{return defaultDim;}
virtual MSTR GetParameterName | ( | int | pbIndex | ) | [inline, virtual] |
{return MSTR(_M("Parameter"));}
virtual void InvalidateParamMap | ( | ) | [inline, virtual] |
CoreExport SvGraphNodeReference SvTraverseAnimGraph | ( | IGraphObjectManager * | gom, |
Animatable * | owner, | ||
int | id, | ||
DWORD | flags | ||
) | [virtual] |
gom | Points to the schematic view window manager. |
owner | The owning animatable. |
id | This is usually the sub-anim number (but can actually be any value the developer chooses). |
flags | See List of Schematic %View AddAnimatable Flags. |
Reimplemented from Modifier.
SimpleWSMMod* editMod
[static] |