From 3f9299e45d39051f341fcc2d6415defcc01eca93 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Mon, 15 Aug 2022 14:52:02 -0700 Subject: Sculpt: Fix redo panel bugs SCULPT_undo_push_begin no longer takes an explicit name. Instead it takes a wmOperator pointer and uses op->type->name for the name. This is necassary for the redo panel to work and should fix the entire class of bugs related to misspelled undo push names. Cases where the calling operator is not registered may use SCULPT_undo_push_begin_ex if desired; it takes a name string as before. --- source/blender/editors/sculpt_paint/sculpt_detail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint/sculpt_detail.c') diff --git a/source/blender/editors/sculpt_paint/sculpt_detail.c b/source/blender/editors/sculpt_paint/sculpt_detail.c index ebbb0fa429e..8f87cd1b6ed 100644 --- a/source/blender/editors/sculpt_paint/sculpt_detail.c +++ b/source/blender/editors/sculpt_paint/sculpt_detail.c @@ -76,7 +76,7 @@ static bool sculpt_and_dynamic_topology_poll(bContext *C) /** \name Detail Flood Fill * \{ */ -static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *UNUSED(op)) +static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *op) { Sculpt *sd = CTX_data_tool_settings(C)->sculpt; Object *ob = CTX_data_active_object(C); @@ -106,7 +106,7 @@ static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *UNUSED(op)) float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat)); BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail); - SCULPT_undo_push_begin(ob, "Dynamic topology flood fill"); + SCULPT_undo_push_begin(ob, op); SCULPT_undo_push_node(ob, NULL, SCULPT_UNDO_COORDS); while (BKE_pbvh_bmesh_update_topology( -- cgit v1.2.3