[Bf-blender-cvs] [bf3c47226bc] temp-angavrilov: Weight Paint: relax heuristic to determine when final mesh can be used.

Alexander Gavrilov noreply at git.blender.org
Sat Oct 15 21:16:27 CEST 2022


Commit: bf3c47226bc5ad2dbaf12363917c0eca417ed23b
Author: Alexander Gavrilov
Date:   Sat Oct 15 22:07:03 2022 +0300
Branches: temp-angavrilov
https://developer.blender.org/rBbf3c47226bc5ad2dbaf12363917c0eca417ed23b

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 934cfb3cc46..98e026831c5 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -1785,8 +1785,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