diff --git a/CHANGELOG.md b/CHANGELOG.md index f90393a..32248b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ changed functionality, fixed bugs). - Windows compatibility fix when using different assets with the same path but on different drives. - Allow setting the Shaman JWT authentication token in the `SHAMAN_JWT_TOKEN` environment variable. - Blender 2.81 compatibility fix. +- Fix for external smoke caches not being packed. ## Version 1.1.1 (2019-04-18) diff --git a/blender_asset_tracer/trace/modifier_walkers.py b/blender_asset_tracer/trace/modifier_walkers.py index 59c631c..0e5f27a 100644 --- a/blender_asset_tracer/trace/modifier_walkers.py +++ b/blender_asset_tracer/trace/modifier_walkers.py @@ -158,7 +158,13 @@ def _walk_point_cache(ctx: ModifierContext, pointcache: blendfile.BlendFileBlock, extension: bytes): flag = pointcache[b'flag'] - if flag & cdefs.PTCACHE_DISK_CACHE: + if flag & cdefs.PTCACHE_EXTERNAL: + path, field = pointcache.get(b'path', return_field=True) + log.info(' external cache at %s', path) + bpath = bpathlib.BlendPath(path) + yield result.BlockUsage(pointcache, bpath, path_full_field=field, + is_sequence=True, block_name=block_name) + elif flag & cdefs.PTCACHE_DISK_CACHE: # See ptcache_path() in pointcache.c name, field = pointcache.get(b'name', return_field=True) if not name: @@ -170,11 +176,7 @@ def _walk_point_cache(ctx: ModifierContext, bfile.filepath.stem.encode(), name, extension) - bpath = bpathlib.BlendPath(path) - yield result.BlockUsage(pointcache, bpath, path_full_field=field, - is_sequence=True, block_name=block_name) - if flag & cdefs.PTCACHE_EXTERNAL: - path, field = pointcache.get(b'path', return_field=True) + log.info(' disk cache at %s', path) bpath = bpathlib.BlendPath(path) yield result.BlockUsage(pointcache, bpath, path_full_field=field, is_sequence=True, block_name=block_name)