Normalize unused paths in packed linked blends
This commit is contained in:
@@ -68,6 +68,18 @@ def deps(
|
||||
yield block_usage
|
||||
|
||||
|
||||
def local_deps(bfilepath: pathlib.Path) -> typing.Iterator[result.BlockUsage]:
|
||||
"""Report assets from every local block, without following libraries.
|
||||
|
||||
This is used for path-only normalization of linked blend files that are
|
||||
copied whole into a pack. Unlike :func:`deps`, it deliberately inspects
|
||||
unused datablocks too, but does not recursively collect their assets.
|
||||
"""
|
||||
bfile = blendfile.open_cached(bfilepath)
|
||||
for block in asset_holding_blocks(bfile.blocks):
|
||||
yield from blocks2assets.iter_assets(block)
|
||||
|
||||
|
||||
def asset_holding_blocks(
|
||||
blocks: typing.Iterable[blendfile.BlendFileBlock],
|
||||
) -> typing.Iterator[blendfile.BlendFileBlock]:
|
||||
|
||||
Reference in New Issue
Block a user