From 447e9a4cd5d385e8724b7f92c952d66bd35a2c34 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 Jun 2013 18:11:52 +0000 Subject: add option to enable auto-execute scripts, but exclude certain directories. --- release/scripts/startup/bl_ui/space_userpref.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index ef4e5468194..a497ecfb927 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -867,8 +867,21 @@ class USERPREF_PT_file(Panel): colsplit = col.split(percentage=0.95) sub = colsplit.column() - sub.label(text="Author:") - sub.prop(system, "author", text="") + + row = sub.split(percentage=0.3) + row.label(text="Auto Execution:") + row.prop(system, "use_scripts_auto_execute") + + if system.use_scripts_auto_execute: + box = sub.box() + row = box.row() + row.label(text="Excluded Paths:") + row.operator("wm.userpref_autoexec_path_add", text="", icon='ZOOMIN', emboss=False) + for i, path_cmp in enumerate(userpref.autoexec_paths): + row = box.row() + row.prop(path_cmp, "path", text="") + row.prop(path_cmp, "use_glob", text="", icon='FILTER') + row.operator("wm.userpref_autoexec_path_remove", text="", icon='X', emboss=False).index = i col = split.column() col.label(text="Save & Load:") @@ -896,10 +909,12 @@ class USERPREF_PT_file(Panel): col.separator() - col.label(text="Scripts:") - col.prop(system, "use_scripts_auto_execute") + col.label(text="Text Editor:") col.prop(system, "use_tabs_as_spaces") + col.label(text="Author:") + col.prop(system, "author", text="") + from bl_ui.space_userpref_keymap import InputKeyMapPanel -- cgit v1.2.3