Fix T68480: Normalize All weights with lock Active bug

The original code had 0 as a magic number in the test whether the weight
belongs to a locked group, instead of comparing it to the actual group
number.

Thanks @mano-wii for providing the diff.
This commit is contained in:
Sybren A. Stüvel 2020-01-14 15:13:19 +01:00
parent 042e4daa72
commit 9ad0b7f8c7
Notes: blender-bot 2023-02-14 06:21:59 +01:00
Referenced by issue #68480, Normalize All weights with lock Active bug.
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ void defvert_normalize_lock_single(MDeformVert *dvert,
else if (dvert->totweight == 1) {
MDeformWeight *dw = dvert->dw;
if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) {
if (def_nr_lock != 0) {
if (def_nr_lock != dw->def_nr) {
dw->weight = 1.0f;
}
}