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:
authorMartijn Berger <martijn.berger@gmail.com>2015-01-31 19:15:43 +0300
committerMartijn Berger <martijn.berger@gmail.com>2015-01-31 19:15:43 +0300
commit5ac7e23e886361f7d74d5d6367e63b688bcda361 (patch)
treedebd7e0798338ecab16de51ebb94d89bbab096af /source/blender/imbuf/intern/openexr/openexr_api.cpp
parentf90891d87e351ef1c9509007a18dc72ee5025809 (diff)
Blender metadata changes to accommodate non string data
Work towards T42418 For now got rid of linked list holding key,value pairs for metadata in favour of ID properties. Reviewers: campbellbarton, sergey Reviewed By: sergey Projects: #bf_blender Differential Revision: https://developer.blender.org/D872
Diffstat (limited to 'source/blender/imbuf/intern/openexr/openexr_api.cpp')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index ad19c547db3..5de243845a4 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -60,6 +60,8 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
#include "BLI_math_color.h"
#include "BLI_threads.h"
+#include "BKE_idprop.h"
+
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_allocimbuf.h"
@@ -305,10 +307,15 @@ static void openexr_header_compression(Header *header, int compression)
static void openexr_header_metadata(Header *header, struct ImBuf *ibuf)
{
- ImMetaData *info;
+ if (ibuf->metadata) {
+ IDProperty *prop;
- for (info = ibuf->metadata; info; info = info->next)
- header->insert(info->key, StringAttribute(info->value));
+ for (prop = (IDProperty *)ibuf->metadata->data.group.first; prop; prop = prop->next) {
+ if (prop->type == IDP_STRING) {
+ header->insert(prop->name, StringAttribute(IDP_String(prop)));
+ }
+ }
+ }
if (ibuf->ppm[0] > 0.0)
addXDensity(*header, ibuf->ppm[0] / 39.3700787); /* 1 meter = 39.3700787 inches */