Hi I am a new MEL user and have been playing around , searching around but can't figure this out:
I was trying to move all the joint transform rotation values to the joint orient values so that i can clean up the attributes of the transforms without losing joint orientation, my mel attempt for it was this:
string $joints[]=`ls -type "joint"`;
//print($joints);
int $jnt_count = size($joints);
for ($i = 0; $i <= $jnt_count; $i++)
{
int $attr1 = `getAttr $joints[i].rotateX`;
int $attr2 = `getAttr $joints[i].rotateY`;
int $attr3 = `getAttr $joints[i].rotateZ`;
setAttr $joints[i].jointOrientX $attr1;
setAttr $joints[i].jointOrientY $attr2;
setAttr $joints[i].jointOrientZ $attr3;
}
I was hoping with the array of all the joints (names), i could change their attributes in that manner by calling to them one by one, but it seems I cannot do it that way
However! When I do an objectType $joints[1] to test, it still return a type "joints" , so I don't get why the value of the array is type joints, but I can't access the joint's joint.XXX attributes, can someone enlighten me on this matter or point me in the right direction?
Must appreciated!
Dave