Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-01-29 14:07:14 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-29 14:07:14 +0400
commita68ceb0af8ecc4c5df7a27b52814fcf0246ad36a (patch)
tree889f16eef97ef9462c141df0a2e373302c015be6 /source/blender/windowmanager/WM_api.h
parent39eb314cb922b805e9126d5f0352f31c2f84f151 (diff)
Option to lock the interface while rendering
Added function called WM_set_locked_interface which does two things: - Prevents event queue from being handled, so no operators (see below) or values are even possible to run or change. This prevents any kind of "destructive" action performed from user while rendering. - Locks interface refresh for regions which does have lock set to truth in their template. Currently it's just a 3D viewport, but in the future more regions could be considered unsafe, or we could want to lock different parts of interface when doing different jobs. This is needed because 3D viewport could be using or changing the same data as renderer currently uses, leading to threading conflict. Notifiers are still allowed to handle, so render progress is seen on the screen, but would need to doublecheck on this, in terms some notifiers could be changing the data. For now interface locking happens for render job only in case "Lock Interface" checkbox is enabled. Other tools like backing would also benefit of this option. It is possible to mark operator as safe to be used in locked interface mode by adding OPTYPE_ALLOW_LOCKED bit to operator template flags. This bit is completely handled by wm_evem_system, not with operator run routines, so it's still possible to run operators from drivers and handlers. Currently allowed image editor navigation and zooming. Reviewers: brecht, campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D142
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index c13731e2459..a47018e21eb 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -428,6 +428,9 @@ void WM_main_playanim(int argc, const char **argv);
/* debugging only, convenience function to write on crash */
bool write_crash_blend(void);
+ /* Lock the interface for any communication */
+void WM_set_locked_interface(struct wmWindowManager *wm, bool lock);
+
#ifdef __cplusplus
}
#endif