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:
authorSybren A. Stüvel <sybren@stuvel.eu>2016-06-22 15:15:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-23 02:12:11 +0300
commitb196c481d2eda932832daf4f65a68c80a8bdad5e (patch)
tree06270a05d58d3276e0906b07e98cfd7e355fbc1f
parenta668b0b741c8053934b159ba1d7419ac4f4fd0f7 (diff)
blendfile: add __repr__ to DNAName and DNAStruct
-rw-r--r--io_blend_utils/blend/blendfile.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/io_blend_utils/blend/blendfile.py b/io_blend_utils/blend/blendfile.py
index 154943bf..516524a1 100644
--- a/io_blend_utils/blend/blendfile.py
+++ b/io_blend_utils/blend/blendfile.py
@@ -613,6 +613,9 @@ class DNAName:
self.is_method_pointer = self.calc_is_method_pointer()
self.array_size = self.calc_array_size()
+ def __repr__(self):
+ return '%s(%r)' % (type(self).__qualname__, self.name_full)
+
def as_reference(self, parent):
if parent is None:
result = b''
@@ -691,6 +694,9 @@ class DNAStruct:
self.field_from_name = {}
self.user_data = None
+ def __repr__(self):
+ return '%s(%r)' % (type(self).__qualname__, self.dna_type_id)
+
def field_from_path(self, header, handle, path):
"""
Support lookups as bytes or a tuple of bytes and optional index.