diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2022-10-03 15:18:28 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2022-10-07 13:11:44 +0300 |
commit | f43c2d9abe0f8b6efca8fa803774a065a6749a88 (patch) | |
tree | 6f0bd3dc9aa95cec24060e515a253954bd22f458 /source | |
parent | f7a781d45fcc79844c4d7fc8a17ede3d6cfc1eaf (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/armature_deform.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/armature_deform.c b/source/blender/blenkernel/intern/armature_deform.c index 4acbcbfb13e..89afb886fc2 100644 --- a/source/blender/blenkernel/intern/armature_deform.c +++ b/source/blender/blenkernel/intern/armature_deform.c @@ -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[i]; } + else { + if (armature_weight == 0.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[i]; + } /* Apply the object's matrix */ mul_m4_v3(data->premat, co); |