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:
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 642e8e074fa..1dc57a0da7d 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -817,13 +817,18 @@ static void graph_draw_driver_settings_panel(uiLayout *layout, ID *id, FCurve *f
col = uiLayoutColumn(layout, true);
block = uiLayoutGetBlock(col);
- if ((G.f & G_SCRIPT_AUTOEXEC) == 0) {
- /* TODO: Add button to enable? */
- uiItemL(col, IFACE_("WARNING: Python expressions limited for security"), ICON_ERROR);
- }
- else if (driver->flag & DRIVER_FLAG_INVALID) {
+ if (driver->flag & DRIVER_FLAG_INVALID) {
uiItemL(col, IFACE_("ERROR: Invalid Python expression"), ICON_CANCEL);
}
+ else if (!BKE_driver_has_simple_expression(driver)) {
+ if ((G.f & G_SCRIPT_AUTOEXEC) == 0) {
+ /* TODO: Add button to enable? */
+ uiItemL(col, IFACE_("WARNING: Python expressions limited for security"), ICON_ERROR);
+ }
+ else {
+ uiItemL(col, IFACE_("Slow Python expression"), ICON_INFO);
+ }
+ }
/* Explicit bpy-references are evil. Warn about these to prevent errors */
/* TODO: put these in a box? */