Add support for OpenVDB

Add support for tracing `VO` data-blocks, for OpenVDB volumes.
This commit is contained in:
Olivier Charvin
2024-01-02 16:32:04 +01:00
committed by Sybren A. Stüvel
parent 937ecfdece
commit ced4af98a3
2 changed files with 11 additions and 0 deletions
@@ -245,3 +245,13 @@ def lamp(block: blendfile.BlendFileBlock) -> typing.Iterator[result.BlockUsage]:
continue
yield result.BlockUsage(block, path, path_full_field=field)
@dna_code("VO")
@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)