Fix T103261: Undo after mask extract doesn't restore active object
This commit is contained in:
parent
ae5b912f78
commit
6fbb4d7051
Notes:
blender-bot
2023-02-14 04:39:18 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3 Referenced by issue #103261, Sculpt: Undo doesn't bring previous stored mesh after calling Mesh extract operation
|
@ -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"
|
||||
|
@ -286,6 +287,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue