Fix T77473: Removing GPencil vertex group mix data
When removing a vertex group from a Grease Pencil object, if the vertex group is not the last one that was added, the information for the remaining groups weights gets mixed up. Minor edit of the patch for clang format. Differential Revision: https://developer.blender.org/D7943
This commit is contained in:
committed by
Antonio Vazquez
parent
f5781384ae
commit
7bd73f562a
@@ -1453,13 +1453,11 @@ void BKE_gpencil_vgroup_remove(Object *ob, bDeformGroup *defgroup)
|
||||
if (dw != NULL) {
|
||||
BKE_defvert_remove_group(dvert, dw);
|
||||
}
|
||||
else {
|
||||
/* Reorganize weights for other groups after deleted one. */
|
||||
for (int g = 0; g < totgrp; g++) {
|
||||
dw = BKE_defvert_find_index(dvert, g);
|
||||
if ((dw != NULL) && (dw->def_nr > def_nr)) {
|
||||
dw->def_nr--;
|
||||
}
|
||||
/* Reorganize weights for other groups after deleted one. */
|
||||
for (int g = 0; g < totgrp; g++) {
|
||||
dw = BKE_defvert_find_index(dvert, g);
|
||||
if ((dw != NULL) && (dw->def_nr > def_nr)) {
|
||||
dw->def_nr--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user