diff options
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator.c')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 0f4848d9120..86e83715da4 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -55,6 +55,7 @@ #include "RNA_access.h" +#include "BKE_action.h" #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_global.h" @@ -185,18 +186,9 @@ void gimbal_axis(Object *ob, float gmat[][3]) { if(ob->mode & OB_MODE_POSE) { - bPoseChannel *pchan= NULL; + bPoseChannel *pchan= get_active_posechannel(ob); - /* use channels to get stats */ - for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - if (pchan->bone && pchan->bone->flag & BONE_ACTIVE) { - if(test_rotmode_euler(pchan->rotmode)) { - break; - } - } - } - - if(pchan) { + if(pchan && test_rotmode_euler(pchan->rotmode)) { float mat[3][3], tmat[3][3], obmat[3][3]; EulToGimbalAxis(mat, pchan->eul, pchan->rotmode); |