Blender Git Commit Log

Git Commits -> Revision a68ceb0

Revision a68ceb0 by Sergey Sharybin (master)
January 29, 2014, 10:07 (GMT)
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

Commit Details:

Full Hash: a68ceb0af8ecc4c5df7a27b52814fcf0246ad36a
Parent Commit: 39eb314
Lines Changed: +193, -50

12 Modified Paths:

/release/scripts/startup/bl_ui/properties_render.py (+2, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -0) (Diff)
/source/blender/editors/render/render_internal.c (+82, -3) (Diff)
/source/blender/editors/space_image/image_ops.c (+14, -2) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+2, -1) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+5, -0) (Diff)
/source/blender/render/extern/include/RE_pipeline.h (+2, -0) (Diff)
/source/blender/render/intern/source/pipeline.c (+13, -13) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+65, -31) (Diff)
/source/blender/windowmanager/WM_api.h (+3, -0) (Diff)
/source/blender/windowmanager/WM_types.h (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021