Initialize event
From Fracture FX
(Difference between revisions)
Line 1: | Line 1: | ||
− | This is a default event that can not be removed from the simulator. It has no event filters or modifiers but it does have an initialization script: | + | This is a default event that can not be removed from the simulator. It has no event filters or modifiers but it does have an initialization script which can be edited: |
<pre> | <pre> | ||
// MEL to execute at the start frame | // MEL to execute at the start frame |
Latest revision as of 04:45, 16 July 2012
This is a default event that can not be removed from the simulator. It has no event filters or modifiers but it does have an initialization script which can be edited:
// MEL to execute at the start frame do { // add input meshes to the simulation world string $plug = $this+".in_mesh"; int $logIdx, $ids[] = `getAttr -mi $plug`; for ($logIdx in $ids) { string $dstPlug = $plug+"["+$logIdx+"]"; int $bodyId = `fxCmd createBody $dstPlug`; // body data may be attached here, in addition to setting it // from the UI (custom data layout under Inputs tab) // fxCmd setAttr $bodyId "foo" "int" 123; } } while (0);