[Bf-blender-cvs] [084d911010f] master: Fix T81461: Weight paint crash with "Vertex Groups X Symmetry" option

Philipp Oeser noreply at git.blender.org
Wed Oct 7 10:16:15 CEST 2020


Commit: 084d911010fdc7905694e8be4f5d965f4f4d1415
Author: Philipp Oeser
Date:   Tue Oct 6 15:35:25 2020 +0200
Branches: master
https://developer.blender.org/rB084d911010fdc7905694e8be4f5d965f4f4d1415

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

===================================================================

M	source/blender/editors/sculpt_paint/paint_vertex.c

===================================================================

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:



More information about the Bf-blender-cvs mailing list