diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index 9c3f44f6a71..28586620d59 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -818,7 +818,7 @@ static int sculpt_brush_needs_normal(const SculptSession &ss, const Sculpt &sd, using namespace blender::ed::sculpt_paint; const MTex *mask_tex = BKE_brush_mask_texture_get(&brush, OB_MODE_SCULPT); return ((bke::brush::supports_normal_weight(brush) && (ss.cache->normal_weight > 0.0f)) || - auto_mask::needs_normal(ss, sd, &brush) || + auto_mask::needs_normal(sd, &brush) || ELEM(brush.sculpt_brush_type, SCULPT_BRUSH_TYPE_BLOB, SCULPT_BRUSH_TYPE_CREASE, diff --git a/source/blender/editors/sculpt_paint/sculpt_automask.hh b/source/blender/editors/sculpt_paint/sculpt_automask.hh index 90f1311b270..e5eea0c4d96 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automask.hh +++ b/source/blender/editors/sculpt_paint/sculpt_automask.hh @@ -112,7 +112,7 @@ std::unique_ptr cache_init(const Depsgraph &depsgraph, bool mode_enabled(const Sculpt &sd, const Brush *br, eAutomasking_flag mode); bool is_enabled(const Sculpt &sd, const Object &object, const Brush *br); -bool needs_normal(const SculptSession &ss, const Sculpt &sd, const Brush *brush); +bool needs_normal(const Sculpt &sd, const Brush *brush); /** * Calculate all auto-masking influence on each vertex. diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc index cd8bef722e4..608ac284697 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc @@ -115,11 +115,9 @@ static int calc_effective_bits(const Sculpt &sd, const Brush *brush) return sd.automasking_flags; } -bool needs_normal(const SculptSession & /*ss*/, const Sculpt &sd, const Brush *brush) +bool needs_normal(const Sculpt &sd, const Brush *brush) { - int flags = calc_effective_bits(sd, brush); - - return flags & (BRUSH_AUTOMASKING_BRUSH_NORMAL | BRUSH_AUTOMASKING_VIEW_NORMAL); + return calc_effective_bits(sd, brush) & BRUSH_AUTOMASKING_BRUSH_NORMAL; } static float normal_calc(const float3 &compare_normal,