From 0d3788ff00a8e23fc70bf74222ab58f140494d2b Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Sun, 31 Aug 2025 00:04:12 +0200 Subject: [PATCH] Sculpt: Remove hardcoded plane offset value for clay brushes The Clay and Clay Strips brush have a built-in hardcoded Plane Offset of 0.40m and 0.18m, respectively. This value is added to the displacement scalar after the pressure sensitivity is factored into the calculation, leading to the pre-bundled essential assets not responding to tablet pressure when enabled and potentially confusing behavior otherwise. Pull Request: https://projects.blender.org/blender/blender/pulls/144382 --- assets/brushes/essentials_brushes-mesh_sculpt.blend | 4 ++-- source/blender/editors/sculpt_paint/brushes/clay.cc | 2 +- source/blender/editors/sculpt_paint/brushes/clay_strips.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/brushes/essentials_brushes-mesh_sculpt.blend b/assets/brushes/essentials_brushes-mesh_sculpt.blend index 0c155f55562..ed4ea560579 100644 --- a/assets/brushes/essentials_brushes-mesh_sculpt.blend +++ b/assets/brushes/essentials_brushes-mesh_sculpt.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0357ed7ac2b362ec3d37caf638539a7cf1a0625306c5cbb7f840640761e602d -size 2629923 +oid sha256:cd3d1272f052ebe55607a642592675af6388f8e42de950f3790b03f11b43b035 +size 2623955 diff --git a/source/blender/editors/sculpt_paint/brushes/clay.cc b/source/blender/editors/sculpt_paint/brushes/clay.cc index 31bc7826d91..2a59fa3e479 100644 --- a/source/blender/editors/sculpt_paint/brushes/clay.cc +++ b/source/blender/editors/sculpt_paint/brushes/clay.cc @@ -166,7 +166,7 @@ void do_clay_brush(const Depsgraph &depsgraph, /* This implementation skips a factor calculation as it currently has * no user-facing impact (i.e. is effectively a constant) * See: #123518 */ - float displace = fabsf(initial_radius * (0.25f + offset + 0.15f)); + float displace = fabsf(initial_radius * offset); const bool flip = ss.cache->bstrength < 0.0f; if (flip) { diff --git a/source/blender/editors/sculpt_paint/brushes/clay_strips.cc b/source/blender/editors/sculpt_paint/brushes/clay_strips.cc index 2d89c4c06b5..9393df93c7c 100644 --- a/source/blender/editors/sculpt_paint/brushes/clay_strips.cc +++ b/source/blender/editors/sculpt_paint/brushes/clay_strips.cc @@ -468,8 +468,8 @@ CursorSampleResult calc_node_mask(const Depsgraph &depsgraph, const SculptSession &ss = *object.sculpt; const bool flip = (ss.cache->bstrength < 0.0f); - const float offset = brush_plane_offset_get(brush, ss); - const float displace = ss.cache->radius * (0.18f + offset) * (flip ? -1.0f : 1.0f); + const float displace = ss.cache->radius * brush_plane_offset_get(brush, ss) * + (flip ? -1.0f : 1.0f); /* TODO: Test to see if the sqrt2 extra factor can be removed */ const float initial_radius_squared = math::square(ss.cache->radius * math::numbers::sqrt2);