diff options
Diffstat (limited to 'source/blender/compositor/intern/COM_compositor.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_compositor.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/compositor/intern/COM_compositor.cpp b/source/blender/compositor/intern/COM_compositor.cpp index 7282cf65bc3..9e48334bcca 100644 --- a/source/blender/compositor/intern/COM_compositor.cpp +++ b/source/blender/compositor/intern/COM_compositor.cpp @@ -57,8 +57,23 @@ void COM_execute(RenderData *rd, bNodeTree *editingtree, int rendering) /* set progress bar to 0% and status to init compositing*/ editingtree->progress(editingtree->prh, 0.0); + bool twopass = (editingtree->flag&NTREE_TWO_PASS) > 0 || rendering; /* initialize execution system */ - ExecutionSystem *system = new ExecutionSystem(rd, editingtree, rendering); + if (twopass) { + ExecutionSystem *system = new ExecutionSystem(rd, editingtree, rendering, twopass); + system->execute(); + delete system; + + if (editingtree->test_break(editingtree->tbh)) { + // during editing multiple calls to this method can be triggered. + // make sure one the last one will be doing the work. + BLI_mutex_unlock(&compositorMutex); + return; + } + } + + + ExecutionSystem *system = new ExecutionSystem(rd, editingtree, rendering, false); system->execute(); delete system; |