pradeepmamgain
10-01-2009, 06:59 AM
I have few locators in the scene and a nurbs sphere, I want to first duplicate the sphere and then move the sphere to the locator's position.
I am trying following code but it is not working, please help...
float $y=0;
float $x=0;
float $z=0;
$selected=`ls -sl`;
for ($selObj in $selected)
{
$x=`getAttr $selObj.tx`;
$y=`getAttr $selObj.ty`;
$z=`getAttr $selObj.tz`;
setAttr "nurbsSphere1.tx" $x;
setAttr "nurbsSphere1.tx" $y;
setAttr "nurbsSphere1.tx" $z;
}
I am trying following code but it is not working, please help...
float $y=0;
float $x=0;
float $z=0;
$selected=`ls -sl`;
for ($selObj in $selected)
{
$x=`getAttr $selObj.tx`;
$y=`getAttr $selObj.ty`;
$z=`getAttr $selObj.tz`;
setAttr "nurbsSphere1.tx" $x;
setAttr "nurbsSphere1.tx" $y;
setAttr "nurbsSphere1.tx" $z;
}
