Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-07-04 11:19:14 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-07-04 11:19:14 +0300
commit7be07a9d6e26fde833e24957e8263e5e07af8d2f (patch)
treea7055147c2b3bb24e9e40f2e47915e0a9fe60495 /source/blender/editors/sculpt_paint/sculpt_paint_color.c
parenta720a4aabb44973a87d51e68037c0a694cdd0567 (diff)
Cleanup: use local variable in smear code instead of ss->cache->bstrength
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_paint_color.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_color.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
index ed56138adca..7e813590e21 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
@@ -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;