diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-28 22:26:57 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-29 16:27:37 +0300 |
commit | 8b00a73620d9635e0ceab82e227dcbd540c4b45a (patch) | |
tree | 42e88e574b738c40a82453ed3e40f90401418c8b /source/blender/editors/sculpt_paint/sculpt_undo.c | |
parent | 1ca105ebdccc386aa0a49e5d323be65123881243 (diff) |
Cleanup: move sculpt parallel range threading test into function
Easier to experiment with different settings this way.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 3ba2847a374..788d07f6e78 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -347,8 +347,7 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C, BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); TaskParallelSettings settings; - BLI_parallel_range_settings_defaults(&settings); - settings.use_threading = ((sd->flags & SCULPT_USE_OPENMP) && totnode > SCULPT_THREADED_LIMIT); + BKE_pbvh_parallel_range_settings(&settings, (sd->flags & SCULPT_USE_OPENMP), totnode); BLI_task_parallel_range( 0, totnode, nodes, sculpt_undo_bmesh_restore_generic_task_cb, &settings); |