Programming and animation
Programming and animation ideas, articles, tutors, scripts, plugins in the 3d-
Object motion trail to curve
Posted on 27 January 2009 Neill No commentsThere is not any tool for extracting object’s motion trail to curve. But this problem can be solved by simple MEL script.
Maya Animation, MEL, Script1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19$obj = "box01"; // user object
float $pos[3] = `getAttr($obj+".translate")`;
string $curveName = `curve -ws -p $pos[0] $pos[1] $pos[2]`;
$currTime = `currentTime -q`;
for ($i=2; $i<200; $i++)
{
<span> </span>currentTime -edit $i;
<span> </span>$pos = `getAttr($obj+".translate")`;
<span> </span>curve -append -p $pos[0] $pos[1] $pos[2] $curveName;
}

English
Russian
Recent Comments