diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-13 18:50:33 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-13 18:50:33 +0400 |
commit | 53735787ffd5902e31861132e5cc11147cfbf5b8 (patch) | |
tree | 5820089316dc02d2ab679da65c52ca55111ac4a2 /source/blender | |
parent | 47f6d7ff93e1ea451c0858cb22c0da72b347ba7a (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/compositor/operations/COM_PreviewOperation.h | 3 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_ViewerBaseOperation.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.h b/source/blender/compositor/operations/COM_PreviewOperation.h index 9e774d0e41b..0da6b8e4e56 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.h +++ b/source/blender/compositor/operations/COM_PreviewOperation.h @@ -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 @@ protected: 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; diff --git a/source/blender/compositor/operations/COM_ViewerBaseOperation.h b/source/blender/compositor/operations/COM_ViewerBaseOperation.h index 9f7e80ad6fc..7ead96b5c29 100644 --- a/source/blender/compositor/operations/COM_ViewerBaseOperation.h +++ b/source/blender/compositor/operations/COM_ViewerBaseOperation.h @@ -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 @@ protected: 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; } |