[Bf-blender-cvs] [d666c64f5d6] blender-v3.4-release: Fix T103195: Initialize face sets from bevel weights broken

Hans Goudey noreply at git.blender.org
Wed Dec 14 22:23:26 CET 2022


Commit: d666c64f5d6939fec81bc51b8aed140e1c17ddf5
Author: Hans Goudey
Date:   Tue Dec 13 14:26:46 2022 -0600
Branches: blender-v3.4-release
https://developer.blender.org/rBd666c64f5d6939fec81bc51b8aed140e1c17ddf5

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