From a205e341581c2e35d7131ec4e94ed17c31a3a3ea Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Mon, 14 Oct 2024 17:23:10 +0200 Subject: [PATCH] Fix #128933: Dyntopo density brush prints constant console errors The brush does not use the value calculated from brush_strength, this commit silences the assert by just handling the case statement for this brush type with a static value of 0.0f. Pull Request: https://projects.blender.org/blender/blender/pulls/128936 --- source/blender/editors/sculpt_paint/sculpt.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index b26e91afb14..66fc62d02a2 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -2204,6 +2204,10 @@ static float brush_strength(const Sculpt &sd, case SCULPT_BRUSH_TYPE_POSE: case SCULPT_BRUSH_TYPE_BOUNDARY: return root_alpha * feather; + case SCULPT_BRUSH_TYPE_SIMPLIFY: + /* The Dyntopo Density brush does not use a normal brush workflow to calculate the effect, + * and this strength value is unused. */ + return 0.0f; } BLI_assert_unreachable(); return 0.0f;