Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_undo.c
| Show First 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | static void sculpt_undo_bmesh_restore_generic(bContext *C, | ||||
| if (unode->type == SCULPT_UNDO_MASK) { | if (unode->type == SCULPT_UNDO_MASK) { | ||||
| int totnode; | int totnode; | ||||
| PBVHNode **nodes; | PBVHNode **nodes; | ||||
| Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | ||||
| BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); | BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); | ||||
| TaskParallelSettings settings; | PBVHParallelSettings settings; | ||||
| BKE_pbvh_parallel_range_settings(&settings, (sd->flags & SCULPT_USE_OPENMP), totnode); | BKE_pbvh_parallel_range_settings(&settings, (sd->flags & SCULPT_USE_OPENMP), totnode); | ||||
| BLI_task_parallel_range( | BKE_pbvh_parallel_range( | ||||
| 0, totnode, nodes, sculpt_undo_bmesh_restore_generic_task_cb, &settings); | 0, totnode, nodes, sculpt_undo_bmesh_restore_generic_task_cb, &settings); | ||||
| if (nodes) { | if (nodes) { | ||||
| MEM_freeN(nodes); | MEM_freeN(nodes); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| sculpt_pbvh_clear(ob); | sculpt_pbvh_clear(ob); | ||||
| ▲ Show 20 Lines • Show All 950 Lines • Show Last 20 Lines | |||||