From 40953b0e39d264a753c2a0b737ac12d3a2a380f2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 3 Jan 2024 11:18:43 +0100 Subject: [PATCH] Cleanup: Unused calculation in sculpt clay brush Pull Request: https://projects.blender.org/blender/blender/pulls/116739 --- .../editors/sculpt_paint/sculpt_brush_types.cc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_brush_types.cc b/source/blender/editors/sculpt_paint/sculpt_brush_types.cc index 663227f5db1..3d01fd522e2 100644 --- a/source/blender/editors/sculpt_paint/sculpt_brush_types.cc +++ b/source/blender/editors/sculpt_paint/sculpt_brush_types.cc @@ -616,21 +616,16 @@ void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span nodes) SculptSession *ss = ob->sculpt; Brush *brush = BKE_paint_brush(&sd->paint); - const float radius = ss->cache->radius; - const float offset = SCULPT_brush_plane_offset_get(sd, ss); - const float displace = radius * (0.25f + offset); - /* Sampled geometry normal and area center. */ float area_no_sp[3]; float area_no[3]; - float area_co[3]; + float area_co_tmp[3]; - float temp[3]; float mat[4][4]; float scale[4][4]; float tmat[4][4]; - SCULPT_calc_brush_plane(sd, ob, nodes, area_no_sp, area_co); + SCULPT_calc_brush_plane(sd, ob, nodes, area_no_sp, area_co_tmp); if (brush->sculpt_plane != SCULPT_DISP_DIR_AREA || (brush->flag & BRUSH_ORIGINAL_NORMAL)) { SCULPT_calc_area_normal(sd, ob, nodes, area_no); @@ -656,12 +651,6 @@ void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span nodes) return; } - /* Displace the brush planes. */ - copy_v3_v3(area_co, ss->cache->location); - mul_v3_v3v3(temp, area_no_sp, ss->cache->scale); - mul_v3_fl(temp, displace); - add_v3_v3(area_co, temp); - /* Initialize brush local-space matrix. */ cross_v3_v3v3(mat[0], area_no, ss->cache->grab_delta_symmetry); mat[0][3] = 0.0f;