Initialize event

From Fracture FX
(Difference between revisions)
Jump to: navigation, search
(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...")
 
 
(One intermediate revision by one user not shown)
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>
 
+
// MEL to execute at the start frame
<nowiki>// MEL to execute at the start frame
+
  
 
do {
 
do {
Line 17: Line 16:
 
}
 
}
  
} while (0);</nowiki>
+
} while (0);
 +
 
 +
</pre>

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);

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox