Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-03-12 19:36:02 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-03-12 19:36:02 +0300
commit9c76d5b39aa7d3531781637b93bd744849af4e3d (patch)
tree6354027743a096bf70a31913d7683f9c0c8d23ac /io_scene_gltf2/io
parente5afe16b5bdaa7b8627e706335dc68c8d4c21e16 (diff)
glTF exporter: Deduplicate cameras, animation sampler and accessors
Diffstat (limited to 'io_scene_gltf2/io')
-rwxr-xr-xio_scene_gltf2/io/exp/gltf2_io_binary_data.py6
1 files changed, 6 insertions, 0 deletions
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)