Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-10 00:03:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-10 00:03:54 +0300
commit5935ef004935b27fc5795349aed32f87cf637049 (patch)
treef36022abb03938420606405e9afc841b14d4bd81 /source/blender/editors/sculpt_paint
parent3e2766bc2ee7523ea68caedc5b11e9498ddcbbc1 (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/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 408f4862b6f..2045397f3c9 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1104,12 +1104,10 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
/* verify if active weight group is also active bone */
par= modifiers_isDeformedByArmature(ob);
if(par && (par->mode & OB_MODE_POSE)) {
- bPoseChannel *pchan;
- for(pchan= par->pose->chanbase.first; pchan; pchan= pchan->next)
- if(pchan->bone->flag & BONE_ACTIVE)
- break;
- if(pchan)
- ED_vgroup_select_by_name(ob, pchan->name);
+ bArmature *arm= ob->data;
+
+ if(arm->act_bone)
+ ED_vgroup_select_by_name(ob, arm->act_bone->name);
}
}
else {