[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31111] trunk/blender/source/blender/ editors/space_text/text_ops.c: Fix #23196: running python scripts didn' t do an undo push.

Brecht Van Lommel brecht at blender.org
Fri Aug 6 18:33:36 CEST 2010


Revision: 31111
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31111
Author:   blendix
Date:     2010-08-06 18:33:36 +0200 (Fri, 06 Aug 2010)

Log Message:
-----------
Fix #23196: running python scripts didn't do an undo push. Now it does
means you can easily undo what the script did, and keeps the undo stack
up to date. Maybe sometimes it's not necessary, but I think it's
reasonable to do this always.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_text/text_ops.c

Modified: trunk/blender/source/blender/editors/space_text/text_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_text/text_ops.c	2010-08-06 16:18:18 UTC (rev 31110)
+++ trunk/blender/source/blender/editors/space_text/text_ops.c	2010-08-06 16:33:36 UTC (rev 31111)
@@ -584,9 +584,11 @@
 	/* api callbacks */
 	ot->poll= run_script_poll;
 	ot->exec= run_script_exec;
+
+	/* flags */
+	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-
 /******************* refresh pyconstraints operator *********************/
 
 static int refresh_pyconstraints_exec(bContext *C, wmOperator *op)





More information about the Bf-blender-cvs mailing list