diff options
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-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? */ |