Chaos Scatter MAXScript API

There are several published methods callable for every Chaos Scatter object. You can list them all by executing showInterface ChaosScatter.FpInterface (check out MAXScript Listener output).

Function Parameters Description
update <interval>timeInterval
<integer>referenceTime
Updates scatter for the given non-empty time interval, while blocking caller. The specified reference time determines scattering parameters that cannot be interpolated. It is expected to lie in the interval. Returns 0 on success. Returns 1 if the user does not have a valid license. Does nothing if the update is not needed. Currently, only 1 time frame long intervals are supported.
clear Clears scatter created by last update call. Can be called to free allocated resources, but e.g. maps depending on the scatter object may be evaluated incorrectly then.
getModelCount Returns number of all model objects. These are original objects that get instanced by the scatter object. The count is relevant to last update call.
getModelNode <integer>index Returns node of model object selected by the given index. The node is relevant to last update call. It returns null if the node got deleted meanwhile. If the index is outside [0, N) interval, where N is the count returned by getModelCount, it returns null too. Because of performance reasons and if possible, it is suggested to prevent massive repetitive calls of this method with the same index.
getInstanceCount Returns overall number of instances. All instances scattered throughout the whole time interval specified for last update call are accounted here. For example, if scatter gets updated for 2 time frames long interval and in the first frame get scattered instances A, B, C and in the second frame get scattered instances B and D, it will return 4.
convertInstancesToGeometry <integer>time Converts (duplicates) all instances scattered at the given time to true geometry objects. Expects the time to lie in the interval specified for last update call. Returns 0 on success. Calling it may be costly for great number of instances.
saveConfiguration <string>filePath
<integer>reserved
Saves scatter configuration to specified file. Its format is unspecified but can be loaded back with loadConfiguration. Returns 0 on success.
loadConfiguration <string>filePath Loads scatter configuration from specified file. Expects the file to be previously saved with saveConfiguration. Returns 0 on success.

Example code for already existing Chaos Scatter object:

$'NameOfTheObject'.getInstanceCount()

There are also properties that can be set. You can list them all by executing the following code (check out MAXScript Listener output):

showProperties $'NameOfTheObject'

Note property names have changed (are more clear) compared to Corona Scatter available in Corona 7 or older.

There are also several published free-standing functions. You can list them all by executing showInterface ChaosScatter.StaticFpInterface (check out MAXScript Listener output).

Function Parameters Description
getVersionNumber Returns current plugin version encoded as a single comparable 64-bit integer version number. Version numbers returned in earlier builds are always lower than those returned in later builds.
getVersionString Returns current plugin version formatted as a human-readable string. It is suitable to be presented to the user.

Example code:

ChaosScatter.StaticFpInterface.getVersionString()

Log In