Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-11 12:29:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-11 12:29:56 +0400
commit910d1ff2666a3abd66228bc2ac1654dcd3ee00e3 (patch)
tree3b1a473e41ff63379c8ca56f16d619ea442179bf /source/blender/editors/space_graph/graph_buttons.c
parent98c574e41a8c2cd9ecb0d25afef8578c3e79289b (diff)
display an error with python driver expressions when script execution is disabled.
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 93a68be164a..295f8bd9ff2 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -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 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
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? */