From Fracture FX
Revision as of 00:57, 10 May 2012 by Kmannens (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

fxCmd pointCloud <fracture node>

Regenerate the point cloud for voronoi-style breaking

fxCmd createBody [fxWorld node] <input mesh shape|plug>

Add a new rigid body to the simulator, whose shape is defined by the mesh on the given shape or plug. Plug identifies an element of in_mesh[] on the simulator/world-node. Normally called from the initialize script, but can be run at any time.

fxCmd fractureBody [fxWorld node] <body ID> [collider ID (or -1)] <break-geo node>

Break a rigid body using the given node. Normally called from the script of a collision event, but can be run at any time. The body is removed from the simulator and replaced with one or more shards. Returns an int array of the body IDs of all resulting shards. The optional collider ID is the body used for localized breaking.

fxCmd hasFracture [fxWorld node] <fracture logical-index>

Return non-zero if a fracture node is connected to the simulator at the given element of in_fxFracture

fxCmd hasBody [fxWorld node] <body ID>

Return non-zero if a body with the given ID still exists in the simulation. When a body is fractured it is removed from the simulation and replaced with one or more shards, each with their own ID

fxCmd hasAttr [fxWorld node] <body ID> <name>

Return non-zero if custom data of the given name exists on the given rigid body

fxCmd getAttr [fxWorld node] <body ID> <name>

Return the value of named custom data on a rigid body. If the data doesn't exist 0 is returned. You can distinguish between non-existing data, and existing data with the value 0, using the hasAttr call.

fxCmd setAttr [fxworld node] <body ID> <name> <type> <value>

Set named custom data on a body. Type is one of: bool/int/float/vector/string. Overwrites any existing data on that body with the same name.

fxCmd addParams <node>

Add attributes to a shape node to hold dynamics parameters. Rigid bodies derived from this node will inherit the dynamics parameters

fxCmd listFilterTypes

List all available filter types supported by the plug-in.

fxCmd listCustomData <node>

Return a string array listing the names and types of custom data on the given shape node. Name/type pairs are interleaved in the returned array. The values of those attributes will be copied to custom data on when a rigid body is created from that shape node. Attributes on the node are prefixed with "fxAttr".

fxCmd contactQuery [fxWorld node] <-count | -pairs | -unique_pairs -bodies>

To be used in the script of a collision event. Returns info about the bodies that passed all the filters for the event.

-count : The number of pairs of colliding bodies that passed all filters
-pairs : Returns an int array containing pairs of IDs of the colliding bodies which passed all filters. The size of the resulting array is always even, since it holds pairs of body IDs. One body may appear in the list multiple times (ie. in multiple pairs), since it could have collided with more than one other body.
-unique_pairs : The same as -pairs, but with the constraint that each body (other than the ground plane) will appear at most once in the entire list; this means that not all colliding pairs are listed. Used to avoid a call to fracture_body more than once per body when that body is involved in multiple collisions during one time step.
-bodies : Returns the IDs of colliding bodies across all pairs. The returned int array is a unique list of bodies involved in any number of collisions. Each body appears in the list exactly once.

fxCmd bakeToKeys <take log idx> <simulator node>

Bake the simulation to keyframes, overwriting the take at the given index

fxCmd clearTake <take log idx> <simulator node>

Remove all animcurves on all input objects and shards for the given take.

fxCmd replaceWithKeys <take log idx> <simulator node>

Remove the simulator, break-geo nodes, and reconnect all animcurves for the take at the given index into the corresponding transform nodes.

fxCmd modify {intArray of body IDs} [opp body ID]

Run the given rigid bodies through the modifier list for the current event. Callable from the script of collide and anim events. Optionally pass the ID of the opposing body in a collision pair, for modifiers that support it.

fxCmd animQuery [-bodies]

Return the IDs of rigid bodies that passed the filter list of an animEvent. Should be used in the script of an animEvent.

fxCmd setInitialState [nodes ...]

If no args are specified, set the initial state for selected objects; otherwise assume all string args are the names of nodes to set the state for.

fxCmd listUniqueCustomData {nodes}

Return an interleaved array of the names and types of all custom data used across the nodes in the input string array. Data with the same name on several nodes appears once.

Personal tools