Add support for IES lights
Add support for tracing `.ies` files referenced by lights. Reviewed-on: https://projects.blender.org/blender/blender-asset-tracer/pulls/92883
This commit is contained in:
parent
055457ab67
commit
74b3df5f99
@ -6,6 +6,7 @@ changed functionality, fixed bugs).
|
||||
# Version 1.16 (in development)
|
||||
|
||||
- Add `BlendFileBlock.raw_data()` and `.as_string()` functions. These functions interpret the data in a `BlendFileBlock` as either `bytes` or `string`. This can be used to obtain the contents of a `char*` (instead of the more common embedded `char[N]` array).
|
||||
- Add support for IES lights ([#92883](https://projects.blender.org/blender/blender-asset-tracer/pulls/92883)).
|
||||
|
||||
# Version 1.15 (2022-12-16)
|
||||
|
||||
|
||||
@ -213,3 +213,18 @@ def vector_font(block: blendfile.BlendFileBlock) -> typing.Iterator[result.Block
|
||||
if path == b"<builtin>": # builtin font
|
||||
return
|
||||
yield result.BlockUsage(block, path, path_full_field=field)
|
||||
|
||||
|
||||
@dna_code("LA")
|
||||
@skip_packed
|
||||
def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]:
|
||||
"""Lamp data blocks."""
|
||||
block_ntree = block.get_pointer(b"nodetree", None)
|
||||
if block_ntree is None:
|
||||
return
|
||||
for node in iterators.listbase(block_ntree.get_pointer((b"nodes", b"first"))):
|
||||
storage = node.get_pointer(b"storage")
|
||||
if not storage:
|
||||
continue
|
||||
path, field = storage.get(b"filepath", return_field=True)
|
||||
yield result.BlockUsage(block, path, path_full_field=field)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user