diff options
author | OmarSquircleArt <mail@OmarEmara.dev> | 2020-02-17 15:06:57 +0300 |
---|---|---|
committer | OmarSquircleArt <mail@OmarEmara.dev> | 2020-02-17 15:06:57 +0300 |
commit | ae9bbb4d0360aea694b46ee698d24dbc1476ebf3 (patch) | |
tree | f1220e043cca56364fdbf8af874ecb49ec42e105 /source/blender/makesrna/intern/rna_wm_api.c | |
parent | d119e163d0a867fe0263d751231b838c57b95b31 (diff) |
Python: Expose WM is_interface_locked to python.
This patch exposes the Window Manager `is_interface_locked` as a read
only property to python.
This property is needed to allow script writers to detect if a job is
running with locked interface like the Alembic exporter.
Reviewed By: Brecht
Differential Revision: https://developer.blender.org/D6749
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm_api.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 664c45df4dc..498b3613f4b 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -874,6 +874,15 @@ void RNA_api_wm(StructRNA *srna) RNA_def_function_return(func, parm); RNA_def_function(srna, "print_undo_steps", "rna_WindowManager_print_undo_steps"); + + parm = RNA_def_property(srna, "is_interface_locked", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_ui_text( + parm, + "Is Interface Locked", + "If true, the interface is currently locked by a running job and data shouldn't be modified " + "from application timers. Otherwise, the running job might conflict with the handler " + "causing unexpected results or even crashes."); + RNA_def_property_clear_flag(parm, PROP_EDITABLE); } void RNA_api_operator(StructRNA *srna) |