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:
authorTon Roosendaal <ton@blender.org>2005-08-15 20:12:50 +0400
committerTon Roosendaal <ton@blender.org>2005-08-15 20:12:50 +0400
commit6bc3f4746bc5325d8e1ff54469ebb6929bf3bdb2 (patch)
treef69ac3f7c1f3e26ba44f81541b314455e0c98790 /source/blender/src/editarmature.c
parent3778c0813610afa127c5c5a353e25a82479fbf71 (diff)
A nice character modeling time-saver:
In WeightPaint mode, pose-mode armatures now allow selecting Bones, but without making the Armature object active. Selecting a Bone then results in selecting the associated vertexgroup. :) Little quirk; all armatures with posemode then draw selectable...
Diffstat (limited to 'source/blender/src/editarmature.c')
-rw-r--r--source/blender/src/editarmature.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index 7c6036b313e..9db631cc3f7 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -1700,12 +1700,12 @@ static int clear_active_flag(Object *ob, Bone *bone, void *data)
/* called from editview.c, for mode-less pose selection */
-void do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits)
+int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits)
{
Object *ob= base->object;
Bone *nearBone;
- if (!ob || !ob->pose) return;
+ if (!ob || !ob->pose) return 0;
nearBone= get_bone_from_selectbuffer(base, buffer, hits, 1);
@@ -1738,6 +1738,13 @@ void do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits)
}
}
+ /* in weightpaint we select the associated vertex group too */
+ if(G.f & G_WEIGHTPAINT) {
+ if(nearBone->flag & BONE_ACTIVE) {
+ vertexgroup_select_by_name(OBACT, nearBone->name);
+ }
+ }
+
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWACTION, 0);
allqueue(REDRAWIPO, 0); /* To force action ipo update */
@@ -1746,7 +1753,7 @@ void do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits)
allqueue(REDRAWOOPS, 0);
}
-// rightmouse_transform();
+ return nearBone!=NULL;
}