Fix T55542: BAT doesn't pack smoke cache
This commit is contained in:
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -405,6 +405,23 @@ class ProgressTest(AbstractPackTest):
|
||||
self.assertGreaterEqual(cb.transfer_progress.call_count, 2,
|
||||
'transfer_progress() should be called at least once per asset')
|
||||
|
||||
def test_smoke_cache(self):
|
||||
# The smoke cache uses a glob to indicate which files to pack.
|
||||
cb = mock.Mock(progress.Callback)
|
||||
infile = self.blendfiles / 'T55542-smoke/smoke_cache.blend'
|
||||
with pack.Packer(infile, self.blendfiles, self.tpath) as packer:
|
||||
packer.progress_cb = cb
|
||||
packer.strategise()
|
||||
packer.execute()
|
||||
|
||||
# We should have all the *.bphys files now.
|
||||
count = len(list((self.tpath / 'T55542-smoke/blendcache_smoke_cache').glob('*.bphys')))
|
||||
self.assertEqual(10, count)
|
||||
|
||||
# Physics files + smoke_cache.blend + pack_info.txt
|
||||
self.assertGreaterEqual(cb.transfer_progress.call_count, 12,
|
||||
'transfer_progress() should be called at least once per asset')
|
||||
|
||||
|
||||
class AbortTest(AbstractPackTest):
|
||||
def test_abort_strategise(self):
|
||||
|
||||
@@ -176,6 +176,18 @@ class DepsTest(AbstractTracerTest):
|
||||
b'//blendcache_particle/43756265_*.bphys', True),
|
||||
})
|
||||
|
||||
def test_smoke(self):
|
||||
# This file has an empty name for the cache, which should result in some hex magic
|
||||
# to create a name. See ptcache_filename() in pointcache.c.
|
||||
self.assert_deps('T55542-smoke/smoke_cache.blend', {
|
||||
b'OBSmoke Domain.modifiers[0]': Expect('PointCache', 'name[64]', None, None,
|
||||
b'//blendcache_smoke_cache/536D6F6B6520446F6D61696E_*.bphys', True),
|
||||
})
|
||||
self.assert_deps('T55542-smoke/smoke_cache_vdb.blend', {
|
||||
b'OBSmoke Domain.modifiers[0]': Expect('PointCache', 'name[64]', None, None,
|
||||
b'//blendcache_smoke_cache_vdb/536D6F6B6520446F6D61696E_*.vdb', True),
|
||||
})
|
||||
|
||||
def test_mesh_cache(self):
|
||||
self.assert_deps('meshcache-user.blend', {
|
||||
b'OBPlane.modifiers[0]': Expect('MeshCacheModifierData', 'filepath[1024]', None, None,
|
||||
|
||||
Reference in New Issue
Block a user