diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ViewerOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_ViewerOperation.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cc b/source/blender/compositor/operations/COM_ViewerOperation.cc index ea5937d8afb..1ae0fe6101f 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.cc +++ b/source/blender/compositor/operations/COM_ViewerOperation.cc @@ -32,6 +32,8 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +namespace blender::compositor { + ViewerOperation::ViewerOperation() { this->setImage(nullptr); @@ -53,6 +55,8 @@ ViewerOperation::ViewerOperation() this->m_depthInput = nullptr; this->m_rd = nullptr; this->m_viewName = nullptr; + flags.use_viewer_border = true; + flags.is_viewer_operation = true; } void ViewerOperation::initExecution() @@ -98,12 +102,12 @@ void ViewerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) for (y = y1; y < y2 && (!breaked); y++) { for (x = x1; x < x2; x++) { - this->m_imageInput->readSampled(&(buffer[offset4]), x, y, COM_PS_NEAREST); + this->m_imageInput->readSampled(&(buffer[offset4]), x, y, PixelSampler::Nearest); if (this->m_useAlphaInput) { - this->m_alphaInput->readSampled(alpha, x, y, COM_PS_NEAREST); + this->m_alphaInput->readSampled(alpha, x, y, PixelSampler::Nearest); buffer[offset4 + 3] = alpha[0]; } - this->m_depthInput->readSampled(depth, x, y, COM_PS_NEAREST); + this->m_depthInput->readSampled(depth, x, y, PixelSampler::Nearest); depthbuffer[offset] = depth[0]; offset++; @@ -213,3 +217,5 @@ CompositorPriority ViewerOperation::getRenderPriority() const return CompositorPriority::Low; } + +} // namespace blender::compositor |