[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36028] trunk/blender/source: fix [#26801] Undoing Animation modifiers undoes 2 steps.

Campbell Barton ideasman42 at gmail.com
Wed Apr 6 03:13:04 CEST 2011


Revision: 36028
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36028
Author:   campbellbarton
Date:     2011-04-06 01:13:01 +0000 (Wed, 06 Apr 2011)
Log Message:
-----------
fix [#26801] Undoing Animation modifiers undoes 2 steps.
also found grease pencil layer operators were not flagged to use undo.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/fmodifier_ui.c
    trunk/blender/source/blender/editors/gpencil/gpencil_edit.c
    trunk/blender/source/tests/CMakeLists.txt

Modified: trunk/blender/source/blender/editors/animation/fmodifier_ui.c
===================================================================
--- trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2011-04-06 00:46:06 UTC (rev 36027)
+++ trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2011-04-06 01:13:01 UTC (rev 36028)
@@ -62,6 +62,7 @@
 #include "UI_resources.h"
 
 #include "ED_anim_api.h"
+#include "ED_util.h"
 
 /* ********************************************** */
 /* UI STUFF */
@@ -99,6 +100,8 @@
 	
 	/* remove the given F-Modifier from the active modifier-stack */
 	remove_fmodifier(modifiers, fcm);
+
+	ED_undo_push(C, "Delete F-Curve Modifier");
 	
 	/* send notifiers */
 	// XXX for now, this is the only way to get updates in all the right places... but would be nice to have a special one in this case 

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_edit.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_edit.c	2011-04-06 00:46:06 UTC (rev 36027)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_edit.c	2011-04-06 01:13:01 UTC (rev 36028)
@@ -201,6 +201,7 @@
 	ot->name= "Grease Pencil Add New";
 	ot->idname= "GPENCIL_OT_data_add";
 	ot->description= "Add new Grease Pencil datablock";
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 	
 	/* callbacks */
 	ot->exec= gp_data_add_exec;
@@ -248,6 +249,7 @@
 	ot->name= "Grease Pencil Unlink";
 	ot->idname= "GPENCIL_OT_data_unlink";
 	ot->description= "Unlink active Grease Pencil datablock";
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 	
 	/* callbacks */
 	ot->exec= gp_data_unlink_exec;
@@ -284,6 +286,7 @@
 	ot->name= "Add New Layer";
 	ot->idname= "GPENCIL_OT_layer_add";
 	ot->description= "Add new Grease Pencil layer for the active Grease Pencil datablock";
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 	
 	/* callbacks */
 	ot->exec= gp_layer_add_exec;
@@ -334,6 +337,7 @@
 	ot->name= "Delete Active Frame";
 	ot->idname= "GPENCIL_OT_active_frame_delete";
 	ot->description= "Delete the active frame for the active Grease Pencil datablock";
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 	
 	/* callbacks */
 	ot->exec= gp_actframe_delete_exec;
@@ -599,6 +603,7 @@
 	ot->name= "Convert Grease Pencil";
 	ot->idname= "GPENCIL_OT_convert";
 	ot->description= "Convert the active Grease Pencil layer to a new Object";
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 	
 	/* callbacks */
 	ot->invoke= WM_menu_invoke;

Modified: trunk/blender/source/tests/CMakeLists.txt
===================================================================
--- trunk/blender/source/tests/CMakeLists.txt	2011-04-06 00:46:06 UTC (rev 36027)
+++ trunk/blender/source/tests/CMakeLists.txt	2011-04-06 01:13:01 UTC (rev 36028)
@@ -42,6 +42,7 @@
 	set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender)
 endif()
 
+# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no 
 set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts)
 
 




More information about the Bf-blender-cvs mailing list