Commit: 335c3013f4cf05b7e7284684c2e6316ba95eb4ba
Author: Sergey Sharybin
Date:   Tue Jul 28 18:20:25 2015 +0200
Branches: master
https://developer.blender.org/rB335c3013f4cf05b7e7284684c2e6316ba95eb4ba

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.

===================================================================

M       source/blender/editors/space_sequencer/sequencer_edit.c

===================================================================

diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c 
b/source/blender/editors/space_sequencer/sequencer_edit.c
index c16b0b2..ad7b49a 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)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to