Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/openexr/openexr_api.cpp
| Show First 20 Lines • Show All 299 Lines • ▼ Show 20 Lines | switch (compression) { | ||||
| default: | default: | ||||
| header->compression() = ZIP_COMPRESSION; | header->compression() = ZIP_COMPRESSION; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| static void openexr_header_metadata(Header *header, struct ImBuf *ibuf) | 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) | for (prop = ibuf->metadata->data.group.first; prop; prop = prop->next) { | ||||
| header->insert(info->key, StringAttribute(info->value)); | if (prop->type == IDP_STRING) { | ||||
| header->insert(prop->name, StringAttribute(IDP_String(prop))); | |||||
| } | |||||
| } | |||||
| } | |||||
| if (ibuf->ppm[0] > 0.0) | if (ibuf->ppm[0] > 0.0) | ||||
| addXDensity(*header, ibuf->ppm[0] / 39.3700787); /* 1 meter = 39.3700787 inches */ | addXDensity(*header, ibuf->ppm[0] / 39.3700787); /* 1 meter = 39.3700787 inches */ | ||||
| } | } | ||||
| static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags) | static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags) | ||||
| { | { | ||||
| const int channels = ibuf->channels; | const int channels = ibuf->channels; | ||||
| ▲ Show 20 Lines • Show All 1,027 Lines • Show Last 20 Lines | |||||