diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-06 13:49:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-06 18:11:51 +0300 |
commit | 8c87af74409a3e6681698ba1bf150dd6155e202f (patch) | |
tree | a9549a2315fed37625e8bd126e91c8855a00147a /source/blender/imbuf/intern | |
parent | e21ae0bb267a54482108ddd4feed99c89241804b (diff) |
Improvements and fixes to Cycles metadata
This is a request by the studio here to make it possible to see how
many samples were used to render a specific shot or a frame. It is a
bit more tricky than simply stamping number of samples from a scene
since rendering is happening in multiple ranges of samples.
This change makes it so Cycles saves configured number of samples for
the specific view layer, and also stores start sample and number of
samples when rendering only a subrange of all samples.
The format used is "cycles.<view_layer_name>.><field>", which allows
to have information about all layers in a multi-layer EXR file.
Ideally we can store simplified "cycles.<field>" if we know that there
is only one render layer in the file, but detecting this is somewhat
tricky since Cycles operates on an evaluated scene which always have
single view layer.
The metadata is shown in the Metadata panels for clip, image and
sequencer spaces.
Example screenshot which shows the metadata:
{F6527727}
Reviewers: brecht
Reviewed By: brecht
Subscribers: fsiddi
Differential Revision: https://developer.blender.org/D4311
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/metadata.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/metadata.c b/source/blender/imbuf/intern/metadata.c index 1601737ffc7..01b9abe6a38 100644 --- a/source/blender/imbuf/intern/metadata.c +++ b/source/blender/imbuf/intern/metadata.c @@ -102,3 +102,10 @@ void IMB_metadata_set_field(struct IDProperty *metadata, const char *key, const IDP_AssignString(prop, value, METADATA_MAX_VALUE_LENGTH); } + +void IMB_metadata_foreach(struct ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata) +{ + for (IDProperty *prop = ibuf->metadata->data.group.first; prop != NULL; prop = prop->next) { + callback(prop->name, IDP_String(prop), userdata); + } +} |