diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_filter_mask.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_mask.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c index c8137301de5..172c1f44e47 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mask.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mask.c @@ -176,9 +176,7 @@ static void mask_filter_task_cb(void *__restrict userdata, static int sculpt_mask_filter_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); - SculptSession *ss = ob->sculpt; Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); - PBVH *pbvh = ob->sculpt->pbvh; PBVHNode **nodes; Sculpt *sd = CTX_data_tool_settings(C)->sculpt; int totnode; @@ -186,6 +184,9 @@ static int sculpt_mask_filter_exec(bContext *C, wmOperator *op) BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); + SculptSession *ss = ob->sculpt; + PBVH *pbvh = ob->sculpt->pbvh; + SCULPT_vertex_random_access_ensure(ss); if (!ob->sculpt->pmap) { @@ -195,7 +196,7 @@ static int sculpt_mask_filter_exec(bContext *C, wmOperator *op) int num_verts = SCULPT_vertex_count_get(ss); BKE_pbvh_search_gather(pbvh, NULL, NULL, &nodes, &totnode); - SCULPT_undo_push_begin(ob, "Mask filter"); + SCULPT_undo_push_begin(ob, "Mask Filter"); for (int i = 0; i < totnode; i++) { SCULPT_undo_push_node(ob, nodes[i], SCULPT_UNDO_MASK); @@ -274,7 +275,7 @@ void SCULPT_OT_mask_filter(struct wmOperatorType *ot) ot->exec = sculpt_mask_filter_exec; ot->poll = SCULPT_mode_poll; - ot->flag = OPTYPE_REGISTER; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* RNA. */ RNA_def_enum(ot->srna, |