diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-16 04:19:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-16 04:19:37 +0300 |
commit | 7e0f9229d6e9133338c6e5170699722989b1b8d5 (patch) | |
tree | c044d667873ccc84844bce189f00c4653d8d965f /source/blender/makesdna | |
parent | 7a7b4aff40e1f25cffe92abbc73637e995cf4ef3 (diff) |
fix for fix, r33086.
- incorrect range check broke ZYX euler rotations, use MIN/MAX constants so this doesn't happen again.
- BGE Armature PyAPI also wasn't using correct min/max with rotation modes.
- clamp on file read rather then when calling the rotation functions, so developers don't use invalid args without realizing it.
- added assert() checks for debug builds so invalid axis constants don't slip through.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 6f6e4978cfc..d9144469917 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -309,9 +309,11 @@ typedef enum eRotationModes { /* NOTE: space is reserved here for 18 other possible * euler rotation orders not implemented */ - ROT_MODE_MAX, /* sentinel for Py API */ /* axis angle rotations */ - ROT_MODE_AXISANGLE = -1 + ROT_MODE_AXISANGLE = -1, + + ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */ + ROT_MODE_MAX = ROT_MODE_ZYX } eRotationModes; /* Pose ------------------------------------ */ |