Cleanup: Unused calculation in sculpt clay brush

Pull Request: https://projects.blender.org/blender/blender/pulls/116739
This commit is contained in:
Sergey Sharybin 2024-01-03 11:18:43 +01:00 committed by Sergey Sharybin
parent 46f3f53b16
commit 40953b0e39
1 changed files with 2 additions and 13 deletions

View File

@ -616,21 +616,16 @@ void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span<PBVHNode *> 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<PBVHNode *> 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;