[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55450] trunk/blender/source/blender/ compositor/intern: When using border rendering, use the same border for compositor
Sergey Sharybin
sergey.vfx at gmail.com
Wed Mar 20 19:01:41 CET 2013
Revision: 55450
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55450
Author: nazgul
Date: 2013-03-20 18:01:41 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
When using border rendering, use the same border for compositor
This makes compositing as fast as it's possible in this case.
The only thing is border render+crop will still give funcy
results. This is the next thing to be solved in compositor.
Modified Paths:
--------------
trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp
trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h
trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp 2013-03-20 17:45:35 UTC (rev 55449)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp 2013-03-20 18:01:41 UTC (rev 55450)
@@ -633,3 +633,13 @@
ymin * this->m_height, ymax * this->m_height);
}
}
+
+void ExecutionGroup::setRenderBorder(float xmin, float xmax, float ymin, float ymax)
+{
+ 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);
+ }
+}
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h 2013-03-20 17:45:35 UTC (rev 55449)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.h 2013-03-20 18:01:41 UTC (rev 55450)
@@ -417,6 +417,8 @@
*/
void setViewerBorder(float xmin, float xmax, float ymin, float ymax);
+ void setRenderBorder(float xmin, float xmax, float ymin, float ymax);
+
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionGroup")
#endif
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp 2013-03-20 17:45:35 UTC (rev 55449)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp 2013-03-20 18:01:41 UTC (rev 55450)
@@ -95,6 +95,18 @@
ExecutionGroup *executionGroup = this->m_groups[index];
executionGroup->determineResolution(resolution);
+ if (rendering) {
+ /* TODO: would be nice to support cropping as well, but for now
+ * don't use border for compo when crop is enabled,
+ * otherwise area of interest will be a way off from rendered
+ * stuff
+ */
+ if ((rd->mode & R_BORDER) && !(rd->mode & R_CROP)) {
+ executionGroup->setRenderBorder(rd->border.xmin, rd->border.xmax,
+ rd->border.ymin, rd->border.ymax);
+ }
+ }
+
if (use_viewer_border) {
executionGroup->setViewerBorder(viewer_border->xmin, viewer_border->xmax,
viewer_border->ymin, viewer_border->ymax);
More information about the Bf-blender-cvs
mailing list