Add support for IES lighting #92883
@ -220,9 +220,10 @@ def vector_font(block: blendfile.BlendFileBlock) -> typing.Iterator[result.Block
|
|||||||
def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]:
|
def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]:
|
||||||
"""Lamp data blocks."""
|
"""Lamp data blocks."""
|
||||||
block_ntree = block.get_pointer(b"nodetree", None)
|
block_ntree = block.get_pointer(b"nodetree", None)
|
||||||
if block_ntree is not None:
|
if block_ntree is None:
|
||||||
for node in iterators.listbase(block_ntree.get_pointer((b"nodes", b"first"))):
|
return
|
||||||
storage = node.get_pointer(b"storage")
|
for node in iterators.listbase(block_ntree.get_pointer((b"nodes", b"first"))):
|
||||||
if storage:
|
storage = node.get_pointer(b"storage")
|
||||||
path, field = storage.get(b"filepath", return_field=True)
|
if storage:
|
||||||
|
|||||||
yield result.BlockUsage(block, path, path_full_field=field)
|
path, field = storage.get(b"filepath", return_field=True)
|
||||||
|
yield result.BlockUsage(block, path, path_full_field=field)
|
||||||
|
Loading…
Reference in New Issue
Block a user
Flip the condition &
continue
, so that the bulk of the code is non-conditional: