diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-24 07:53:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-24 07:53:23 +0300 |
commit | 983280b01491883982df6c599da24767ea2e6248 (patch) | |
tree | 0c4e3b8302574023a55dc07ce66ec5bad71b60e5 /source/blender/editors | |
parent | de60205f195b17d36c4e2fb3c3018719b5d9a1d9 (diff) |
PyAPI: remove active area test for script.python_file_run operator
There is no reason running a Python file should require an active area.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_script/script_edit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 0a8700f8180..13adf6bfc2d 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -52,7 +52,9 @@ static int run_pyfile_exec(bContext *C, wmOperator *op) #ifdef WITH_PYTHON if (BPY_run_filepath(C, path, op->reports)) { ARegion *region = CTX_wm_region(C); - ED_region_tag_redraw(region); + if (region != NULL) { + ED_region_tag_redraw(region); + } return OPERATOR_FINISHED; } #else @@ -70,7 +72,6 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot) /* api callbacks */ ot->exec = run_pyfile_exec; - ot->poll = ED_operator_areaactive; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; |