/* */

Saturday, 10 September 2011

Match Pivot Script

Quick script i've put together that'll match the worldspace pivot point of one object to the other. Very simple just useful for modelling and rigigng purposes:


//Match Pivot by jim dunford 10/09/2011

string $object[] = `ls -sl`;

int $arraySize = `size $object`;
if ($arraySize < 2)
print "only one object selected";
else

{
vector $e = `xform -q -rp -ws $object[0]`;
setAttr($object[1]+ ".translateX") ($e.x);
setAttr($object[1]+ ".translateY") ($e.y);
setAttr($object[1]+ ".translateZ") ($e.z);
print "great success!";
}



<< 01 02 03 04 05 06 07 08 09 10 >>

No comments:

Post a Comment