Initialize event
From Fracture FX
(Difference between revisions)
(Created page with "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: <nowiki>// MEL to execute...") |
|||
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: | ||
− | + | <pre> | |
− | + | // MEL to execute at the start frame | |
− | < | + | |
do { | do { | ||
Line 17: | Line 16: | ||
} | } | ||
− | } while (0);</ | + | } while (0); |
+ | |||
+ | </pre> |
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:
// 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);