In MEL is there a way to query the x,y,z rotation of the move tool when set to component?

In MEL is there a way to query the x,y,z rotation of the move tool when set to component?

malcolm_341
Collaborator Collaborator
795 Views
2 Replies
Message 1 of 3

In MEL is there a way to query the x,y,z rotation of the move tool when set to component?

malcolm_341
Collaborator
Collaborator

It would be super helpful if there was a way to query the angle of the move tool manipulator when set to component mode. I tried

float $locatorTargetAngle[] = `manipMoveContext -q -orientAxes "Move"`;

but that did not give me the correct angle.

0 Likes
Accepted solutions (1)
796 Views
2 Replies
Replies (2)
Message 2 of 3

brentmc
Autodesk
Autodesk
Accepted solution

Hi Malcolm,

 

You are on the right track. That command returns the angles in radians but I assume you want degrees so you need to use rad_to_deg to convert the values like this:

float $locatorTargetAngle[] = `manipMoveContext -q -orientAxes "Move"`;
$locatorTargetAngle[0] = rad_to_deg($locatorTargetAngle[0]);
$locatorTargetAngle[1] = rad_to_deg($locatorTargetAngle[1]);
$locatorTargetAngle[2] = rad_to_deg($locatorTargetAngle[2]);
--
Brent
Brent McPherson
Principle Engineer
Message 3 of 3

malcolm_341
Collaborator
Collaborator

Yes that's it, thanks very much that's a super powerful command now. Going to use this for a lot of different scripts.

0 Likes