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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-02-06 13:49:41 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-02-06 18:11:51 +0300
commit8c87af74409a3e6681698ba1bf150dd6155e202f (patch)
treea9549a2315fed37625e8bd126e91c8855a00147a /source/blender/imbuf/IMB_metadata.h
parente21ae0bb267a54482108ddd4feed99c89241804b (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/IMB_metadata.h')
-rw-r--r--source/blender/imbuf/IMB_metadata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_metadata.h b/source/blender/imbuf/IMB_metadata.h
index df26682a466..72b5a95287c 100644
--- a/source/blender/imbuf/IMB_metadata.h
+++ b/source/blender/imbuf/IMB_metadata.h
@@ -66,4 +66,8 @@ void IMB_metadata_set_field(struct IDProperty *metadata, const char *key, const
void IMB_metadata_copy(struct ImBuf *dimb, struct ImBuf *simb);
struct IDProperty *IMB_anim_load_metadata(struct anim *anim);
+/* Invoke callback for every value stored in the metadata. */
+typedef void (*IMBMetadataForeachCb)(const char *field, const char *value, void *userdata);
+void IMB_metadata_foreach(struct ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata);
+
#endif /* __IMB_METADATA_H__ */