Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_mask_expand.c
| Show First 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | SculptThreadedTaskData data = { | ||||
| .ob = ob, | .ob = ob, | ||||
| .nodes = ss->filter_cache->nodes, | .nodes = ss->filter_cache->nodes, | ||||
| .mask_expand_update_it = mask_expand_update_it, | .mask_expand_update_it = mask_expand_update_it, | ||||
| .mask_expand_use_normals = RNA_boolean_get(op->ptr, "use_normals"), | .mask_expand_use_normals = RNA_boolean_get(op->ptr, "use_normals"), | ||||
| .mask_expand_invert_mask = RNA_boolean_get(op->ptr, "invert"), | .mask_expand_invert_mask = RNA_boolean_get(op->ptr, "invert"), | ||||
| .mask_expand_keep_prev_mask = RNA_boolean_get(op->ptr, "keep_previous_mask"), | .mask_expand_keep_prev_mask = RNA_boolean_get(op->ptr, "keep_previous_mask"), | ||||
| .mask_expand_create_face_set = RNA_boolean_get(op->ptr, "create_face_set"), | .mask_expand_create_face_set = RNA_boolean_get(op->ptr, "create_face_set"), | ||||
| }; | }; | ||||
| PBVHParallelSettings settings; | TaskParallelSettings settings; | ||||
| BKE_pbvh_parallel_range_settings( | BKE_pbvh_parallel_range_settings( | ||||
| &settings, (sd->flags & SCULPT_USE_OPENMP), ss->filter_cache->totnode); | &settings, (sd->flags & SCULPT_USE_OPENMP), ss->filter_cache->totnode); | ||||
| BKE_pbvh_parallel_range(0, ss->filter_cache->totnode, &data, sculpt_expand_task_cb, &settings); | BLI_task_parallel_range(0, ss->filter_cache->totnode, &data, sculpt_expand_task_cb, &settings); | ||||
| ss->filter_cache->mask_update_current_it = mask_expand_update_it; | ss->filter_cache->mask_update_current_it = mask_expand_update_it; | ||||
| } | } | ||||
| SCULPT_flush_update_step(C, SCULPT_UPDATE_MASK); | SCULPT_flush_update_step(C, SCULPT_UPDATE_MASK); | ||||
| return OPERATOR_RUNNING_MODAL; | return OPERATOR_RUNNING_MODAL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | SculptThreadedTaskData data = { | ||||
| .ob = ob, | .ob = ob, | ||||
| .nodes = ss->filter_cache->nodes, | .nodes = ss->filter_cache->nodes, | ||||
| .mask_expand_update_it = 0, | .mask_expand_update_it = 0, | ||||
| .mask_expand_use_normals = RNA_boolean_get(op->ptr, "use_normals"), | .mask_expand_use_normals = RNA_boolean_get(op->ptr, "use_normals"), | ||||
| .mask_expand_invert_mask = RNA_boolean_get(op->ptr, "invert"), | .mask_expand_invert_mask = RNA_boolean_get(op->ptr, "invert"), | ||||
| .mask_expand_keep_prev_mask = RNA_boolean_get(op->ptr, "keep_previous_mask"), | .mask_expand_keep_prev_mask = RNA_boolean_get(op->ptr, "keep_previous_mask"), | ||||
| .mask_expand_create_face_set = RNA_boolean_get(op->ptr, "create_face_set"), | .mask_expand_create_face_set = RNA_boolean_get(op->ptr, "create_face_set"), | ||||
| }; | }; | ||||
| PBVHParallelSettings settings; | TaskParallelSettings settings; | ||||
| BKE_pbvh_parallel_range_settings( | BKE_pbvh_parallel_range_settings( | ||||
| &settings, (sd->flags & SCULPT_USE_OPENMP), ss->filter_cache->totnode); | &settings, (sd->flags & SCULPT_USE_OPENMP), ss->filter_cache->totnode); | ||||
| BKE_pbvh_parallel_range(0, ss->filter_cache->totnode, &data, sculpt_expand_task_cb, &settings); | BLI_task_parallel_range(0, ss->filter_cache->totnode, &data, sculpt_expand_task_cb, &settings); | ||||
| const char *status_str = TIP_( | const char *status_str = TIP_( | ||||
| "Move the mouse to expand the mask from the active vertex. LMB: confirm mask, ESC/RMB: " | "Move the mouse to expand the mask from the active vertex. LMB: confirm mask, ESC/RMB: " | ||||
| "cancel"); | "cancel"); | ||||
| ED_workspace_status_text(C, status_str); | ED_workspace_status_text(C, status_str); | ||||
| SCULPT_flush_update_step(C, SCULPT_UPDATE_MASK); | SCULPT_flush_update_step(C, SCULPT_UPDATE_MASK); | ||||
| WM_event_add_modal_handler(C, op); | WM_event_add_modal_handler(C, op); | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||