Cleanup: Unused calculation in sculpt clay brush
Pull Request: https://projects.blender.org/blender/blender/pulls/116739
This commit is contained in:
parent
46f3f53b16
commit
40953b0e39
@ -616,21 +616,16 @@ void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span<PBVHNode *> nodes)
|
|||||||
SculptSession *ss = ob->sculpt;
|
SculptSession *ss = ob->sculpt;
|
||||||
Brush *brush = BKE_paint_brush(&sd->paint);
|
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. */
|
/* Sampled geometry normal and area center. */
|
||||||
float area_no_sp[3];
|
float area_no_sp[3];
|
||||||
float area_no[3];
|
float area_no[3];
|
||||||
float area_co[3];
|
float area_co_tmp[3];
|
||||||
|
|
||||||
float temp[3];
|
|
||||||
float mat[4][4];
|
float mat[4][4];
|
||||||
float scale[4][4];
|
float scale[4][4];
|
||||||
float tmat[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)) {
|
if (brush->sculpt_plane != SCULPT_DISP_DIR_AREA || (brush->flag & BRUSH_ORIGINAL_NORMAL)) {
|
||||||
SCULPT_calc_area_normal(sd, ob, nodes, area_no);
|
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;
|
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. */
|
/* Initialize brush local-space matrix. */
|
||||||
cross_v3_v3v3(mat[0], area_no, ss->cache->grab_delta_symmetry);
|
cross_v3_v3v3(mat[0], area_no, ss->cache->grab_delta_symmetry);
|
||||||
mat[0][3] = 0.0f;
|
mat[0][3] = 0.0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user