Programming and Animation
Programming and animation ideas, articles, tutors, scripts, plugins in the 3d
-
Object motion trail to curve
Дата: Январь 27th, 2009 Neill Комментариев нет[lang_ru]
В майке нет стандартного инструмента чтобы перевести траекторию движения в объект кривой. Однако эту задачу можно решить посредством простого MEL сценария
[/lang_ru]
[lang_en]
There is not any tool for extracting object’s motion trail to curve. But this problem can be solved by simple MEL script.
[/lang_en]
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;
}Добавить комментарий



Свежие комментарии