[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59061] trunk/blender/source/blender/ editors/space_graph/graph_buttons.c: display an error with python driver expressions when script execution is disabled .
Campbell Barton
ideasman42 at gmail.com
Sun Aug 11 10:29:57 CEST 2013
Revision: 59061
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59061
Author: campbellbarton
Date: 2013-08-11 08:29:56 +0000 (Sun, 11 Aug 2013)
Log Message:
-----------
display an error with python driver expressions when script execution is disabled.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_graph/graph_buttons.c
Modified: trunk/blender/source/blender/editors/space_graph/graph_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2013-08-11 05:40:35 UTC (rev 59060)
+++ trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2013-08-11 08:29:56 UTC (rev 59061)
@@ -50,6 +50,7 @@
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_main.h"
+#include "BKE_global.h"
#include "BKE_screen.h"
#include "BKE_unit.h"
@@ -620,8 +621,12 @@
uiItemR(col, &driver_ptr, "expression", 0, IFACE_("Expr"), ICON_NONE);
/* errors? */
- if (driver->flag & DRIVER_FLAG_INVALID)
+ if ((G.f & G_SCRIPT_AUTOEXEC) == 0) {
+ uiItemL(col, IFACE_("ERROR: Python auto-execution disabled"), ICON_ERROR);
+ }
+ else if (driver->flag & DRIVER_FLAG_INVALID) {
uiItemL(col, IFACE_("ERROR: Invalid Python expression"), ICON_ERROR);
+ }
}
else {
/* errors? */
More information about the Bf-blender-cvs
mailing list