From 9c76d5b39aa7d3531781637b93bd744849af4e3d Mon Sep 17 00:00:00 2001 From: Julien Duroure Date: Tue, 12 Mar 2019 17:36:02 +0100 Subject: glTF exporter: Deduplicate cameras, animation sampler and accessors --- io_scene_gltf2/io/exp/gltf2_io_binary_data.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'io_scene_gltf2/io') diff --git a/io_scene_gltf2/io/exp/gltf2_io_binary_data.py b/io_scene_gltf2/io/exp/gltf2_io_binary_data.py index 42f6d5d7..c4e0dd20 100755 --- a/io_scene_gltf2/io/exp/gltf2_io_binary_data.py +++ b/io_scene_gltf2/io/exp/gltf2_io_binary_data.py @@ -25,6 +25,12 @@ class BinaryData: raise TypeError("Data is not a bytes array") self.data = data + def __eq__(self, other): + return self.data == other.data + + def __hash__(self): + return hash(self.data) + @classmethod def from_list(cls, lst: typing.List[typing.Any], gltf_component_type: gltf2_io_constants.ComponentType): format_char = gltf2_io_constants.ComponentType.to_type_code(gltf_component_type) -- cgit v1.2.3