Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Guetzkow <rjg>2021-01-13 13:01:44 +0300
committerRobert Guetzkow <gitcommit@outlook.de>2021-01-13 13:04:02 +0300
commit27b78c9c94baf6fa43268e851de58da96f7d7123 (patch)
tree5a112e9c42935f7db83f56c94a119336d01e253f /source/blender/compositor
parent614bd239f85292a8ca6ca454b48f4a1342316252 (diff)
Compositor: "Save as Render" for the file output node
This commit adds the "Save as Render" feature to the file output node, that allows to disable the application of the configured view transform and other color management settings on the image. If disable it uses the standard view transform instead. This feature was originally suggested in T83842 and is part of the color management improvements task in T68926. With this feature it is possible to toggle the application of the color management settings for each input socket of the File Output node individually. Reviewed By: brecht Maniphest Tasks: T68926, T83842 Differential Revision: https://developer.blender.org/D9921
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.cpp9
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h6
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.h4
5 files changed, 23 insertions, 12 deletions
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index e0cff1de276..dcc1fbdec67 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -113,7 +113,8 @@ void OutputFileNode::convertToOperations(NodeConverter &converter,
path,
context.getViewSettings(),
context.getDisplaySettings(),
- context.getViewName());
+ context.getViewName(),
+ sockdata->save_as_render);
}
else if ((!is_multiview) || (format->views_format == R_IMF_VIEWS_INDIVIDUAL)) {
outputOperation = new OutputSingleLayerOperation(context.getRenderData(),
@@ -123,7 +124,8 @@ void OutputFileNode::convertToOperations(NodeConverter &converter,
path,
context.getViewSettings(),
context.getDisplaySettings(),
- context.getViewName());
+ context.getViewName(),
+ sockdata->save_as_render);
}
else { /* R_IMF_VIEWS_STEREO_3D */
outputOperation = new OutputStereoOperation(context.getRenderData(),
@@ -134,7 +136,8 @@ void OutputFileNode::convertToOperations(NodeConverter &converter,
sockdata->layer,
context.getViewSettings(),
context.getDisplaySettings(),
- context.getViewName());
+ context.getViewName(),
+ sockdata->save_as_render);
}
converter.addOperation(outputOperation);
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
index 0b732357c92..7044fe402eb 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
@@ -47,9 +47,10 @@ OutputOpenExrSingleLayerMultiViewOperation::OutputOpenExrSingleLayerMultiViewOpe
const char *path,
const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings,
- const char *viewName)
+ const char *viewName,
+ const bool saveAsRender)
: OutputSingleLayerOperation(
- rd, tree, datatype, format, path, viewSettings, displaySettings, viewName)
+ rd, tree, datatype, format, path, viewSettings, displaySettings, viewName, saveAsRender)
{
}
@@ -273,9 +274,10 @@ OutputStereoOperation::OutputStereoOperation(const RenderData *rd,
const char *name,
const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings,
- const char *viewName)
+ const char *viewName,
+ const bool saveAsRender)
: OutputSingleLayerOperation(
- rd, tree, datatype, format, path, viewSettings, displaySettings, viewName)
+ rd, tree, datatype, format, path, viewSettings, displaySettings, viewName, saveAsRender)
{
BLI_strncpy(this->m_name, name, sizeof(this->m_name));
this->m_channels = get_datatype_size(datatype);
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
index bc057355cef..258ac1f9e98 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.h
@@ -38,7 +38,8 @@ class OutputOpenExrSingleLayerMultiViewOperation : public OutputSingleLayerOpera
const char *path,
const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings,
- const char *viewName);
+ const char *viewName,
+ const bool saveAsRender);
void *get_handle(const char *filename);
void deinitExecution();
@@ -74,7 +75,8 @@ class OutputStereoOperation : public OutputSingleLayerOperation {
const char *name,
const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings,
- const char *viewName);
+ const char *viewName,
+ const bool saveAsRender);
void *get_handle(const char *filename);
void deinitExecution();
};
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index 216b754f676..0a7e238fed1 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -215,7 +215,8 @@ OutputSingleLayerOperation::OutputSingleLayerOperation(
const char *path,
const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings,
- const char *viewName)
+ const char *viewName,
+ const bool saveAsRender)
{
this->m_rd = rd;
this->m_tree = tree;
@@ -232,6 +233,7 @@ OutputSingleLayerOperation::OutputSingleLayerOperation(
this->m_viewSettings = viewSettings;
this->m_displaySettings = displaySettings;
this->m_viewName = viewName;
+ this->m_saveAsRender = saveAsRender;
}
void OutputSingleLayerOperation::initExecution()
@@ -265,7 +267,7 @@ void OutputSingleLayerOperation::deinitExecution()
ibuf->dither = this->m_rd->dither_intensity;
IMB_colormanagement_imbuf_for_write(
- ibuf, true, false, m_viewSettings, m_displaySettings, this->m_format);
+ ibuf, m_saveAsRender, false, m_viewSettings, m_displaySettings, this->m_format);
suffix = BKE_scene_multiview_view_suffix_get(this->m_rd, this->m_viewName);
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h
index 915d59599e2..8717683b571 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.h
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.h
@@ -44,6 +44,7 @@ class OutputSingleLayerOperation : public NodeOperation {
const ColorManagedDisplaySettings *m_displaySettings;
const char *m_viewName;
+ bool m_saveAsRender;
public:
OutputSingleLayerOperation(const RenderData *rd,
@@ -53,7 +54,8 @@ class OutputSingleLayerOperation : public NodeOperation {
const char *path,
const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings,
- const char *viewName);
+ const char *viewName,
+ const bool saveAsRender);
void executeRegion(rcti *rect, unsigned int tileNumber);
bool isOutputOperation(bool /*rendering*/) const