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/editors/space_node/drawnode.c
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/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 9e07c3d667b..0f02d2165ac 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1884,6 +1884,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
PointerRNA active_input_ptr, op_ptr;
uiLayout *row, *col;
const bool multilayer = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER;
+ const bool is_exr = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_OPENEXR;
const bool is_multiview = (scene->r.scemode & R_MULTIVIEW) != 0;
node_composit_buts_file_output(layout, C, ptr);
@@ -1991,8 +1992,15 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
uiItemL(col, IFACE_("Format:"), ICON_NONE);
uiItemR(col, &active_input_ptr, "use_node_format", DEFAULT_FLAGS, NULL, ICON_NONE);
+ const bool is_socket_exr = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_OPENEXR;
+ const bool use_node_format = RNA_boolean_get(&active_input_ptr, "use_node_format");
+
+ if ((!is_exr && use_node_format) || (!is_socket_exr && !use_node_format)) {
+ uiItemR(col, &active_input_ptr, "save_as_render", DEFAULT_FLAGS, NULL, ICON_NONE);
+ }
+
col = uiLayoutColumn(layout, false);
- uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format") == false);
+ uiLayoutSetActive(col, use_node_format == false);
uiTemplateImageSettings(col, &imfptr, false);
if (is_multiview) {