Support for cloth ptcaches stored on disk

Currently pointcaches on disk for cloth sims were not traced. This patch allows the tracing of pointcaches for cloth sims.

Reviewers: sybren, fsiddi

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D3910
This commit is contained in:
Jeroen Bakker 2018-11-08 10:25:02 +01:00
parent 0b5e034a92
commit 7c80320b30
2 changed files with 11 additions and 0 deletions

View File

@ -38,6 +38,7 @@ eModifierType_Wave = 7
eModifierType_Displace = 14
eModifierType_UVProject = 15
eModifierType_ParticleSystem = 19
eModifierType_Cloth = 22
eModifierType_Fluidsim = 26
eModifierType_Smokesim = 31
eModifierType_WeightVGEdit = 36

View File

@ -223,3 +223,13 @@ def modifier_smoke_sim(ctx: ModifierContext, modifier: blendfile.BlendFileBlock,
cdefs.PTCACHE_FILE_OPENVDB: cdefs.PTCACHE_EXT_VDB
}
yield from _walk_point_cache(ctx, block_name, modifier.bfile, pointcache, extensions[format])
@mod_handler(cdefs.eModifierType_Cloth)
def modifier_cloth(ctx: ModifierContext, modifier: blendfile.BlendFileBlock, block_name: bytes) \
-> typing.Iterator[result.BlockUsage]:
pointcache = modifier.get_pointer(b'point_cache')
if pointcache is None:
return
yield from _walk_point_cache(ctx, block_name, modifier.bfile, pointcache, cdefs.PTCACHE_EXT)