[Bf-blender-cvs] [48f0d5de544] blender-v3.4-release: Fix T103261: Undo after mask extract doesn't restore active object
Joseph Eagar
noreply at git.blender.org
Mon Dec 19 11:48:57 CET 2022
Commit: 48f0d5de544a0cc70ab3324f94f44dde7b7a4c21
Author: Joseph Eagar
Date: Sun Dec 18 07:50:35 2022 -0800
Branches: blender-v3.4-release
https://developer.blender.org/rB48f0d5de544a0cc70ab3324f94f44dde7b7a4c21
Fix T103261: Undo after mask extract doesn't restore active object
===================================================================
M source/blender/editors/mesh/editmesh_mask_extract.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c
index 070f748c78e..bb4d745a677 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -37,6 +37,7 @@
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
+#include "ED_undo.h"
#include "ED_view3d.h"
#include "bmesh_tools.h"
@@ -287,6 +288,16 @@ static int paint_mask_extract_exec(bContext *C, wmOperator *op)
params.add_boundary_loop = RNA_boolean_get(op->ptr, "add_boundary_loop");
params.apply_shrinkwrap = RNA_boolean_get(op->ptr, "apply_shrinkwrap");
params.add_solidify = RNA_boolean_get(op->ptr, "add_solidify");
+
+ /* Push an undo step prior to extraction.
+ * Note: A second push happens after the operator due to
+ * the OPTYPE_UNDO flag; having an initial undo step here
+ * is just needed to preserve the active object pointer.
+ *
+ * Fixes T103261.
+ */
+ ED_undo_push_op(C, op);
+
return geometry_extract_apply(C, op, geometry_extract_tag_masked_faces, ¶ms);
}
More information about the Bf-blender-cvs
mailing list