Rotation order constants

Rotation order constants

Anonymous
Not applicable
545 Views
3 Replies
Message 1 of 4

Rotation order constants

Anonymous
Not applicable

Hi,

 

I noticed the the constants for the rotation order differs:

 

OpenMaya.MEulerRotation.kXYZ = 0

OpenMaya.MTransformationMatrix.kXYZ = 1

 

is there reason for this?

 

Br,

Johan

0 Likes
546 Views
3 Replies
Replies (3)
Message 2 of 4

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

They are C++ wrappers. For MEularRotation, kXYZ is the first enumerable, so the value is 0; MTransformationMatrix, the first enumerable is kInvalid and the one after is kXYZ, so it is 1.

 

Yours,

Li

0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi,

 

Thanks for your reply. 

 

It was a little bit of a gotcha to discover this the "hard" way, I was expecting the enums to be that same, seems more logical?

Couldnt kInvalid be -1 and keep the rest the same?

 

BR,

Johan

 

 

0 Likes
Message 4 of 4

cheng_xi_li
Autodesk Support
Autodesk Support

Hi, 

 

I am not sure about it. Using kInvalid 0 has its own advantage in C++, 0 is false and there are other classes using 0 as invalid value also.

 

Yours,

Li

0 Likes