Comments: some minor clarifications
Noticed accidental swap of `Ellipsis/...`, and note that `yield from` can be put back later on. Reviewers: dfelinto Reviewed By: dfelinto Differential Revision: https://developer.blender.org/D2390
This commit is contained in:
@@ -101,7 +101,7 @@ class BlendFile:
|
|||||||
"block_header_struct",
|
"block_header_struct",
|
||||||
# BlendFileBlock
|
# BlendFileBlock
|
||||||
"blocks",
|
"blocks",
|
||||||
# [DNAStruct, Ellipsis]
|
# [DNAStruct, ...]
|
||||||
"structs",
|
"structs",
|
||||||
# dict {b'StructName': sdna_index}
|
# dict {b'StructName': sdna_index}
|
||||||
# (where the index is an index into 'structs')
|
# (where the index is an index into 'structs')
|
||||||
@@ -448,12 +448,14 @@ class BlendFileBlock:
|
|||||||
else:
|
else:
|
||||||
struct = self.file.structs[struct_index]
|
struct = self.file.structs[struct_index]
|
||||||
for f in struct.fields:
|
for f in struct.fields:
|
||||||
|
# Use "yield from" when Python2 is dropped
|
||||||
for y in self.get_recursive_iter(
|
for y in self.get_recursive_iter(
|
||||||
f.dna_name.name_only, path_full, default, None, use_nil, use_str, 0):
|
f.dna_name.name_only, path_full, default, None, use_nil, use_str, 0):
|
||||||
yield y
|
yield y
|
||||||
|
|
||||||
def items_recursive_iter(self):
|
def items_recursive_iter(self):
|
||||||
for k in self.keys():
|
for k in self.keys():
|
||||||
|
# Use "yield from" when Python2 is dropped
|
||||||
for y in self.get_recursive_iter(k, use_str=False):
|
for y in self.get_recursive_iter(k, use_str=False):
|
||||||
yield y
|
yield y
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user