Fixed crash where collection children are ID blocks instead of GR blocks

Not sure when/how that happens, but it happened on a lighting file of the
Spring project, when linking in a nested collection of which parts where
also linked in from other blend files.
This commit is contained in:
Sybren A. Stüvel
2019-02-12 12:31:05 +01:00
parent bf7d2b1e27
commit 66681a69df
2 changed files with 15 additions and 3 deletions
+5 -1
View File
@@ -498,9 +498,13 @@ class BlendFileBlock:
def dna_type(self) -> dna.Struct:
return self.bfile.structs[self.sdna_index]
@property
def dna_type_id(self) -> bytes:
return self.dna_type.dna_type_id
@property
def dna_type_name(self) -> str:
return self.dna_type.dna_type_id.decode('ascii')
return self.dna_type_id.decode('ascii')
@property
def id_name(self) -> typing.Optional[bytes]: