Cannot import geometry cache.

31 views
Skip to first unread message

Panupat Chongstitwattana

unread,
Mar 17, 2015, 6:48:17 AM3/17/15
to python_in...@googlegroups.com
Hi.

I've been trying to import geometry cache with Python to no avail. When I select the object manually and import from menu, it works.

The cache was created from a referenced rig.
exFemaleHair010:shirt_plyShape
associated xml file is
exFemaleHair010_shirt_plyShape

I want to import that cache to a reference of the same character with different namespace. cache000:shirt_plyShape in this case.

I tried to do it like this
xml = path_to_xml
shape = ['cache000:shirt_plyShape']
channel = ['exFemaleHair010:shirt_plyShape']
pm.mel.doImportReferenceFile(xml, '', shape, channel)

However I keep getting this error. I supply channel with empty list but no good.
// Error: line 0: Channel exFemaleHair010:shirt_plyShape was not found. //

Any help appreciate. Thank you!

Panupat Chongstitwattana

unread,
Mar 17, 2015, 9:15:46 AM3/17/15
to python_in...@googlegroups.com
Finally got the cache working by generating cache separately per geometry and use pymel command cacheFile. However the warning is still there. Am I doing something wrong?

Code:
shape = 'cache000:shirt_plyshape'
switch = mel.eval('createHistorySwitch("%s",false)' % shape)
cacheNode = pc.cacheFile(f=path_to_xml, cnm=shape, ia='%s.inp[0]' % switch, attachFile=True)

// Error: Channel cache000:shirt_plyShape was not found. //
Reply all
Reply to author
Forward
0 new messages