Navigating the Particle Cloud

Get to know the SIObject.NestedObjects property. It will be your best (and your only) friend as you navigate the nodes of the particle cloud. It basically crawls down the Explorer tree and returns a list of the immediate children (SIObjectCollection in the object model and a CRefArray of SIObjects in the C++ API).

 

To get an idea of where you want to go crawling and what you might find, check out the SDK Explorer. It is a very powerful tool that displays SDK information about the selected items, including its name and type, which objects (interfaces) it supports, what parameters and properties it owns, etc. You can access it in the UI through Scripting > SDK Explorer under the View menu.

 

Starting from the bottom, events are nested under their particle type, particle types are nested under their emitter property, emitter properties are nested under the particle operator and the particle operator is nested under the particle cloud.

 

Particle types and events and some emitter properties appear simultaneously at several locations in the scene explorer but for the purposes of getting access to the particle settings, this path is the most important one to understand.

Here are some procedures that will help you get started navigating inside the particle cloud:

Accessing the Emitter Property

Accessing the Particle Type Property under the Emitter Property

Accessing the Particle Event Property under its Particle Type

 

You can also use the EnumElements command and the Dictionary.GetObject method (prior to v5.0 these were the only options for navigating the particle clouds), but these are no longer the recommended approach.