Bugfix #22917: Translating numerically doesn't allow animation

I've made most operators which change the current frame are now undoable. This has the following benefits:
- it brings these into line with simply changing the frame number directly
- as in this bug report, using the operator tweaking/redo capabilities was causing problems, as the lack of an undo for the frame change mean that changing the operator properties (in this case to do numeric input for transforms, which is a bit of a creative if inefficient use of the available tools) would cause the current frame to reset to the previous frame, making it seem impossible to tweak the operator settings

Notes:
- screen.frame_offset() operator has been left alone, since I expect that undo pushes on this one would be truly annoying while on the others it's probably ok/wanted. This is because with this operator, animators usually end up stepping through their animations vs one-off jumps/scrubbing-sessions
This commit is contained in:
Joshua Leung 2010-07-20 11:54:17 +00:00
parent b618a335f5
commit 8621c71c4c
Notes: blender-bot 2023-02-14 09:42:34 +01:00
Referenced by issue #42961, Grease Pencil Ctrl z bug
3 changed files with 4 additions and 4 deletions

View File

@ -163,7 +163,7 @@ void ANIM_OT_change_frame(wmOperatorType *ot)
ot->poll= change_frame_poll;
/* flags */
ot->flag= OPTYPE_BLOCKING;
ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);

View File

@ -1554,7 +1554,7 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot)
ot->exec= frame_jump_exec;
ot->poll= ED_operator_screenactive;
ot->flag= 0;
ot->flag= OPTYPE_UNDO;
/* rna */
RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range.");
@ -1633,7 +1633,7 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
ot->exec= keyframe_jump_exec;
ot->poll= ED_operator_screenactive;
ot->flag= 0;
ot->flag= OPTYPE_UNDO;
/* rna */
RNA_def_boolean(ot->srna, "next", 1, "Next Keyframe", "");

View File

@ -174,7 +174,7 @@ void GRAPH_OT_cursor_set(wmOperatorType *ot)
ot->poll= ED_operator_ipo_active;
/* flags */
ot->flag= OPTYPE_BLOCKING;
ot->flag= OPTYPE_BLOCKING|OPTYPE_UNDO;
/* rna */
RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME);