diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2016-06-22 15:15:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 02:12:11 +0300 |
commit | b196c481d2eda932832daf4f65a68c80a8bdad5e (patch) | |
tree | 06270a05d58d3276e0906b07e98cfd7e355fbc1f /io_blend_utils/blend | |
parent | a668b0b741c8053934b159ba1d7419ac4f4fd0f7 (diff) |
blendfile: add __repr__ to DNAName and DNAStruct
Diffstat (limited to 'io_blend_utils/blend')
-rw-r--r-- | io_blend_utils/blend/blendfile.py | 6 |
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. |