Pack: always pack files, explode directories to a list of files
When an asset is represented as directory in Blender (for example fluid simulation caches), that directory is traced and each file is considered an asset. This makes it considerably easier for Shaman clients, as they need to compute the SHA256 checksum of each file. The logic to transform a directory path to a list of the contained files is now in BAT itself.
This commit is contained in:
@@ -56,7 +56,10 @@ def expand_sequence(path: pathlib.Path) -> typing.Iterator[pathlib.Path]:
|
||||
raise DoesNotExist(path)
|
||||
|
||||
if path.is_dir():
|
||||
yield path
|
||||
# Explode directory paths into separate files.
|
||||
for subpath in path.rglob("*"):
|
||||
if subpath.is_file():
|
||||
yield subpath
|
||||
return
|
||||
|
||||
log.debug("expanding file sequence %s", path)
|
||||
|
||||
Reference in New Issue
Block a user