Your Ad Here

Go to: Synopsis. Flags. Return value. Related. Python examples.

Synopsis

cpCache([allGeometry=boolean], [assignCache=cacheName], [blend=boolean], [cacheSegment=[cacheNode, rangeString]], [copy=boolean], [createCache=boolean], [createTemplateCache=boolean], [help=boolean], [interpolate=interpType], [listAllCaches=boolean], [listCaches=solver], [range=boolean], [replaceCache=[cacheFile, cacheNode]], [saveCache=[cacheNode, filename]], [silent=boolean], [solverCache=solver], [solverTemplateCache=solver], [targetCacheSegment=[cacheNode, rangeString]])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

cpCache is undoable, queryable, and editable.

This command is used to create new cache nodes to connect the a solver. It also offers flags for cloth cache manipulation.

Flags

allGeometry, assignCache, blend, cacheSegment, copy, createCache, createTemplateCache, help, interpolate, listAllCaches, listCaches, range, replaceCache, saveCache, silent, solverCache, solverTemplateCache, targetCacheSegment
Long name (short name) [argument types] Properties
help(h) boolean create
Prints a quick help message.
assignCache(ac) cacheName edit
Assigns cacheName as the active cache on the solver it belongs to.
createCache(cc) boolean create
Create a new cache and attach it to the current solver.
createTemplateCache(ctc) boolean create
Move the existing cache to the template plug and create a new cache to be used for resimulation.
allGeometry(ag) boolean create
Modifier for copy option, all geometry in the cache is to be copied, not just the selected components
listAllCaches(lac) boolean query
Lists all of the caches in the current scene.

In query mode, this flag needs a value.

replaceCache(rc) [cacheFile, cacheNode] edit
Replaces the cacheNode's current cache file with cacheFile.
solverCache(sc) solver create
Returns the cache currently assigned to 'solver'.
solverTemplateCache(stc) solver create
Returns the template cache currently assigned to 'solver'.
saveCache(sav) [cacheNode, filename] create
Save the cache in cacheNode to the filename specified.
interpolate(i) interpType create
Specifies the cache editing operation to be interpolation and the interpolation method used is 'interpType'. Interpolation types can be 'linear' or 'sine'.
blend(b) boolean create
Specifies the cache editing operation to be blend. This takes a series of cache segments and blends them together.
copy(cop) boolean create
Copies source cache segment to target cache segment. Only one cache segment can be specified.
listCaches(lc) solver create
List the caches current assigned to the solver.
cacheSegment(cs) [cacheNode, rangeString] createmultiuse
This flag is used in conjunction with an edit operation, like interpolate or blend. Edit operation require cache segments to act against. Cache segments are multi-use. Cache segments require two paramters, a cacheNode and a range from that cache node.
targetCacheSegment(tc) [cacheNode, rangeString]
Target cache segment specifies the destination of an edit operation. This is where the result of the edit will be placed. The rangeString provide must be equal in duration to the source cache segments (cacheSegment) provided. Time dilation is currently not supported.
silent(s) boolean
Perform the above operations without printing any information to the console.
range(r) boolean create
Provides the valid range of the specified cache node.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Return value


varies depending on use.

Related

cpSolver

Python examples

import maya.cmds as cmds

# Create a new cache node. And attaches it to the current solver.
cmds.cpCache( cc=True )

# To interpolate between 1:8 on cache node cpCache1
cmds.cpCache( interpolate='linear', cacheSegment=('cpCache1', '1:8' ))

# To blend frames 1:5 of cache cpCache1 with frames 6:10
# of cpCache2 and put the result in 6:10 of cpCache2.
cmds.cpCache( blend=True, cacheSegment=(('cpCache1', '1:5'), ('cpCache2', '6:10')), targetCacheSegment=('cpCache2', '6:10') )

  

Return to Autodesk Index


Your Ad Here