diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-10 00:03:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-10 00:03:54 +0300 |
commit | 5935ef004935b27fc5795349aed32f87cf637049 (patch) | |
tree | f36022abb03938420606405e9afc841b14d4bd81 /source/blender/editors/transform | |
parent | 3e2766bc2ee7523ea68caedc5b11e9498ddcbbc1 (diff) |
use armature active bone as a pointer rather then a flag for each bone that needs looking up.
- rna vars arm.bones.active & rna.edit_bones.active
- needed special undo support.
- readfile.c loads.
- duplicate and copy_armature support.
- keep the draw flag, renamed to BONE_DRAW_ACTIVE, only use for openGL drawing.
Note: it may be better to allow active/unselected as with objects.
Diffstat (limited to 'source/blender/editors/transform')
-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); |