From 084d911010fdc7905694e8be4f5d965f4f4d1415 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 6 Oct 2020 15:35:25 +0200 Subject: Fix T81461: Weight paint crash with "Vertex Groups X Symmetry" option In that case, weightpainting would still be done threaded, but current mirroring code cannot be run in parallel. Caused by rB5502517c3c12 [which was checking mesh 'flag', needs to be 'editflag' -- thus test was always true]. Reviewers: pablodp606 Maniphest Tasks: T81461 Differential Revision: https://developer.blender.org/D9126 --- source/blender/editors/sculpt_paint/paint_vertex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index faf2c122867..6472da48f40 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2173,8 +2173,8 @@ static void wpaint_paint_leaves(bContext *C, /* NOTE: current mirroring code cannot be run in parallel */ TaskParallelSettings settings; - BKE_pbvh_parallel_range_settings( - &settings, !(me->flag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY), totnode); + const bool use_threading = ((me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY) == 0); + BKE_pbvh_parallel_range_settings(&settings, use_threading, totnode); switch ((eBrushWeightPaintTool)brush->weightpaint_tool) { case WPAINT_TOOL_AVERAGE: -- cgit v1.2.3