UI: show blocking popup when auto execution of scripts is disabled.

This is important information, and it was easily missed at the top/bottom of
the screen.

Ref T57197.
This commit is contained in:
Brecht Van Lommel
2018-11-01 18:32:37 +01:00
parent 1e8a2e1a10
commit c2bcde5c28
8 changed files with 112 additions and 53 deletions

View File

@@ -34,19 +34,6 @@ class STATUSBAR_HT_header(Header):
# messages
layout.template_reports_banner()
row = layout.row(align=True)
if bpy.app.autoexec_fail is True and bpy.app.autoexec_fail_quiet is False:
row.label(text="Auto-run disabled", icon='ERROR')
if bpy.data.is_saved:
props = row.operator("wm.revert_mainfile", icon='SCREEN_BACK', text="Reload Trusted")
props.use_scripts = True
row.operator("script.autoexec_warn_clear", text="Ignore")
# include last so text doesn't push buttons out of the header
row.label(text=bpy.app.autoexec_fail_message)
layout.template_running_jobs()
layout.separator_spacer()