Use MEL commands to save and load pipeline caches

Alembic caches

You can use the AbcImport and AbcExport MEL commands to import and export Alembic files. For example, use the following to export a polygon torus:

AbcExport -j "-frameRange 1 120 -root pTorus1 -file c:/temp/test.abc";

Help for the commands is available in the Script Editor using either AbcExport -h; and AbcImport -h;.

GPU caches

You can use the following commands to export GPU caches.

When caching multiple objects or files you can use the -prompt flag to display a warning message if existing files are going to be overwritten.

For GPU caches, there is no import command. Instead, you create the gpuCache node and set attributes for cache file name and path. For example:

createNode -n "mine" gpuCache;

setAttr -e -type "string" mine.cacheFileName "dd.abc";

setAttr -e -type "string" mine.cacheGeomPath "|"; // eg the root.

Help for the gpuCache commands is available in the Script Editor using help gpuCache;.

Related topics