From 20248450826cba07785b11d3fa9f54c196e2f6ea Mon Sep 17 00:00:00 2001 From: Olivier Charvin Date: Wed, 18 Oct 2023 09:52:41 +0200 Subject: [PATCH 1/3] Add support for Open VDB --- blender_asset_tracer/trace/blocks2assets.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/blender_asset_tracer/trace/blocks2assets.py b/blender_asset_tracer/trace/blocks2assets.py index 3dd43c9..2605050 100644 --- a/blender_asset_tracer/trace/blocks2assets.py +++ b/blender_asset_tracer/trace/blocks2assets.py @@ -234,3 +234,15 @@ def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]: continue yield result.BlockUsage(block, path, path_full_field=field) + + +@dna_code("VO") +# See the discussion https://projects.blender.org/blender/blender-asset-tracer/pulls/92884 for the reasons to +# comment out the skip_packed decorator. +# @skip_packed +def open_vdb(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]: + """OpenVDB data blocks.""" + path, field = block.get(b"filepath", return_field=True) + is_sequence = bool(block.get(b"is_sequence")) + + yield result.BlockUsage(block, path, path_full_field=field, is_sequence=is_sequence) -- 2.30.2 From e346b266c263030665b399c17514d99f954db4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 2 Jan 2024 16:25:14 +0100 Subject: [PATCH 2/3] Reinstate the commented-out `@skip_packed` decorator --- blender_asset_tracer/trace/blocks2assets.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/blender_asset_tracer/trace/blocks2assets.py b/blender_asset_tracer/trace/blocks2assets.py index 710a383..be0d8e4 100644 --- a/blender_asset_tracer/trace/blocks2assets.py +++ b/blender_asset_tracer/trace/blocks2assets.py @@ -248,9 +248,7 @@ def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]: @dna_code("VO") -# See the discussion https://projects.blender.org/blender/blender-asset-tracer/pulls/92884 for the reasons to -# comment out the skip_packed decorator. -# @skip_packed +@skip_packed def open_vdb(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]: """OpenVDB data blocks.""" path, field = block.get(b"filepath", return_field=True) -- 2.30.2 From 93c5dfd019ae90e8395c7811c0e71db5a500d6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 2 Jan 2024 16:26:10 +0100 Subject: [PATCH 3/3] Add this change to CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1bb43d..31d8b4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ changed functionality, fixed bugs). # Version 1.18 (in development) - When logging that there is no reader implemented for a certain data-block type, the filepath of the blend file that contains that data-block is now included in the message ([#92885](https://projects.blender.org/blender/blender-asset-tracer/pulls/92885)). +- Add support for tracing OpenVDB files ([#92884](https://projects.blender.org/blender/blender-asset-tracer/pulls/92884)). # Version 1.17 (2023-12-14) -- 2.30.2