#include <PFSimpleAction.h>
Public Member Functions |
|
virtual PFExport | ~PFSimpleAction () |
virtual PFExport BaseInterface * | GetInterface (Interface_ID id) |
virtual PFExport void | DeleteThis () |
Deletes an instance of this class. |
|
virtual int | NumSubs () |
virtual PFExport Animatable * | SubAnim (int i) |
virtual PFExport MSTR | SubAnimName (int i) |
PFExport BOOL | SelectSubAnim (int subNum) |
virtual PFExport ParamDimension * | GetParamDimension (int i) |
virtual PFExport int | SubNumToRefNum (int subNum) |
virtual BOOL | CanCopyAnim () |
virtual PFExport int | HasSubElements (int type) |
virtual BOOL | CanDeleteSubAnim (int i) |
virtual BOOL | IsAnimated () |
virtual void | FreeCaches () |
virtual int | NumParamBlocks () |
virtual PFExport IParamBlock2 * | GetParamBlock (int i) |
virtual PFExport IParamBlock2 * | GetParamBlockByID (short id) |
virtual int | NumRefs () |
Returns the total number of references this
ReferenceMaker can hold. |
|
virtual PFExport RefTargetHandle | GetReference (int i) |
Returns the 'i-th' reference. |
|
virtual PFExport RefResult | NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message) |
Receives and responds to messages. |
|
virtual PFExport int | RemapRefOnLoad (int iref) |
Used to load old files with references.
|
|
virtual PFExport IOResult | Save (ISave *isave) |
Called for saving data. |
|
virtual PFExport IOResult | Load (ILoad *iload) |
Called for loading data. |
|
virtual CreateMouseCallBack * | GetCreateMouseCallBack () |
This method allows the system to retrieve a
callback object used in creating an object in the 3D viewports.
|
|
virtual BOOL | OKToChangeTopology (MSTR &modName) |
Implemented by the System. |
|
virtual void | InitNodeName (MSTR &s) |
Implemented by the System. |
|
virtual ObjectState | Eval (TimeValue t) |
This method is called to evaluate the object
and return the result as an
ObjectState. |
|
PFSimpleAction () | |
virtual void | GetClassName (MSTR &s) |
Retrieves the name of the plugin class.
|
|
virtual Class_ID | ClassID () |
Retrieves a constant that uniquely
identifies the plugin class. |
|
virtual void | BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev)=0 |
virtual void | EndEditParams (IObjParam *ip, ULONG flags, Animatable *next)=0 |
virtual RefTargetHandle | Clone (RemapDir &remap)=0 |
This method is used by 3ds Max to clone an
object. |
|
virtual const MCHAR * | GetObjectName ()=0 |
virtual PFExport bool | Init (IObject *pCont, Object *pSystem, INode *node, Tab< Object * > &actions, Tab< INode * > &actionNodes) |
Returns true if the operation has been
proceeded successfully. |
|
virtual PFExport bool | Release (IObject *pCont) |
See Init().
|
|
virtual bool | SupportRand () const |
An Action may carry some
chaos/unpredictibility in its processing. |
|
virtual int | GetRand () |
For chaos/unpredictibility action, gets rand
value. |
|
virtual void | SetRand (int seed) |
For chaos/unpredictibility action, sets rand
value. |
|
virtual PFExport int | NewRand () |
For chaos/unpredictibility action, sets and
returns new rand value. |
|
virtual const ParticleChannelMask & | ChannelsUsed (const Interval &time) const =0 |
See Init().
|
|
virtual const Interval | ActivityInterval () const =0 |
Casting the FPValue->ptr parameter to
Tab<Interface_ID>* as
in PFExport void ChannelsUsed(...); an Action may have a time
interval when the Action is active. |
|
virtual PFExport IObject * | GetCurrentState (IObject *pContainer) |
Returns action state (see IPFActionState.h
for details). |
|
virtual PFExport void | SetCurrentState (IObject *actionState, IObject *pContainer) |
Sets the state of the action to the given
state. |
|
virtual int | NumPViewParamBlocks () const |
virtual PFExport IParamBlock2 * | GetPViewParamBlock (int i) const |
virtual ClassDesc * | GetClassDesc () const =0 |
PFExport void | RefreshUI (WPARAM message, IParamMap2 *map=NULL) const |
PFExport void | UpdatePViewUI (ParamID updateID) const |
IParamBlock2 * | pblock () const |
const RandObjLinker & | randLinker () const |
IParamBlock2 *& | _pblock () |
RandObjLinker & | _randLinker () |
Protected Member Functions |
|
virtual PFExport void | SetReference (int i, RefTargetHandle rtarg) |
Stores a
ReferenceTarget as its 'i-th' reference`. |
|
Protected Attributes |
|
IParamBlock2 * | m_pblock |
RandObjLinker | m_randLinker |
virtual PFExport ~PFSimpleAction | ( | ) | [virtual] |
PFSimpleAction | ( | ) | [inline] |
{ _pblock() = NULL; RegisterParticleFlowNotification(); }
virtual PFExport BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
Reimplemented from FPMixinInterface.
Reimplemented in PFSimpleOperator, and PFSimpleTest.
virtual PFExport void DeleteThis | ( | ) | [virtual] |
Deletes an instance of this class.
3ds Max calls this method when it needs to delete a plugin object (an instance of a class derived from Animatable). Similarly, plugins that need to delete instances of an Animatable or a class directly derived from it via an Animatable pointer, should call this method instead of calling directly operator delete. Following these rules will ensure that the same memory manager is used to allocate and deallocate the object. The default implementation of this method deletes the object. Plugin instances that never need to be deleted from the heap can overwrite this method to do nothing.
Reimplemented from Animatable.
virtual int NumSubs | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
{ return 1; } // the paramBlock
virtual PFExport Animatable* SubAnim | ( | int | i | ) | [virtual] |
i | This is the index of the sub-anim to return. |
Reimplemented from Animatable.
virtual PFExport MSTR SubAnimName | ( | int | i | ) | [virtual] |
i | The index of the parameter name to return |
Reimplemented from Animatable.
PFExport BOOL SelectSubAnim | ( | int | subNum | ) | [virtual] |
subNum | The index of the sub-anim that was clicked on. |
Reimplemented from Animatable.
virtual PFExport ParamDimension* GetParamDimension | ( | int | i | ) | [virtual] |
i | Specifies the sub-anim (parameter) to return the dimension of. |
Reimplemented from Animatable.
virtual PFExport int SubNumToRefNum | ( | int | subNum | ) | [virtual] |
subNum | The anim index to return the corresponding reference index of. |
Reimplemented from Animatable.
virtual BOOL CanCopyAnim | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
{ return FALSE; }
virtual PFExport int HasSubElements | ( | int | type | ) | [virtual] |
type | One of the following values: 0: Test for node children. 1: Test for sub-anims. |
Reimplemented from Animatable.
virtual BOOL CanDeleteSubAnim | ( | int | i | ) | [inline, virtual] |
i | The zero based index of the sub-anim. |
Reimplemented from Animatable.
{ return FALSE; }
virtual BOOL IsAnimated | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
{ return _pblock()->IsAnimated(); }
virtual void FreeCaches | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
{ ; }
virtual int NumParamBlocks | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
{ return 1; } // the paramBlock
virtual PFExport IParamBlock2* GetParamBlock | ( | int | i | ) | [virtual] |
i | The zero based index of the ParamBlock2 to return. |
Reimplemented from Animatable.
virtual PFExport IParamBlock2* GetParamBlockByID | ( | short | id | ) | [virtual] |
id | The BlockID of the ParamBlock2 instance. |
Reimplemented from Animatable.
virtual 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 1; }
virtual PFExport 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.
virtual PFExport 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.
virtual PFExport 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.
virtual PFExport int RemapRefOnLoad | ( | int | iref | ) | [virtual] |
Used to load old files with references.
Implement this if you have added or deleted references and are loading an old file that needs to have its references remapped. This method is used when you have modified a ReferenceMaker to add or delete references, and are loading old files. It gets called during the reference mapping process, after the Load() method is called. You determine what version is loading in the Load(), and store the version in a variable which you can look at in RemapRefOnLoad() to determine how to remap references. The default implementation of this method just returns the same value it is passed, so you don't need to implement it unless you have added or deleted references from your class. This method makes it a lot easier to load old files when the reference topology has changed.
iref | - The input index of the reference. |
Reimplemented from ReferenceMaker.
Called for saving data.
Called by the system to allow the plugin to save its data.
isave | - This pointer may be used to call methods to write data to disk. See the section on Loading and Saving for an overview of the load/save process. |
Reimplemented from ReferenceMaker.
Called for loading data.
Called by the system to allow the plug-in to load its data. See the section on Loading and Saving for an overview of the load - save process.
iload | - This interface pointer may be used to call methods to read data from disk. |
Reimplemented from ReferenceMaker.
virtual 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 OneClickCreateCallBack::Instance(); }
virtual BOOL OKToChangeTopology | ( | MSTR & | modName | ) | [inline, 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.
modName | This parameter is set to the dependent modifier's name if there is an item that depends on topology. |
Reimplemented from BaseObject.
{ return FALSE; }
virtual void InitNodeName | ( | MSTR & | s | ) | [inline, virtual] |
Implemented by the System.
Sets the default node name to "Helper".
Reimplemented from HelperObject.
{ s = GetObjectName(); }
virtual ObjectState Eval | ( | TimeValue | t | ) | [inline, virtual] |
This method is called to evaluate the object and return the result as an ObjectState.
When the system has a pointer to an object it doesn't know if it's a procedural object or a derived object. So it calls Eval() on it and gets back an ObjectState. A derived object managed by the system may have to call Eval() on its input for example. A plug-in (like a procedural object) typically just returns itself. A plug-in that does not just return itself is the Morph Object (/MAXSDK/SAMPLES/OBJECTS/MORPHOBJ.CPP). This object uses a morph controller to compute a new object and fill in an ObjectState which it returns.
t | Specifies the time to evaluate the object. |
{ return ObjectState(this); }
Implements Object.
{ return ObjectState(this); }
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.
{ ; }
virtual 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.
{ return Class_ID(0,0); }
virtual void BeginEditParams | ( | IObjParam * | ip, |
ULONG | flags, | ||
Animatable * | prev | ||
) | [pure 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.
virtual void EndEditParams | ( | IObjParam * | ip, |
ULONG | flags, | ||
Animatable * | next | ||
) | [pure 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 RefTargetHandle Clone | ( | RemapDir & | remap | ) | [pure 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.
virtual const MCHAR* GetObjectName | ( | ) | [pure virtual] |
Reimplemented from BaseObject.
virtual PFExport bool Init | ( | IObject * | pCont, |
Object * | pSystem, | ||
INode * | node, | ||
Tab< Object * > & | actions, | ||
Tab< INode * > & | actionNodes | ||
) | [virtual] |
Returns true if the operation has been proceeded successfully.
The method is called when the ActionList is established the first time, when there is a first particle that enters the ActionList and there is a need to proceed particles. /param pCont: particle container with particle data /param pSystem: the particle system that generates the particle stream; the same operator may get calls from different particle systems; if the result varies according to the particle system that generates particles, then this parameter is useful. /param pNode: INode of the particle system that generates the particles. /param actions: Tab<Object*> of Actions in the current ActionList. The stack will be used to proceed particles. The stack is mutable: an Action may change the stack (to remove or add some Actions) to fine-tune the order of execution or add some extra actions. The next parameter should sync with the mutation. /param actionNodes: Tab<INode*> of action nodes.
Implements IPFAction.
virtual PFExport bool Release | ( | IObject * | pCont | ) | [virtual] |
virtual bool SupportRand | ( | ) | const [inline, virtual] |
An Action may carry some chaos/unpredictibility in its processing.
This method supports chaos randomness.
Implements IPFAction.
{ return false; }
virtual int GetRand | ( | ) | [inline, virtual] |
virtual void SetRand | ( | int | seed | ) | [inline, virtual] |
virtual PFExport int NewRand | ( | ) | [virtual] |
For chaos/unpredictibility action, sets and returns new rand value.
Reimplemented from IPFAction.
virtual const ParticleChannelMask& ChannelsUsed | ( | const Interval & | time | ) | const [pure virtual] |
virtual const Interval ActivityInterval | ( | ) | const [pure virtual] |
Casting the FPValue->ptr parameter to Tab<Interface_ID>* as in PFExport void ChannelsUsed(...); an Action may have a time interval when the Action is active.
Outside this interval the Action does nothing, therefore there is no need to proceed particles outside the activity interval.
Implements IPFAction.
Returns action state (see IPFActionState.h for details).
You have to delete the IObject by DeleteIObject method when the state is no longer needed.
Reimplemented from IPFAction.
Sets the state of the action to the given state.
Reimplemented from IPFAction.
virtual int NumPViewParamBlocks | ( | ) | const [inline, virtual] |
virtual PFExport IParamBlock2* GetPViewParamBlock | ( | int | i | ) | const [virtual] |
Implements IPViewItem.
virtual ClassDesc* GetClassDesc | ( | ) | const [pure virtual] |
PFExport void RefreshUI | ( | WPARAM | message, |
IParamMap2 * | map = NULL |
||
) | const |
PFExport void UpdatePViewUI | ( | ParamID | updateID | ) | const |
IParamBlock2* pblock | ( | ) | const [inline] |
{ return m_pblock; }
const RandObjLinker& randLinker | ( | ) | const [inline] |
{ return m_randLinker; }
IParamBlock2*& _pblock | ( | ) | [inline] |
{ return m_pblock; }
RandObjLinker& _randLinker | ( | ) | [inline] |
{ return m_randLinker; }
IParamBlock2* m_pblock
[protected] |
RandObjLinker m_randLinker
[protected] |