diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-11 12:29:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-11 12:29:56 +0400 |
commit | 910d1ff2666a3abd66228bc2ac1654dcd3ee00e3 (patch) | |
tree | 3b1a473e41ff63379c8ca56f16d619ea442179bf /source | |
parent | 98c574e41a8c2cd9ecb0d25afef8578c3e79289b (diff) |
display an error with python driver expressions when script execution is disabled.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 7 |
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? */ |