[Bf-blender-cvs] [0847549] master: Fix T37685: automatic weights affected by face masking outside weight paint mode.

Brecht Van Lommel noreply at git.blender.org
Thu Jan 23 17:49:21 CET 2014


Commit: 08475490097cf7445423ddc57b8de9eac5f5470c
Author: Brecht Van Lommel
Date:   Thu Jan 23 17:47:20 2014 +0100
https://developer.blender.org/rB08475490097cf7445423ddc57b8de9eac5f5470c

Fix T37685: automatic weights affected by face masking outside weight paint mode.

Only when in weight paint mode should it check the selected vertices and faces,
in object mode it should just affect the entire mesh.

===================================================================

M	source/blender/editors/armature/meshlaplacian.c

===================================================================

diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 3b285e1..017d278 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -668,8 +668,9 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
 		return;
 
 	/* count triangles and create mask */
-	if ((use_face_sel = ((me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0)) ||
-	    (use_vert_sel = ((me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0)))
+	if (ob->mode == OB_MODE_WEIGHT_PAINT &&
+	    ((use_face_sel = ((me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0)) ||
+	     (use_vert_sel = ((me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0))))
 	{
 		mask = MEM_callocN(sizeof(int) * me->totvert, "heat_bone_weighting mask");




More information about the Bf-blender-cvs mailing list