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.
This commit is contained in:
parent
c37e8ecc50
commit
0847549009
Notes:
blender-bot
2023-02-14 11:32:11 +01:00
Referenced by issue #37685, Automatic Weighting of Armature Fails Unless Normals Recalculated
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue