diff options
author | Alexander Gavrilov <alexander.gavrilov@jetbrains.com> | 2017-10-02 17:33:51 +0300 |
---|---|---|
committer | Alexander Gavrilov <alexander.gavrilov@jetbrains.com> | 2017-10-02 17:33:51 +0300 |
commit | 88dd45e1e1bde5db43e8807b7def754dea8b01fc (patch) | |
tree | 94b483ef17072260ac81ef377ed13c0cd450f2ff /source/blender/editors | |
parent | 64afba0244c28050c26466cfff3cfe31771a6a80 (diff) |
Disable multithreaded weight paint when mirroring is enabled.
Mirroring writes to the mirror vertex within the direct vertex
draw function, which violates assumptions required for processing
vertices in parallel.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index ea85ae70794..4dd218114f6 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1841,27 +1841,30 @@ static void wpaint_paint_leaves( .sd = sd, .ob = ob, .brush = brush, .nodes = nodes, .vp = vp, .wpd = wpd, .wpi = wpi, .me = me, .C = C, }; + /* current mirroring code cannot be run in parallel */ + bool use_threading = !(me->editflag & ME_EDIT_MIRROR_X); + switch (brush->vertexpaint_tool) { case PAINT_BLEND_AVERAGE: calculate_average_weight(&data, nodes, totnode); BLI_task_parallel_range_ex( 0, totnode, &data, NULL, 0, - do_wpaint_brush_draw_task_cb_ex, true, false); + do_wpaint_brush_draw_task_cb_ex, use_threading, false); break; case PAINT_BLEND_SMEAR: BLI_task_parallel_range_ex( 0, totnode, &data, NULL, 0, - do_wpaint_brush_smear_task_cb_ex, true, false); + do_wpaint_brush_smear_task_cb_ex, use_threading, false); break; case PAINT_BLEND_BLUR: BLI_task_parallel_range_ex( 0, totnode, &data, NULL, 0, - do_wpaint_brush_blur_task_cb_ex, true, false); + do_wpaint_brush_blur_task_cb_ex, use_threading, false); break; default: BLI_task_parallel_range_ex( 0, totnode, &data, NULL, 0, - do_wpaint_brush_draw_task_cb_ex, true, false); + do_wpaint_brush_draw_task_cb_ex, use_threading, false); break; } } |