From 2305f7568d9b8269958e7253842b023e20fe9210 Mon Sep 17 00:00:00 2001 From: Ambrosiussen Date: Wed, 1 Dec 2021 13:08:14 +0100 Subject: [PATCH] Added support for v3d and m44d --- src/parse_metadata.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/parse_metadata.py b/src/parse_metadata.py index a407475..e85a6ab 100644 --- a/src/parse_metadata.py +++ b/src/parse_metadata.py @@ -263,6 +263,12 @@ def read_exr_header(exrpath, maxreadsize=2000): attribute_values = struct.unpack('f' * 16, exr_file.read(4 * 16)) metadata[attribute_name] = attribute_values + + elif attribute_type == b'm44d': + attribute_values = struct.unpack('d' * 32, + exr_file.read(4 * 32)) + metadata[attribute_name] = attribute_values + elif attribute_type == b'preview': @@ -364,6 +370,14 @@ def read_exr_header(exrpath, maxreadsize=2000): metadata[attribute_name].append(vector_3d_value[1]) metadata[attribute_name].append(vector_3d_value[2]) + elif attribute_type == b'v3d': + vector_3d_value = struct.unpack('ddd', exr_file.read(4 * 6)) + + metadata[attribute_name] = [] + metadata[attribute_name].append(vector_3d_value[0]) + metadata[attribute_name].append(vector_3d_value[1]) + metadata[attribute_name].append(vector_3d_value[2]) + else: logger.error( 'unknown attribute type: {}!!'.format(attribute_type))