diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-17 17:02:03 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-17 17:02:03 +0400 |
commit | 27baa34ba4d5b94f640937f2bf00a9155843d368 (patch) | |
tree | 97262156524a75c23c1ddc0213010196c349d0aa /source/blender | |
parent | 88d1067f58298b14d1ee47b4a3abbaec52208bf8 (diff) |
Fix #35369: Crop node or FileOutput node bug.
Issue was caused by file output node actually,
The thing here is, compositor output does have fixed
resolution and we could predict how to map coordinates
for border and cropping in that case.
But viewers and file output nodes are currently totally
depending on an input resolution. Could not see how
border could be applied reliably in this cases.
Disabling border option for file output node, so
now it shall behave the same way as it was before.
Discovered issues when using cropping to render border,
namely there's an offset in viewer nodes and previews,
but this is separate issue i guess (file output seems
to work fine). Will revisit this issue in next days.
Diffstat (limited to 'source/blender')
3 files changed, 27 insertions, 3 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 7c454445e4f..e82bf2e21c8 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -638,8 +638,27 @@ void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float y { NodeOperation *operation = this->getOutputNodeOperation(); - if (operation->isOutputOperation(true) && !(operation->isViewerOperation() || operation->isPreviewOperation())) { - BLI_rcti_init(&this->m_viewerBorder, xmin * this->m_width, xmax * this->m_width, - ymin * this->m_height, ymax * this->m_height); + if (operation->isOutputOperation(true)) { + /* Basically, setting border need to happen for only operatoins + * which operates in render resolution buffers (like compositor + * output nodes). + * + * In this cases adding border will lead to mapping coordinates + * from output buffer space to input buffer spaces when executing + * operation. + * + * But nodes like viewer and file output just shall display or + * safe the same exact buffer which goes to their input, no need + * in any kind of coordinates mapping. + */ + + bool operationNeedsBorder = !(operation->isViewerOperation() || + operation->isPreviewOperation() || + operation->isFileOutputOperation()); + + if (operationNeedsBorder) { + BLI_rcti_init(&this->m_viewerBorder, xmin * this->m_width, xmax * this->m_width, + ymin * this->m_height, ymax * this->m_height); + } } } diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index 26a382929cb..114a00b9e8d 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -247,6 +247,7 @@ public: virtual bool isViewerOperation() { return false; } virtual bool isPreviewOperation() { return false; } + virtual bool isFileOutputOperation() { return false; } inline bool isBreaked() { return this->m_btree->test_break(this->m_btree->tbh); diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h index 69d1ad48ced..ada40bba014 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.h +++ b/source/blender/compositor/operations/COM_OutputFileOperation.h @@ -56,6 +56,8 @@ public: void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } + + bool isFileOutputOperation() { return true; } }; /* extra info for OpenEXR layers */ @@ -90,6 +92,8 @@ public: void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } + + bool isFileOutputOperation() { return true; } }; #endif |