Cleanup: use local variable in smear code instead of ss->cache->bstrength

This commit is contained in:
Joseph Eagar 2022-07-04 01:19:14 -07:00
parent a720a4aabb
commit 7be07a9d6e
1 changed files with 3 additions and 3 deletions

View File

@ -427,7 +427,7 @@ static void do_smear_brush_task_cb_exec(void *__restrict userdata,
madd_v3_v3fl(current_disp, no, -dot_v3v3(current_disp, no));
normalize_v3_v3(current_disp_norm, current_disp);
mul_v3_v3fl(current_disp, current_disp_norm, ss->cache->bstrength);
mul_v3_v3fl(current_disp, current_disp_norm, bstrength);
float accum[4] = {0.0f, 0.0f, 0.0f, 0.0f};
float totw = 0.0f;
@ -457,12 +457,12 @@ static void do_smear_brush_task_cb_exec(void *__restrict userdata,
sub_v3_v3v3(vertex_disp, SCULPT_vertex_co_get(ss, ni.index), vd.co);
/* Weight by how close we are to our target distance from vd.co. */
float w = (1.0f + fabsf(len_v3(vertex_disp) / ss->cache->bstrength - 1.0f));
float w = (1.0f + fabsf(len_v3(vertex_disp) / bstrength - 1.0f));
/* TODO: use cotangents (or at least face areas) here. */
float len = len_v3v3(SCULPT_vertex_co_get(ss, ni.index), nco);
if (len > 0.0f) {
len = ss->cache->bstrength / len;
len = bstrength / len;
}
else { /* Coincident point. */
len = 1.0f;