[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55240] trunk/blender/source/blender/ compositor/operations: Disable viewer nodes and previews when rendering in background mode

Sergey Sharybin sergey.vfx at gmail.com
Wed Mar 13 15:50:33 CET 2013


Revision: 55240
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55240
Author:   nazgul
Date:     2013-03-13 14:50:33 +0000 (Wed, 13 Mar 2013)
Log Message:
-----------
Disable viewer nodes and previews when rendering in background mode

This node and operations are not useful in background mode anyway,
but calculating them could be really time-consuming especially
when working on 4K frames.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_PreviewOperation.h
    trunk/blender/source/blender/compositor/operations/COM_ViewerBaseOperation.h

Modified: trunk/blender/source/blender/compositor/operations/COM_PreviewOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_PreviewOperation.h	2013-03-13 14:29:20 UTC (rev 55239)
+++ trunk/blender/source/blender/compositor/operations/COM_PreviewOperation.h	2013-03-13 14:50:33 UTC (rev 55240)
@@ -26,6 +26,7 @@
 #include "DNA_image_types.h"
 #include "DNA_color_types.h"
 #include "BLI_rect.h"
+#include "BKE_global.h"
 
 class PreviewOperation : public NodeOperation {
 protected:
@@ -42,7 +43,7 @@
 	const ColorManagedDisplaySettings *m_displaySettings;
 public:
 	PreviewOperation(const ColorManagedViewSettings *viewSettings, const ColorManagedDisplaySettings *displaySettings);
-	bool isOutputOperation(bool rendering) const { return true; }
+	bool isOutputOperation(bool rendering) const { return !G.background; }
 	void initExecution();
 	void deinitExecution();
 	const CompositorPriority getRenderPriority() const;

Modified: trunk/blender/source/blender/compositor/operations/COM_ViewerBaseOperation.h
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_ViewerBaseOperation.h	2013-03-13 14:29:20 UTC (rev 55239)
+++ trunk/blender/source/blender/compositor/operations/COM_ViewerBaseOperation.h	2013-03-13 14:50:33 UTC (rev 55240)
@@ -25,6 +25,7 @@
 #include "COM_NodeOperation.h"
 #include "DNA_image_types.h"
 #include "BLI_rect.h"
+#include "BKE_global.h"
 
 class ViewerBaseOperation : public NodeOperation {
 protected:
@@ -45,7 +46,7 @@
 	const ColorManagedDisplaySettings *m_displaySettings;
 
 public:
-	bool isOutputOperation(bool rendering) const { return isActiveViewerOutput(); }
+	bool isOutputOperation(bool rendering) const { if (G.background) return false; return isActiveViewerOutput(); }
 	void initExecution();
 	void deinitExecution();
 	void setImage(Image *image) { this->m_image = image; }




More information about the Bf-blender-cvs mailing list