From befe38fe1dfbbdac9ed9ef61853800426e5966c5 Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Fri, 5 Aug 2022 15:53:04 +1000 Subject: Fix T92099: No undo when moving viewport with camera locked to view Supports undo step generation while navigating in locked camera view. NDOF & track-pad navigation are not included for now. Actions that uses smooth view can be supported but are outside the scope of this change, includes undo push for: - VIEW3D_OT_view_pan - VIEW3D_OT_dolly - VIEW3D_OT_fly - VIEW3D_OT_move - VIEW3D_OT_rotate - VIEW3D_OT_walk - VIEW3D_OT_zoom Reviewed by: campbellbarton Ref D15345 --- source/blender/editors/space_view3d/view3d_navigate_zoom.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/space_view3d/view3d_navigate_zoom.c') diff --git a/source/blender/editors/space_view3d/view3d_navigate_zoom.c b/source/blender/editors/space_view3d/view3d_navigate_zoom.c index a67c0850ad9..9230aa09b1a 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_zoom.c +++ b/source/blender/editors/space_view3d/view3d_navigate_zoom.c @@ -425,6 +425,7 @@ static int viewzoom_modal(bContext *C, wmOperator *op, const wmEvent *event) } if (ret & OPERATOR_FINISHED) { + ED_view3d_camera_lock_undo_push(op->type->name, vod->v3d, vod->rv3d, C); viewops_data_free(C, op->customdata); op->customdata = NULL; } @@ -507,6 +508,7 @@ static int viewzoom_exec(bContext *C, wmOperator *op) ED_region_tag_redraw(region); + ED_view3d_camera_lock_undo_grouped_push(op->type->name, v3d, rv3d, C); viewops_data_free(C, op->customdata); op->customdata = NULL; -- cgit v1.2.3