diff --git a/CHANGELOG.md b/CHANGELOG.md index dbc0b37..5985f74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ changed functionality, fixed bugs). # Version 1.17 (in development) +- Fix issue packing lamps with non-IES 'storage' (File as Flamenco [issue #104269](https://projects.blender.org/studio/flamenco/issues/104269)). + # Version 1.16 (2023-11-02) - 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). diff --git a/blender_asset_tracer/trace/blocks2assets.py b/blender_asset_tracer/trace/blocks2assets.py index 98ab395..3dd43c9 100644 --- a/blender_asset_tracer/trace/blocks2assets.py +++ b/blender_asset_tracer/trace/blocks2assets.py @@ -226,5 +226,11 @@ def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]: storage = node.get_pointer(b"storage") if not storage: continue - path, field = storage.get(b"filepath", return_field=True) + + # A storage block of `NodeShaderTexIES` type has a `filepath`, but not + # all types that can be pointed to by the `storage` pointer do. + path, field = storage.get(b"filepath", return_field=True, default=None) + if path is None: + continue + yield result.BlockUsage(block, path, path_full_field=field)