diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-08-16 00:52:02 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-08-16 00:52:02 +0300 |
commit | 3f9299e45d39051f341fcc2d6415defcc01eca93 (patch) | |
tree | bc831f2db7d246155bd1600e5e3492c1eedf95d4 /source/blender/editors/object | |
parent | 6b49b54bb13721b8fbe23acb6084af9280887778 (diff) |
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.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_remesh.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_remesh.cc b/source/blender/editors/object/object_remesh.cc index ac4fb40d832..812d9bbbc08 100644 --- a/source/blender/editors/object/object_remesh.cc +++ b/source/blender/editors/object/object_remesh.cc @@ -144,7 +144,7 @@ static int voxel_remesh_exec(bContext *C, wmOperator *op) } if (ob->mode == OB_MODE_SCULPT) { - ED_sculpt_undo_geometry_begin(ob, op->type->name); + ED_sculpt_undo_geometry_begin(ob, op); } if (mesh->flag & ME_REMESH_FIX_POLES && mesh->remesh_voxel_adaptivity <= 0.0f) { @@ -654,6 +654,7 @@ struct QuadriFlowJob { short *stop, *do_update; float *progress; + const struct wmOperator *op; Scene *scene; int target_faces; int seed; @@ -891,7 +892,7 @@ static void quadriflow_start_job(void *customdata, short *stop, short *do_update new_mesh = remesh_symmetry_mirror(qj->owner, new_mesh, qj->symmetry_axes); if (ob->mode == OB_MODE_SCULPT) { - ED_sculpt_undo_geometry_begin(ob, "QuadriFlow Remesh"); + ED_sculpt_undo_geometry_begin(ob, qj->op); } if (qj->preserve_paint_mask) { @@ -949,6 +950,7 @@ static int quadriflow_remesh_exec(bContext *C, wmOperator *op) { QuadriFlowJob *job = (QuadriFlowJob *)MEM_mallocN(sizeof(QuadriFlowJob), "QuadriFlowJob"); + job->op = op; job->owner = CTX_data_active_object(C); job->scene = CTX_data_scene(C); |