[Bf-blender-cvs] [8ee020d11fe] master: Fix T103195: Initialize face sets from bevel weights broken

Hans Goudey noreply at git.blender.org
Tue Dec 13 22:18:27 CET 2022


Commit: 8ee020d11fe8debfd64274658d71d0d60b27e676
Author: Hans Goudey
Date:   Tue Dec 13 14:26:46 2022 -0600
Branches: master
https://developer.blender.org/rB8ee020d11fe8debfd64274658d71d0d60b27e676

Fix T103195: Initialize face sets from bevel weights broken

The conversion from char to float (divide by 255) wasn't removed in
291c313f80b4cccc8fcc. Also fix a crash when the edge crease layer
didn't exist.

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

M	source/blender/editors/sculpt_paint/sculpt_face_set.cc

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
index d0c8a19434b..7253a41f97f 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc
@@ -692,7 +692,7 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op)
           CustomData_get_layer(&mesh->edata, CD_CREASE));
       sculpt_face_sets_init_flood_fill(
           ob, [&](const int /*from_face*/, const int edge, const int /*to_face*/) -> bool {
-            return creases[edge] < threshold;
+            return creases ? creases[edge] < threshold : true;
           });
       break;
     }
@@ -709,7 +709,7 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op)
           CustomData_get_layer(&mesh->edata, CD_BWEIGHT));
       sculpt_face_sets_init_flood_fill(
           ob, [&](const int /*from_face*/, const int edge, const int /*to_face*/) -> bool {
-            return bevel_weights ? bevel_weights[edge] / 255.0f < threshold : true;
+            return bevel_weights ? bevel_weights[edge] < threshold : true;
           });
       break;
     }



More information about the Bf-blender-cvs mailing list