diff options
m--------- | release/datafiles/locale | 0 | ||||
m--------- | release/scripts/addons | 0 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_mask.c | 9 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 5 | ||||
m--------- | source/tools | 0 |
5 files changed, 10 insertions, 4 deletions
diff --git a/release/datafiles/locale b/release/datafiles/locale -Subproject 716dc02ec30c0810513f7b4adc4ae865ae50c4e +Subproject 2e715d54178e24ea463c7bc0cdeb27c682c39ec diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 787ea78f7fa6f0373d80ba1247768402df93f8a +Subproject d1b824f3c2a7a7b3e37e70f336e5a1580028c63 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, diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index f13f1c79a7a..f9633c91087 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -1448,6 +1448,11 @@ void SCULPT_cache_free(StrokeCache *cache); SculptUndoNode *SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type); SculptUndoNode *SCULPT_undo_get_node(PBVHNode *node); SculptUndoNode *SCULPT_undo_get_first_node(void); + +/** + * NOTE: `name` must match operator name for + * redo panels to work. + */ void SCULPT_undo_push_begin(struct Object *ob, const char *name); void SCULPT_undo_push_end(struct Object *ob); void SCULPT_undo_push_end_ex(struct Object *ob, const bool use_nested_undo); diff --git a/source/tools b/source/tools -Subproject 1e658ca996f11e5ff3398d89bd81f5b719304a5 +Subproject 50c27746f2a7c86ab4a0cfa8899b292af5dd07b |