Revision: 56879
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56879
Author:   nazgul
Date:     2013-05-17 13:02:03 +0000 (Fri, 17 May 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp
    trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h
    trunk/blender/source/blender/compositor/operations/COM_OutputFileOperation.h

Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp       
2013-05-17 12:43:58 UTC (rev 56878)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp       
2013-05-17 13:02:03 UTC (rev 56879)
@@ -638,8 +638,27 @@
 {
        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);
+               }
        }
 }

Modified: trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h  
2013-05-17 12:43:58 UTC (rev 56878)
+++ trunk/blender/source/blender/compositor/intern/COM_NodeOperation.h  
2013-05-17 13:02:03 UTC (rev 56879)
@@ -247,6 +247,7 @@
        
        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);

Modified: 
trunk/blender/source/blender/compositor/operations/COM_OutputFileOperation.h
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_OutputFileOperation.h    
    2013-05-17 12:43:58 UTC (rev 56878)
+++ 
trunk/blender/source/blender/compositor/operations/COM_OutputFileOperation.h    
    2013-05-17 13:02:03 UTC (rev 56879)
@@ -56,6 +56,8 @@
        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 @@
        void initExecution();
        void deinitExecution();
        const CompositorPriority getRenderPriority() const { return 
COM_PRIORITY_LOW; }
+
+       bool isFileOutputOperation() { return true; }
 };
 
 #endif

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to