Message 1 of 2
MEL error not getting resolved

Not applicable
02-02-2012
10:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is a code which I have written to enter all the Names of spheres in a layer and store their co-ordinates in a text file.
However This code is showing an error:
"No object matched name .translateX"
or
"No object matched name .tx"..
Please help.
float $x,$y,$z;
int $i;
string $filePath="D:\sphereCoordinates.txt";
layerEditorSelectObjects jSpheres;
string $jointSpheres[]=`ls -sl`;
$fileId=`fopen $filePath "a"`;
select -d;
for($obj in $jointSpheres)//$i=0; $i<28; $i++)
{
$x=`getAttr $obj.translateX`;
$y=`getAttr $obj.translateY`;
$z=`getAttr $obj.translateZ`;
fprint $fileId("sphere -n"+$obj+" -p " +$x +" "+ $y+" "+ $z+"\n");
}
fclose $fileId;
However This code is showing an error:
"No object matched name .translateX"
or
"No object matched name .tx"..
Please help.