diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2013-01-20 03:52:33 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2013-01-20 03:52:33 +0400 |
commit | 383987560b764cc8dd43820628b022614a3f2563 (patch) | |
tree | 67e62f93111f5684465a5916c8a8ca67c90db1ff /source/blender/editors/sculpt_paint | |
parent | 9a50f454697e5dea6e8603aa90fadaa6156657d6 (diff) |
Disable OpenMP with dyntopo in paint_mesh_restore_co()
Otherwise, new entries might be inserted by sculpt_undo_push_node()
into the GHash used internally by BM_log_original_vert_co() by a
different thread.
Fixes bug [#33787]
http://projects.blender.org/tracker/?func=detail&aid=33787&group_id=9&atid=498
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index fa739a9e98d..15d28910eac 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -430,7 +430,11 @@ static void paint_mesh_restore_co(Sculpt *sd, Object *ob) BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); - #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) + /* Disable OpenMP when dynamic-topology is enabled. Otherwise, new + * entries might be inserted by sculpt_undo_push_node() into the + * GHash used internally by BM_log_original_vert_co() by a + * different thread. [#33787] */ + #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP && !ss->bm) for (n = 0; n < totnode; n++) { SculptUndoNode *unode; SculptUndoType type = (brush->sculpt_tool == SCULPT_TOOL_MASK ? |