diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-02 20:24:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-02 20:24:06 +0300 |
commit | 072a39004eef9f1eb479153888f0bf67b05aa125 (patch) | |
tree | b103000cdc8e7f8ac9465a79ccca82d3720f509a /source/blender/editors/armature/poseobject.c | |
parent | 67fd40f54c9f36f47974e8f7785aee8f415f2a69 (diff) |
- "selected_pchans" is now at screen level context (not just view3d) so can use for adding bones to a group.
- separate assign to Y key rather then Ctrl+4
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r-- | source/blender/editors/armature/poseobject.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index f04aaafb97f..696fa65b33a 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -1310,7 +1310,6 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) Object *ob; bArmature *arm; bPose *pose; - bPoseChannel *pchan; short done= 0; /* since this call may also be used from the buttons window, we need to check for where to get the object */ @@ -1334,18 +1333,12 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op) /* add selected bones to group then */ // NOTE: unfortunately, we cannot use the context-iterators here, since they might not be defined... - // CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) - for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) { - /* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */ - // NOTE: sync this view3d_context() in space_view3d.c - if ((pchan->bone) && (arm->layer & pchan->bone->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) { - if (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) { - pchan->agrp_index= pose->active_group; - done= 1; - } - } + CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) { + pchan->agrp_index= pose->active_group; + done= 1; } - + CTX_DATA_END; + /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); |