Armature Modifier: skip non-deforming vertices in Multi-Modifier mode.

The modifier already contained a check to skip complex processing of
vertices that won't produce any deformation due to the vertex group
mask, but this only works for the non-Multi Modifier case. This adds
a similar check for the Multi Modifier mode.

Differential Revision: https://developer.blender.org/D16152
This commit is contained in:
Alexander Gavrilov 2022-10-03 15:18:28 +03:00
parent f7a781d45f
commit f43c2d9abe
1 changed files with 15 additions and 5 deletions

View File

@ -301,12 +301,22 @@ static void armature_vert_task_with_dvert(const ArmatureUserdata *data,
}
/* check if there's any point in calculating for this vert */
if (armature_weight == 0.0f) {
return;
}
if (vert_coords_prev) {
if (prevco_weight == 1.0f) {
return;
}
/* get the coord we work on */
co = vert_coords_prev ? vert_coords_prev[i] : vert_coords[i];
/* get the coord we work on */
co = vert_coords_prev[i];
}
else {
if (armature_weight == 0.0f) {
return;
}
/* get the coord we work on */
co = vert_coords[i];
}
/* Apply the object's matrix */
mul_m4_v3(data->premat, co);