diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-03 20:23:15 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-03 20:23:15 +0400 |
commit | 9ac9040cfdea0ac30aa4e6f4e9adac0567f7e934 (patch) | |
tree | 230a663e6214cd5ad4d768acf9cb48952c109fad /source/blender/compositor/operations | |
parent | f56f492c5a6523881a09f81667bec9aa56f20477 (diff) |
Tomato: skip cache for Movieclip input node only when rendering
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieClipOperation.cpp | 11 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MovieClipOperation.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp index b32c2799217..a5cc7196f62 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp @@ -48,9 +48,16 @@ void MovieClipOperation::initExecution() if (this->m_movieClip) { BKE_movieclip_user_set_frame(this->m_movieClipUser, this->m_framenumber); ImBuf *ibuf; - int flag = this->m_movieClip->flag & MCLIP_TIMECODE_FLAGS; - ibuf = BKE_movieclip_get_ibuf_flag(this->m_movieClip, this->m_movieClipUser, flag, MOVIECLIP_CACHE_SKIP); + if (this->m_cacheFrame) { + ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, this->m_movieClipUser); + } + else { + int flag = this->m_movieClip->flag & MCLIP_TIMECODE_FLAGS; + + ibuf = BKE_movieclip_get_ibuf_flag(this->m_movieClip, this->m_movieClipUser, flag, MOVIECLIP_CACHE_SKIP); + } + if (ibuf) { this->m_movieClipBuffer = ibuf; if (ibuf->rect_float == NULL || ibuf->userflags & IB_RECT_INVALID) { diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.h b/source/blender/compositor/operations/COM_MovieClipOperation.h index 2e824009ab6..50d79213428 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.h +++ b/source/blender/compositor/operations/COM_MovieClipOperation.h @@ -43,6 +43,7 @@ protected: int m_movieClipheight; int m_movieClipwidth; int m_framenumber; + bool m_cacheFrame; /** * Determine the output resolution. The resolution is retrieved from the Renderer @@ -56,6 +57,7 @@ public: void deinitExecution(); void setMovieClip(MovieClip *image) { this->m_movieClip = image; } void setMovieClipUser(MovieClipUser *imageuser) { this->m_movieClipUser = imageuser; } + void setCacheFrame(bool value) { this->m_cacheFrame = value; } void setFramenumber(int framenumber) { this->m_framenumber = framenumber; } void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]); |