Particle Flow provides the Global Interface particleFlow.
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.
Opens the Particle View. Returns the Particle View node.
--Disable Automatic Event Encapsulation
--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
--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.
category: "Particle View"
buttontext: "Open PView"
tooltip: "Open Particle View"
-- Open Particle View
This method is used in PF_Source Every Step Update and Final Step Update scripts to identify the actual PF_Source that is currently running the script.
Get the Particle Flow Action 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
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.
Get the Particle Flow Update 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.
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.
PF_Source : GeometryClass
Particle Flow Interfaces
Every Step Update Example
Final Step Update Example