Set local rotation axis


#1

Yo ~ haven’t posted for so long … My question is trivial but I still can’t get it after searching and reading for some time.

I want to set specifically the local rotation axis of a joint, after running “orient joint” for the whole chain.

In my case, the LRA of the wrist joint will look at the first finger chain I parent after running “orient joint”. Now I just want to set it to something like looking down from the shoulder to the wrist, so the I can parent a shape to the wrist joint and looks good. I can do this rough manually but I want to set it using mel. Just wonder someone may know. Thx.


#2

This sounds like a question I asked a while back and this was the response I got (you mentioned mel, so I’m assuming your using Maya).


#3

It works when you know the specific value to turn locally. But what I’m trying to do is to copy LRA from one joint to another. See picture attached.


#4

Hi,
//suppose transfering local rotation axis from joint1 to joint2
string $from = “joint1”;
string $to = “joint2”;
float $axis[] = getAttr ($from+".rotateAxis");
rotate -ws $axis[0] $axis[1] $axis[2] ($to+".rotateAxis");

Hope this is helpful.

Regards,
Nate


#5

Sorry, the -ws flag doesn’t work, as I expect it to work someway in worldspace.


#6

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.