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:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-08-16 01:46:25 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-08-16 01:46:25 +0400
commitb8aff064662d5c89f909c31ffac216286270d185 (patch)
treea27469c270cabd35a52ce3dbee381e5048c7d220 /source/blender/editors/armature
parente182d653709a9abd664deaa874f0727ebba83832 (diff)
2.5/Paint:
* Weightpaint is now object-local like sculpt and vertexpaint. * Fixed a bug spotted by DingTo, going from editmode to sculptmode didn't fully leave editmode
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c8
-rw-r--r--source/blender/editors/armature/poseobject.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index c1b24375b3d..07da42e4cbb 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -4332,7 +4332,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
}
/* in weightpaint we select the associated vertex group too */
- if (G.f & G_WEIGHTPAINT) {
+ if (ob->mode & OB_MODE_WEIGHT_PAINT) {
if (nearBone->flag & BONE_ACTIVE) {
vertexgroup_select_by_name(OBACT, nearBone->name);
DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
@@ -4424,7 +4424,7 @@ static int bone_skinnable(Object *ob, Bone *bone, void *datap)
int a, segments;
struct { Object *armob; void *list; int heat; } *data = datap;
- if(!(G.f & G_WEIGHTPAINT) || !(bone->flag & BONE_HIDDEN_P)) {
+ if(!(ob->mode & OB_MODE_WEIGHT_PAINT) || !(bone->flag & BONE_HIDDEN_P)) {
if (!(bone->flag & BONE_NO_DEFORM)) {
if (data->heat && data->armob->pose && get_pose_channel(data->armob->pose, bone->name))
segments = bone->segments;
@@ -4489,7 +4489,7 @@ static int dgroup_skinnable(Object *ob, Bone *bone, void *datap)
int a, segments;
struct { Object *armob; void *list; int heat; } *data= datap;
- if (!(G.f & G_WEIGHTPAINT) || !(bone->flag & BONE_HIDDEN_P)) {
+ if (!(ob->mode & OB_MODE_WEIGHT_PAINT) || !(bone->flag & BONE_HIDDEN_P)) {
if (!(bone->flag & BONE_NO_DEFORM)) {
if (data->heat && data->armob->pose && get_pose_channel(data->armob->pose, bone->name))
segments = bone->segments;
@@ -4588,7 +4588,7 @@ void add_verts_to_dgroups(Scene *scene, Object *ob, Object *par, int heat, int m
float (*root)[3], (*tip)[3], (*verts)[3];
int *selected;
int numbones, vertsfilled = 0, i, j, segments = 0;
- int wpmode = (G.f & G_WEIGHTPAINT);
+ int wpmode = (ob->mode & OB_MODE_WEIGHT_PAINT);
struct { Object *armob; void *list; int heat; } looper_data;
looper_data.armob = par;
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 63f18ca6caf..fe723a875a2 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1647,7 +1647,7 @@ void pose_activate_flipped_bone(Scene *scene)
if(ob==NULL) return;
- if(G.f & G_WEIGHTPAINT) {
+ if(ob->mode && OB_MODE_WEIGHT_PAINT) {
ob= modifiers_isDeformedByArmature(ob);
}
if(ob && (ob->flag & OB_POSEMODE)) {
@@ -1671,7 +1671,7 @@ void pose_activate_flipped_bone(Scene *scene)
pchanf->bone->flag |= (BONE_SELECTED|BONE_ACTIVE);
/* in weightpaint we select the associated vertex group too */
- if(G.f & G_WEIGHTPAINT) {
+ if(ob->mode & OB_MODE_WEIGHT_PAINT) {
vertexgroup_select_by_name(OBACT, name);
DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}