diff options
author | Robert Guetzkow <rjg> | 2021-01-13 13:01:44 +0300 |
---|---|---|
committer | Robert Guetzkow <gitcommit@outlook.de> | 2021-01-13 13:04:02 +0300 |
commit | 27b78c9c94baf6fa43268e851de58da96f7d7123 (patch) | |
tree | 5a112e9c42935f7db83f56c94a119336d01e253f /source/blender/blenloader/intern/versioning_290.c | |
parent | 614bd239f85292a8ca6ca454b48f4a1342316252 (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/blenloader/intern/versioning_290.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 18 |
1 files changed, 18 insertions, 0 deletions
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. * |