Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_mask_expand.c
| Show First 20 Lines • Show All 372 Lines • ▼ Show 20 Lines | static int sculpt_mask_expand_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); | BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); | ||||
| int vertex_count = SCULPT_vertex_count_get(ss); | int vertex_count = SCULPT_vertex_count_get(ss); | ||||
| ss->filter_cache = MEM_callocN(sizeof(FilterCache), "filter cache"); | ss->filter_cache = MEM_callocN(sizeof(FilterCache), "filter cache"); | ||||
| BKE_pbvh_search_gather(pbvh, NULL, NULL, &ss->filter_cache->nodes, &ss->filter_cache->totnode); | BKE_pbvh_search_gather(pbvh, NULL, NULL, &ss->filter_cache->nodes, &ss->filter_cache->totnode); | ||||
| SCULPT_undo_push_begin("Mask Expand"); | SCULPT_undo_push_begin(ob, "Mask Expand"); | ||||
| if (create_face_set) { | if (create_face_set) { | ||||
| SCULPT_undo_push_node(ob, ss->filter_cache->nodes[0], SCULPT_UNDO_FACE_SETS); | SCULPT_undo_push_node(ob, ss->filter_cache->nodes[0], SCULPT_UNDO_FACE_SETS); | ||||
| for (int i = 0; i < ss->filter_cache->totnode; i++) { | for (int i = 0; i < ss->filter_cache->totnode; i++) { | ||||
| BKE_pbvh_node_mark_redraw(ss->filter_cache->nodes[i]); | BKE_pbvh_node_mark_redraw(ss->filter_cache->nodes[i]); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines | |||||