particleFlow Global Interface

Particle Flow provides the Core Interface particleFlow.

Methods:

<void>particleFlow.beginEdit()      
<void>particleFlow.endEdit()   

Block the Event encapsulation of Particle Flow Actions created via MAXScript.

When a Particle Flow Action (Operator or Test) is created, it is automatically encapsulated into a Particle Flow Event. This is done since all Particle Flow Actions should belong to an Event.

Sometimes this behavior can be undesired and become an obstacle when creating Actions via MAXScript. To avoid this, the pair beginEdit / endEdit can be used.

<node>particleFlow.openParticleView() 

Opens the Particle View. Returns the Particle View node.

EXAMPLE:

   --Disable Automatic Event Encapsulation
   particleFlow.beginEdit()
   OK
   --Create a new Find_Target Action
   ft = Find_Target()
   --> $Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]
   --Enable Automatic Event Encapsulation again
   particleFlow.endEdit()
   OK
   --Open Particle View and take a look:
   pview = particleFlow.openParticleView()
   --> $Particle_View:Particle View 01 @ [0.000000,0.000000,0.000000]
   --As expected, Find_Target will not appear inside
   --an Event in Particle View

You can use the following short MacroScript to generate an ActionItem that can be placed on a Toolbar, Menu, QuadMenu or Keyboard Shortcut to quickly open Particle View even when there is no PF_Source in the scene.

SAMPLE SCRIPT:

   macroScript PView_Open
   category:"Particle View"
   buttontext:"Open PView"
   tooltip:"Open Particle View"
   (
   -- Open Particle View
   particleFlow.openParticleView()
   )
<node>particleFlow.scriptRunner() 

This method is used in PF_SourceEvery Step Update and Final Step Update scripts to identify the actual PF_Source that is currently running the script.

EXAMPLE:

   pf= particleFlow.ScriptRunner()
<int>particleFlow.getActionOrder() 

Get the Particle Flow Action Order.

<void>particleFlow.setActionOrder <integer>order 

Set the Particle Flow Action Order.

Possible values are:

0: Globals First - At each integration step, Particle Flow first applies actions in the global event, and then actions in the other (local) events. Typically, the result is that actions in the local events override comparable actions in the global event.

1: Locals First - At each integration step, Particle Flow first applies actions in the local events, and then actions in the global event. Typically, the result is that actions in the global event override comparable actions in the local events

Note: For predictable results, don't use similar actions in the global and local events. However, if comparable actions do exist in both the global event and other events, Particle Flow applies them to the system in the order specified here. Typically, the effect that's applied last is the one that's visible in the particle system. Default is 1: Locals First.
<integer>particleFlow.getUpdateType() 

Get the Particle Flow Update Type.

<void>particleFlow.setUpdateType <integer>type 

Set the Particle Flow Update Type.

Possible values are:

0 : Complete mode - the whole particle animation is recalculated starting at the first frame.

1 : Forward mode - particles aren't updated right away. At playback time the particle history is not recalculated. Only new events that will happen with the particles have new settings.

Note: The Update Type determines how Particle Flow updates the system when you change a parameter during playback. Because the state of the particle system at any given frame can depend on events in previous frames, using the Complete option can provide a more accurate depiction of the result of the change, at a cost in speed; it takes more time to recalculate the entire system starting at the first frame. Default is 0: Complete.
<integer>particleFlow.cleanUpParticleFlow <boolean>doReport 

Cleans up the Particle Flow by removing unused items.

If the argument is passed as true, shows the result of the operation as a popup dialog. If false, performs the operation silently.

Returns the number of "dirty" ParticleFlow items removed.

Available in 3ds Max 2010 and higher.

<void>particleFlow.repairCacheSystem <boolean>doReport 

Repairs the Cache System.

If the argument is passed as true, shows the result of the operation as a popup dialog. If false, performs the operation silently.

Available in 3ds Max 2010 and higher.

<integer>particleFlow.synchronizeLayers <boolean>doReport 

MovesParticle Flow items to the same layer as the Particle Flow Emitter object.

When a Particle Flow Emitter object is moved to another layer via the Layer Manager, other related objects like all Particle Flow Operator Helpers and some internal objects are not moved to the same layer automatically. This can cause the flow to misbehave for example if a layer is turned off.

This method performs the synchronization to ensure all objects are on the same layer.

If the argument is passed as true, shows the result of the operation as a popup dialog. If false, performs the operation silently.

Returns the number of synchronized layers.

Available in 3ds Max 2010 and higher.

<void>particleFlow.resetParticleView() 

Resets the Particle View.

Available in 3ds Max 2010 and higher.

<void>particleFlow.presetManager() 

Opens the Preset Manager dialog.

Available in 3ds Max 2010 and higher.

<void>particleFlow.setNodeEditorDisplayFlags <integer>displayFlags

Sets the Node Editor's display flags.

Available in 3ds Max 2015 and higher.

<void>particleFlow.forceRedrawParticleView <node>particleView

Forces the redraw of the Particle View editor.

Available in 3ds Max 2015 and higher.