cacheExport

class cacheExport.cacheExport(astRoot, cacheType, cachePath, phz, cacheStart=None, cacheEnd=None, cacheAtOrig=False, future_path=None, cacheOffsetFile=None, noRoot=True, as_usd=False, uvs_only=False, instances=[], callback='')

Initialize the caching process and prepare the objects to be cached

Parameters:
  • astRoot
  • cacheType – the cache tag type (ie., rig, hair, cloth …etc).
  • cachePath – the cache file path (only the base name is taken, the extension will be replaced by the function).
  • phz
  • cacheStart
  • cacheEnd
  • cacheAtOrig
  • future_path – setd the attribute that points to the cache the way it points to it under future_path (this most likely for Yeti)
  • cacheOffsetFile
  • noRoot – if True, then the asset parent locator/group will not be included in the export, but all its first level of children (assemblies) will be roots for the export, this is needed when you later want to load this alembic under an asset locator.
  • as_usd – if True, alembic cache requests will be switched to ‘usd’ and the file extension of the given file will be maintained
  • uvs_only – Only UVs will be written to the alembic file.
  • instances – a list of instanced objects sources (generated by the InstancingUtils module)
  • callback – a python command to run during the alembic caching process, for example: ‘-pfc “import nr_utils;nr_utils.log(completion_percentage)”’
cacheTaggedGeo(ast_root, sim_type=None, cacheFile='', start_frame=None, end_frame=None, no_root=True)

This is the actual cache writer method, if the tagged objects are of mixed types, then each type will be cached individually, for example, if the tagged objects has mixed types of ‘meshes’ and ‘yeti’ hair nodes, then the caching processes will run automatically twice, once to create an alembic cache for the meshes/curves, and once more to create the yeti cache folder, then both the ‘alembic’ file path and the ‘yeti’ cache folder path will be returned

Parameters:
  • ast_root – the asset root locator
  • sim_type – the cache tag type (ie., rig, hair, cloth …etc).
  • cacheFile – the cache file path (only the base name is taken, the extension will be replaced by the function).
  • start_frame
  • end_frame
  • no_root – if True, then the asset parent locator/group will not be included in the export, but all its first level of children (assemblies)

will be roots for the export, this is needed when you later want to load this alembic under an asset locator. :return: a list of generated cache files/folders paths

expCache()

Runs the caching process

Returns:
writeNRHairCache(nrHair_nodes, start, end, cache_dir)

Writes out a director of nrHair alembic caches

Parameters:
  • nrHair_node
  • start
  • end
  • cache_dir
Returns:

writeYetiCache(yeti_nodes, start, end, cache_dir)

Cache the given Yeti node. :param yeti_node: Yeti node to cache :param start: :param end: :param cache_dir: the cache root directory :param cache_name: the cache name, this can be the name of the yeti node (used as cache_name/cache_name.%04d.fur) :return:

class cacheExport.cacheExportUI(parent=None, geo=None, cacheType=None, cachePath=None, phz=None, cacheStart=None, cacheEnd=None, cacheAtOrig=True, cacheOffsetFile=None)
browse()
expCache()
help()
origCacheTgl()
setEnd(value)
setPath(path)
setStart(value)
staticMetaObject = <PySide.QtCore.QMetaObject object>
typeChange()
cacheExport.mayaMainWindow()
cacheExport.show()