[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30532] trunk/blender/source/blender/ editors: Bugfix #22917: Translating numerically doesn't allow animation

Joshua Leung aligorith at gmail.com
Tue Jul 20 13:54:18 CEST 2010


Revision: 30532
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30532
Author:   aligorith
Date:     2010-07-20 13:54:17 +0200 (Tue, 20 Jul 2010)

Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_ops.c
    trunk/blender/source/blender/editors/screen/screen_ops.c
    trunk/blender/source/blender/editors/space_graph/graph_ops.c

Modified: trunk/blender/source/blender/editors/animation/anim_ops.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_ops.c	2010-07-20 11:32:30 UTC (rev 30531)
+++ trunk/blender/source/blender/editors/animation/anim_ops.c	2010-07-20 11:54:17 UTC (rev 30532)
@@ -163,7 +163,7 @@
 	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);

Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c	2010-07-20 11:32:30 UTC (rev 30531)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c	2010-07-20 11:54:17 UTC (rev 30532)
@@ -1554,7 +1554,7 @@
 	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 @@
 	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", "");

Modified: trunk/blender/source/blender/editors/space_graph/graph_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_ops.c	2010-07-20 11:32:30 UTC (rev 30531)
+++ trunk/blender/source/blender/editors/space_graph/graph_ops.c	2010-07-20 11:54:17 UTC (rev 30532)
@@ -174,7 +174,7 @@
 	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);





More information about the Bf-blender-cvs mailing list