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>2015-07-28 19:20:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 19:28:35 +0300
commit335c3013f4cf05b7e7284684c2e6316ba95eb4ba (patch)
treebf149497ba5e54283ea5bbf53fca62a292c54bd5 /source/blender/editors
parent79a51f0839cab9e166a9fc4a0f6ea794cea4db03 (diff)
Sequencer: Disable Refresh Sequencer button while rendering
This code is not thread-safe and there's no easy way to synchronize render and viewport threads for this operation, so for until we've got some nicer solution we just disable dangerous buttons.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index c16b0b2dc3b..ad7b49afc2f 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1927,6 +1927,14 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot)
}
/* reload operator */
+static int sequencer_refresh_all_poll(bContext *C)
+{
+ if (G.is_rendering) {
+ return 0;
+ }
+ return sequencer_edit_poll(C);
+}
+
static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
@@ -1948,7 +1956,7 @@ void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot)
/* api callbacks */
ot->exec = sequencer_refresh_all_exec;
- ot->poll = sequencer_edit_poll;
+ ot->poll = sequencer_refresh_all_poll;
}
static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op)