FxCmd

From Fracture FX
Revision as of 20:46, 9 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> <fracture logical-index>

Break a rigid body using the fracturing node connected to the simulator at the given index. 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.

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 contactQuery [fxWorld node] <-count | -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. -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 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 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 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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox