IPViewManager.h

IPViewManager.h

Module description

Enumerations

enum  { kPFDefaultDisplay_global, kPFDefaultDisplay_local }
 
enum  { kPFActionOrder_globalsFirst, kPFActionOrder_localsFirst }
 
enum  { kPFUpdateType_complete, kPFUpdateType_forward }
 
enum  { kPFDynamicNames_no, kPFDynamicNames_yes }
 
enum  { kPViewActionListHorSpace =20 }
 

Functions

virtual bool OpenParticleView (Object *engine)=0
 Opens ParticleView for a given PFEngine. More...
 
virtual IParticleView * GetActiveParticleView ()=0
 Returns the ParticleView which is currently open and shown in PView. More...
 
virtual bool UpdateParticleViews (bool additionsOnly=false)=0
 If nothing was delete from PView then additionsOnly is set to true. More...
 
virtual bool PreUpdateParticleViews (bool additionsOnly=false)=0
 If procedures between Pre. More...
 
virtual bool PostUpdateParticleViews (bool additionsOnly=false)=0
 If procedures between Pre. More...
 
virtual bool CancelUpdateParticleViews ()=0
 Not supported for maxscript. More...
 
virtual bool UpdateOnHold ()=0
 Return true when in between PreUpdate and PostUpdate. More...
 
virtual void UpdateParticleAmountShown ()
 Updates particle amount shown in PViews. More...
 
virtual void ActionProceedBegin (INode *actionNode)
 Shows that an action starts the proceed. More...
 
virtual void ActionProceedEnd (INode *actionNode)
 Shows that an action ends the proceed. More...
 
virtual bool IsParticleViewInForeground ()
 Check if any ParticleView is a foreground window. More...
 
static PFExport int NumActionClasses ()
 Public classes only. More...
 
static PFExport ClassDescActionClass (int index)
 
static PFExport const MCHARActionName (int index)
 
static PFExport int NumPViewItemClasses ()
 Public classes only. More...
 
static PFExport ClassDescPViewItemClass (int index)
 
static PFExport const MCHARPViewItemName (int index)
 
virtual bool ParticleViewOpenCloseToggle ()=0
 Used for CUI shortcuts. More...
 
virtual bool ParticleFlowActivationToggle (bool selectedOnly=false)=0
 Used for CUI shortcuts. More...
 
virtual int GetVacantSpace ()=0
 Returns X coordinate of half-plane of space free from any PF item. More...
 
virtual void KeepMaterial (Mtl *mtl)=0
 The method is used to prevent automatic removal of non-used materials from the scene. More...
 
static PFExport void RegisterModule (Class_ID moduleID)
 The method is used by a PFlow module to register itself with the system. More...
 
static PFExport bool IsModuleRegistered (Class_ID moduleID)
 Returns true if a PFlow module was registered. More...
 
FPInterfaceDescGetDesc ()
 
PFExport IPViewManagerGetPViewManager ()
 Gets PViewManager from the scene. More...
 
PFExport INodeCreatePFNode (Object *obj)
 Creates an INode used by ParticleFlow objects (actions, engines etc.) The ParticleFlow INode has some properties that are different from a regular INode. More...
 
PFExport void DeletePFNode (INode *node)
 Deletes a PF-type INode. More...
 
PFExport bool AppendPFAction (INode *actionList, INode *action)
 There is a special relationship between an action list and an action. More...
 
PFExport bool InsertPFAction (INode *actionList, INode *action, int indexAt)
 Ensures consistency in relationship between action list and action. More...
 
PFExport bool RemovePFAction (INode *actionList, int index)
 Ensures consistency in relationship between action list and action. More...
 
PFExport bool RemovePFAction (INode *actionList, INode *action)
 Ensures consistency in relationship between action list and action. More...
 
PFExport int GetPViewVacantSpace (INode *excludeNode=NULL)
 Returns X coordinate of half-plane of space free from any PF item. More...
 
PFExport int GetPViewMaximumZOrderIndex (INode *excludeNode=NULL)
 All items in PView are shown according to their Z order index. More...
 
PFExport bool CompactPViewZOrder ()
 The Z order sequence may have some "holes". More...
 
PFExport void RegisterParticleFlowNotification ()
 ParticleFlow has to track creation of new PF items. More...
 
PFExport void SuspendParticleFlowNotification ()
 Avoids extra effort for tracking. More...
 
PFExport void ResumeParticleFlowNotification ()
 Avoids extra effort for tracking. More...
 
PFExport bool IsParticleFlowNotificationSuspended ()
 Avoids extra effort for tracking. More...
 
PFExport void ReleasePViewManager ()
 The method is used to release PViewManager when a scene is closed. More...
 
PFExport int GetPFInt (IParamBlock2 *pblock, ParamID id, TimeValue t=0, int tabIndex=0)
 GetPFInt, GetPFFloat and GetPFTimeValue reinforce value boundaries set for parameter values. More...
 
PFExport float GetPFFloat (IParamBlock2 *pblock, ParamID id, TimeValue t=0, int tabIndex=0)
 See GetPFInt();. More...
 
PFExport TimeValue GetPFTimeValue (IParamBlock2 *pblock, ParamID id, TimeValue t=0, int tabIndex=0)
 See GetPFInt();. More...
 
PFExport bool ValidateParticleFlows ()
 For internal use. More...
 
PFExport int GetPFDefaultDisplay ()
 
PFExport void SetPFDefaultDisplay (int type)
 
PFExport void InitPFDefaultDisplay (int type)
 
PFExport int GetPFActionOrder ()
 
PFExport void SetPFActionOrder (int order)
 
PFExport void InitPFActionOrder (int order)
 
PFExport int GetPFUpdateType ()
 
PFExport void SetPFUpdateType (int type)
 
PFExport void InitPFUpdateType (int type)
 
PFExport int GetPFDynamicNames ()
 Names of actions in PView may have a dynamic suffix to reflect the most important settings of the action. More...
 
PFExport void SetPFDynamicNames (int type)
 Names of actions in PView may have a dynamic suffix to reflect the most important settings of the action. More...
 
PFExport void InitPFDynamicNames (int type)
 Names of actions in PView may have a dynamic suffix to reflect the most important settings of the action. More...
 
PFExport void DisableParticleInvalidation ()
 Particle system and operators/tests may have reference object (i.e. More...
 
PFExport void EnableParticleInvalidation ()
 See DisableParticleInvalidation();. More...
 
PFExport bool IsAbleInvalidateParticles ()
 See DisableParticleInvalidation();. More...
 
PFExport void SetIgnoreEmitterTMChange ()
 See DisableParticleInvalidation();. More...
 
PFExport void ClearIgnoreEmitterTMChange ()
 See DisableParticleInvalidation();. More...
 
PFExport bool IsIgnoringEmitterTMChange ()
 See DisableParticleInvalidation();. More...
 
PFExport void SetIgnoreEmitterPropChange ()
 See DisableParticleInvalidation();. More...
 
PFExport void ClearIgnoreEmitterPropChange ()
 See DisableParticleInvalidation();. More...
 
PFExport bool IsIgnoringEmitterPropChange ()
 For more selective tuning in notification change. More...
 
PFExport void SetIgnoreRefNodeChange ()
 See DisableParticleInvalidation();. More...
 
PFExport void ClearIgnoreRefNodeChange ()
 See DisableParticleInvalidation();. More...
 
PFExport bool IsIgnoringRefNodeChange ()
 See DisableParticleInvalidation();. More...
 
PFExport void SetPFProceedStatus ()
 When a particle system is in the process of calculation/evaluation, it is not advisable to invalidate particle containers. More...
 
PFExport void ClearPFProceedStatus ()
 When a particle system is in the process of calculation/evaluation, it is not advisable to invalidate particle containers. More...
 
PFExport bool IsPFProceeding ()
 When a particle system is in the process of calculation/evaluation, it is not advisable to invalidate particle containers. More...
 
PFExport ObjectGetPFObject (Object *obj)
 

Friends

PFExport IPViewManagerGetPViewManager ()
 friend PFExport void ReleasePViewManager(); More...
 
PFExport void ReleasePViewManager ()
 

Enumeration Type Documentation

anonymous enum
Enumerator
kPFDefaultDisplay_global 
kPFDefaultDisplay_local 
Definition: IPViewManager.h:357
Definition: IPViewManager.h:357
anonymous enum
Enumerator
kPFActionOrder_globalsFirst 
kPFActionOrder_localsFirst 
Definition: IPViewManager.h:374
Definition: IPViewManager.h:374
anonymous enum
Enumerator
kPFUpdateType_complete 
kPFUpdateType_forward 
Definition: IPViewManager.h:395
Definition: IPViewManager.h:395
anonymous enum
Enumerator
kPFDynamicNames_no 
kPFDynamicNames_yes 
Definition: IPViewManager.h:413
Definition: IPViewManager.h:413
anonymous enum
Enumerator
kPViewActionListHorSpace 
Definition: IPViewManager.h:522

Function Documentation

bool OpenParticleView ( Object engine)
pure virtual

Opens ParticleView for a given PFEngine.

If there are several ParticleViews with the given PFEngine, a dialog pops up to make a choice.

Parameters
enginePFEngine to open particle view for
IParticleView * GetActiveParticleView ( )
pure virtual

Returns the ParticleView which is currently open and shown in PView.

bool UpdateParticleViews ( bool  additionsOnly = false)
pure virtual

If nothing was delete from PView then additionsOnly is set to true.

bool PreUpdateParticleViews ( bool  additionsOnly = false)
pure virtual

If procedures between Pre.

. and Post.. involve additions of new items only then set "additionsOnly" to "true". The rollup panel won't be updated.

bool PostUpdateParticleViews ( bool  additionsOnly = false)
pure virtual

If procedures between Pre.

. and Post.. involve additions of new items only then set "additionsOnly" to "true". The rollup panel won't be updated.

bool CancelUpdateParticleViews ( )
pure virtual

Not supported for maxscript.

bool UpdateOnHold ( )
pure virtual

Return true when in between PreUpdate and PostUpdate.

void UpdateParticleAmountShown ( )
inlinevirtual

Updates particle amount shown in PViews.

114 { ; }
void ActionProceedBegin ( INode actionNode)
inlinevirtual

Shows that an action starts the proceed.

121 { ; }
void ActionProceedEnd ( INode actionNode)
inlinevirtual

Shows that an action ends the proceed.

126 { ; }
bool IsParticleViewInForeground ( )
inlinevirtual

Check if any ParticleView is a foreground window.

131 { return false; }
PFExport static int NumActionClasses ( )
static

Public classes only.

PFExport static ClassDesc * ActionClass ( int  index)
static
PFExport static MCHAR * ActionName ( int  index)
static
PFExport static int NumPViewItemClasses ( )
static

Public classes only.

PFExport static ClassDesc * PViewItemClass ( int  index)
static
PFExport static MCHAR * PViewItemName ( int  index)
static
bool ParticleViewOpenCloseToggle ( )
pure virtual

Used for CUI shortcuts.

bool ParticleFlowActivationToggle ( bool  selectedOnly = false)
pure virtual

Used for CUI shortcuts.

int GetVacantSpace ( )
pure virtual

Returns X coordinate of half-plane of space free from any PF item.

The method is usually used to calculate (x,y) location of newly created PF systems.

void KeepMaterial ( Mtl mtl)
pure virtual

The method is used to prevent automatic removal of non-used materials from the scene.

The method is used by Shape Instance operator. The operator creates combined materials on-the-fly to be assigned to particles. When the reference object for the operator is changed, the material is changed. The old material could be deleted because it doesn't have any more references in the scene. This may create a problem for undo/redo operations. To prevent that this method creates a reference dependency between PViewManager and the Material. Since PViewManager is not saved with the scene, the materials won't be saved either.

PFExport static void RegisterModule ( Class_ID  moduleID)
static

The method is used by a PFlow module to register itself with the system.

This way other PFlow modules can query whether a specific module is present/loaded with the system and act accordingly. Once a module is registered, it cannot be unregistered.

PFExport static bool IsModuleRegistered ( Class_ID  moduleID)
static

Returns true if a PFlow module was registered.

FPInterfaceDesc * GetDesc ( )
inlinevirtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613
#define PVIEWMANAGER_INTERFACE
Definition: IPViewManager.h:26
PFExport IPViewManager * GetPViewManager ( )

Gets PViewManager from the scene.

PFExport INode * CreatePFNode ( Object obj)

Creates an INode used by ParticleFlow objects (actions, engines etc.) The ParticleFlow INode has some properties that are different from a regular INode.

PFExport void DeletePFNode ( INode node)

Deletes a PF-type INode.

The ParticleFlow INode has some properties that are different from a regular INode. Also, deleting a node by the methods cleans up the scene from associated elements, for example deleting a PF emitter also removes all global actions and exclusive actionLists downstream. There won't be any harm done if a regular INode is deleted by the method. The plug-in is able to classify the given node to choose the appropriate way of action.

PFExport bool AppendPFAction ( INode actionList,
INode action 
)

There is a special relationship between an action list and an action.

The following four methods ensure the consistency in this relationship. Since PF particle system has a list of global action, the system can also be considered as an action list.

PFExport bool InsertPFAction ( INode actionList,
INode action,
int  indexAt 
)

Ensures consistency in relationship between action list and action.

See AppendPFAction();

PFExport bool RemovePFAction ( INode actionList,
int  index 
)

Ensures consistency in relationship between action list and action.

See AppendPFAction();

PFExport bool RemovePFAction ( INode actionList,
INode action 
)

Ensures consistency in relationship between action list and action.

See AppendPFAction();

PFExport int GetPViewVacantSpace ( INode excludeNode = NULL)

Returns X coordinate of half-plane of space free from any PF item.

The method is usually used to calculate (x,y) location of newly created PF systems. If given node is not NULL, then the node is excluded from consideration while looking for free PView space.

PFExport int GetPViewMaximumZOrderIndex ( INode excludeNode = NULL)

All items in PView are shown according to their Z order index.

Returns the highest Z order index amongst all particle systems and action lists.

PFExport bool CompactPViewZOrder ( )

The Z order sequence may have some "holes".

The method makes the sequence to be more compact by eliminating these "holes". Returns true if there were "holes"; and false if it is already compact.

PFExport void RegisterParticleFlowNotification ( )

ParticleFlow has to track creation of new PF items.

For ParticleFlow Shell: the system creates a default configuration and sets PView location. For ActionList: the system sets PView location. For Action: the system creates an ActionList that includes the Action, and sets PView location. To avoid this extra effort from the system side, use Suspend/Resume methods.

PFExport void SuspendParticleFlowNotification ( )

Avoids extra effort for tracking.

See RegisterParticleFlowNotification();

PFExport void ResumeParticleFlowNotification ( )

Avoids extra effort for tracking.

See RegisterParticleFlowNotification();

PFExport bool IsParticleFlowNotificationSuspended ( )

Avoids extra effort for tracking.

See RegisterParticleFlowNotification();

PFExport void ReleasePViewManager ( )

The method is used to release PViewManager when a scene is closed.

For internal use only.

PFExport int GetPFInt ( IParamBlock2 pblock,
ParamID  id,
TimeValue  t = 0,
int  tabIndex = 0 
)

GetPFInt, GetPFFloat and GetPFTimeValue reinforce value boundaries set for parameter values.

Can be used instead of pblock()->GetInt and pblock()->GetFloat to be sure that the result values are stay inside the parameter boundaries no matter what.

PFExport float GetPFFloat ( IParamBlock2 pblock,
ParamID  id,
TimeValue  t = 0,
int  tabIndex = 0 
)

See GetPFInt();.

PFExport TimeValue GetPFTimeValue ( IParamBlock2 pblock,
ParamID  id,
TimeValue  t = 0,
int  tabIndex = 0 
)

See GetPFInt();.

PFExport bool ValidateParticleFlows ( )

For internal use.

The method is used to make all ParticleFlow elements valid. The method traverses the scene to collect all ParticleFlow elements then it removes the invalid ones and fixes elements that are fixable. Returns true is the scene was valid, and false if the scene was invalid.

PFExport int GetPFDefaultDisplay ( )
PFExport void SetPFDefaultDisplay ( int  type)
PFExport void InitPFDefaultDisplay ( int  type)
PFExport int GetPFActionOrder ( )
PFExport void SetPFActionOrder ( int  order)
PFExport void InitPFActionOrder ( int  order)
PFExport int GetPFUpdateType ( )
PFExport void SetPFUpdateType ( int  type)
PFExport void InitPFUpdateType ( int  type)
PFExport int GetPFDynamicNames ( )

Names of actions in PView may have a dynamic suffix to reflect the most important settings of the action.

PFExport void SetPFDynamicNames ( int  type)

Names of actions in PView may have a dynamic suffix to reflect the most important settings of the action.

PFExport void InitPFDynamicNames ( int  type)

Names of actions in PView may have a dynamic suffix to reflect the most important settings of the action.

PFExport void DisableParticleInvalidation ( )

Particle system and operators/tests may have reference object (i.e.

define an emitting area). An operator may require TM of a reference object at different moments. If the reference object has a complex controller, the action of requesting the state of the reference object, if the time is different from the current time, may inflict REFMSG_CHANGE message thus provoking invalidation of the whole particle system. To prevent that, at the moment of acquiring the reference object TMs, the operator should disable particle invalidation, and then enable the invalidation when it is done with the reference object.

PFExport void EnableParticleInvalidation ( )
PFExport bool IsAbleInvalidateParticles ( )
PFExport void SetIgnoreEmitterTMChange ( )
PFExport void ClearIgnoreEmitterTMChange ( )
PFExport bool IsIgnoringEmitterTMChange ( )
PFExport void SetIgnoreEmitterPropChange ( )
PFExport void ClearIgnoreEmitterPropChange ( )
PFExport bool IsIgnoringEmitterPropChange ( )

For more selective tuning in notification change.

PFExport void SetIgnoreRefNodeChange ( )
PFExport void ClearIgnoreRefNodeChange ( )
PFExport bool IsIgnoringRefNodeChange ( )
PFExport void SetPFProceedStatus ( )

When a particle system is in the process of calculation/evaluation, it is not advisable to invalidate particle containers.

This method sets the proceed status.

PFExport void ClearPFProceedStatus ( )

When a particle system is in the process of calculation/evaluation, it is not advisable to invalidate particle containers.

This method clears the proceed status.

PFExport bool IsPFProceeding ( )

When a particle system is in the process of calculation/evaluation, it is not advisable to invalidate particle containers.

This method checks if PF is proceeding.

PFExport Object* GetPFObject ( Object obj)

Friends

PFExport IPViewManager * GetPViewManager ( )
friend

friend PFExport void ReleasePViewManager();

Friend function declarations

PFExport void ReleasePViewManager ( )
friend