[Bf-blender-cvs] [f43c2d9abe0] master: Armature Modifier: skip non-deforming vertices in Multi-Modifier mode.
Alexander Gavrilov
noreply at git.blender.org
Fri Oct 7 12:12:02 CEST 2022
Commit: f43c2d9abe0f8b6efca8fa803774a065a6749a88
Author: Alexander Gavrilov
Date: Mon Oct 3 15:18:28 2022 +0300
Branches: master
https://developer.blender.org/rBf43c2d9abe0f8b6efca8fa803774a065a6749a88
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
===================================================================
M source/blender/blenkernel/intern/armature_deform.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list