ferdo
04-24-2004, 07:56 PM
hi there !
first of all, i am completly new to mel.
well what i want to do :
create a mel script for changing translationlimits
a locator is geometry constrained on a floor and parentet to a foot of a character
the character foot gets the limit for translateY from the locator so that it cant get under the floor.
this is my expression to do that :
float $min = locator1.translateY;
transformLimits -ty $min 1 -ety 1 0 nurbsSphere1;
next i want to make a script :
i select the locator, then the foot, and want to execute the melscript for creating this expression
i got this far :
string $nodes[];
$nodes = `selectedNodes`;
select -cl;
expression -o "$nodes[0]" -s "float $min = `getAttr($nodes[0]+".translateY")`;transformLimits -ty $min 1 -ety 1 0 $nodes[1];";
and got this errors:
// Error: No object matches name: .translateY //
// Error: Unable to parse command argument list. //
can you please tell me where the problem is ?
thx a lot
Ferdo
first of all, i am completly new to mel.
well what i want to do :
create a mel script for changing translationlimits
a locator is geometry constrained on a floor and parentet to a foot of a character
the character foot gets the limit for translateY from the locator so that it cant get under the floor.
this is my expression to do that :
float $min = locator1.translateY;
transformLimits -ty $min 1 -ety 1 0 nurbsSphere1;
next i want to make a script :
i select the locator, then the foot, and want to execute the melscript for creating this expression
i got this far :
string $nodes[];
$nodes = `selectedNodes`;
select -cl;
expression -o "$nodes[0]" -s "float $min = `getAttr($nodes[0]+".translateY")`;transformLimits -ty $min 1 -ety 1 0 $nodes[1];";
and got this errors:
// Error: No object matches name: .translateY //
// Error: Unable to parse command argument list. //
can you please tell me where the problem is ?
thx a lot
Ferdo
