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:
2018-11-01 18:32:37 +01:00
parent 1e8a2e1a10
commit c2bcde5c28
8 changed files with 112 additions and 53 deletions

View File

@@ -145,23 +145,3 @@ void SCRIPT_OT_reload(wmOperatorType *ot)
/* api callbacks */
ot->exec = script_reload_exec;
}
static int script_autoexec_warn_clear_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{
G.f |= G_SCRIPT_AUTOEXEC_FAIL_QUIET;
return OPERATOR_FINISHED;
}
void SCRIPT_OT_autoexec_warn_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Continue Untrusted";
ot->description = "Ignore autoexec warning";
ot->idname = "SCRIPT_OT_autoexec_warn_clear";
/* flags */
ot->flag = OPTYPE_INTERNAL;
/* api callbacks */
ot->exec = script_autoexec_warn_clear_exec;
}