diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-05-22 13:54:08 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-05-22 13:54:08 +0400 |
commit | dbd70c05f799afb4d8a3584eae58af384ee14353 (patch) | |
tree | cd2edf5b6920cedc3d6311680509cffc9b165404 /source/blender/compositor/operations/COM_CompositorOperation.cpp | |
parent | e7647e15859f524c1989847656e4ea228507d71b (diff) |
* Composite result is updated when editing (preview were already
calculated, now the final result is also updated in the image space
* default texture size when not connected to any resolution depended
operation defaults to render size
Diffstat (limited to 'source/blender/compositor/operations/COM_CompositorOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_CompositorOperation.cpp | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index ce9484d0d9f..8b343374f1c 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -31,7 +31,7 @@ extern "C" { #include "RE_shader_ext.h" #include "RE_render_ext.h" #include "MEM_guardedalloc.h" -#include "render_types.h" + #include "render_types.h" } #include "PIL_time.h" @@ -55,24 +55,31 @@ void CompositorOperation::initExecution() if (this->getWidth() * this->getHeight() != 0) { this->outputBuffer=(float*) MEM_callocN(this->getWidth()*this->getHeight()*4*sizeof(float), "CompositorOperation"); } - const Scene * scene = this->scene; - Render *re = RE_GetRender(scene->id.name); - RenderResult *rr = RE_AcquireResultWrite(re); - if (rr) { - if (rr->rectf != NULL) { - MEM_freeN(rr->rectf); - } - rr->rectf = outputBuffer; - } - if (re) { - RE_ReleaseResult(re); - re = NULL; - } - } void CompositorOperation::deinitExecution() { + if (tree->test_break && !tree->test_break(tree->tbh)) { + const Scene * scene = this->scene; + Render *re = RE_GetRender(scene->id.name); + RenderResult *rr = RE_AcquireResultWrite(re); + if (rr) { + if (rr->rectf != NULL) { + MEM_freeN(rr->rectf); + } + rr->rectf = outputBuffer; + } + if (re) { + RE_ReleaseResult(re); + re = NULL; + } + BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE); + } else { + if (this->outputBuffer) { + MEM_freeN(this->outputBuffer); + } + } + this->outputBuffer = NULL; this->imageInput = NULL; this->alphaInput = NULL; |