Added utility function to fetching structs by name
This commit is contained in:
parent
f7a18ba07d
commit
6edc15594d
@ -397,6 +397,10 @@ class BlendFile:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
raise exceptions.SegmentationFault('address does not exist', address) from None
|
raise exceptions.SegmentationFault('address does not exist', address) from None
|
||||||
|
|
||||||
|
def struct(self, name: bytes) -> dna.Struct:
|
||||||
|
index = self.sdna_index_from_id[name]
|
||||||
|
return self.structs[index]
|
||||||
|
|
||||||
|
|
||||||
@functools.total_ordering
|
@functools.total_ordering
|
||||||
class BlendFileBlock:
|
class BlendFileBlock:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user