[Bf-blender-cvs] [660c47596e1] master: Weight Paint: relax heuristic to determine when final mesh can be used.

Alexander Gavrilov noreply at git.blender.org
Mon Oct 17 15:48:58 CEST 2022


Commit: 660c47596e17229dbadca2b129767ec9a17338e9
Author: Alexander Gavrilov
Date:   Sat Oct 15 22:07:03 2022 +0300
Branches: master
https://developer.blender.org/rB660c47596e17229dbadca2b129767ec9a17338e9

Weight Paint: relax heuristic to determine when final mesh can be used.

Checking for polygon and loop data to be referenced is too fragile
re changes in geometry node implementations. Instead, compare counts
of polygons, face corners and vertices: topology changes are unlikely
to keep all three unchanged.

Ref D15501

===================================================================

M	source/blender/blenkernel/intern/paint.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc
index 9248e4d520e..13243925b28 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -1786,8 +1786,8 @@ static void sculpt_update_object(
       /* If the fully evaluated mesh has the same topology as the deform-only version, use it.
        * This matters because crazyspace evaluation is very restrictive and excludes even modifiers
        * that simply recompute vertex weights (which can even include Geometry Nodes). */
-      if (me_eval_deform->polys().data() == me_eval->polys().data() &&
-          me_eval_deform->loops().data() == me_eval->loops().data() &&
+      if (me_eval_deform->totpoly == me_eval->totpoly &&
+          me_eval_deform->totloop == me_eval->totloop &&
           me_eval_deform->totvert == me_eval->totvert) {
         BKE_sculptsession_free_deformMats(ss);



More information about the Bf-blender-cvs mailing list