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:
authorPablo Dobarro <pablodp606@gmail.com>2020-06-30 22:53:48 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-07-01 20:03:22 +0300
commit6358c7754c322919368aef9580bfa5b9a0fa0b60 (patch)
treee316385b97fc0d7bee0f593164523a2999e30c57 /source/blender/editors/sculpt_paint/sculpt_smooth.c
parentbf5a656ff6840bdaf911abf5692271845377e2d9 (diff)
Cleanup: Add functions to check the first brush step and symmetry passes
This adds three functions to check the state of the stroke in the StrokeCache, removing the references to first_time and mirror_symmetry_pass from the code. This makes easier to understand what each code path is doing inside of each tool. Some tools were using mirror_symmetry_pass incorrectly, so this should also fix unreported bugs with radial and tiling symmetry related to that. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8164
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_smooth.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_smooth.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c
index aa82ae1d7ad..be03978aa5e 100644
--- a/source/blender/editors/sculpt_paint/sculpt_smooth.c
+++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c
@@ -612,8 +612,7 @@ void SCULPT_do_surface_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, in
Brush *brush = BKE_paint_brush(&sd->paint);
SculptSession *ss = ob->sculpt;
- if (ss->cache->first_time && ss->cache->mirror_symmetry_pass == 0 &&
- ss->cache->radial_symmetry_pass == 0) {
+ if (SCULPT_stroke_is_first_brush_step(ss->cache)) {
BLI_assert(ss->cache->surface_smooth_laplacian_disp == NULL);
ss->cache->surface_smooth_laplacian_disp = MEM_callocN(
SCULPT_vertex_count_get(ss) * 3 * sizeof(float), "HC smooth laplacian b");