From 27b78c9c94baf6fa43268e851de58da96f7d7123 Mon Sep 17 00:00:00 2001 From: Robert Guetzkow Date: Wed, 13 Jan 2021 11:01:44 +0100 Subject: 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 --- source/blender/blenloader/intern/versioning_290.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 61cf7e4ef49..f3f7ea608f5 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1518,6 +1518,24 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + /* Enable "Save as Render" option for file output node by default (apply view transform to image + * on save) */ + if (!MAIN_VERSION_ATLEAST(bmain, 292, 11)) { + FOREACH_NODETREE_BEGIN (bmain, ntree, id) { + if (ntree->type == NTREE_COMPOSIT) { + LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { + if (node->type == CMP_NODE_OUTPUT_FILE) { + LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) { + NodeImageMultiFileSocket *simf = sock->storage; + simf->save_as_render = true; + } + } + } + } + } + FOREACH_NODETREE_END; + } + /** * Versioning code until next subversion bump goes here. * -- cgit v1.2.3