Creates a cacheBlend node that can be used to combine, layer or blend multiple cacheFiles for a given object.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
cacheIndex (ci) | bool | ||
|
|||
channelName (cnm) | unicode | ||
Used in conjunction with the connectCache flag to indicate the channel(s) that should be connected. If not specified, the first channel in the file is used.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
connectCache (cc) | unicode | ||
An edit flag that specifies a cacheFile node that should be connected to the next available index on the specified cacheBlend node. As a query flag, it returns a string array containing the cacheFiles that feed into the specified cacheBlend node. In query mode, this flag can accept a value. |
|||
keepWeights (kw) | bool | ||
This is a flag for use in combination with the connectCache flag only. By default, the connectCache flag will set all weights other than the newly added cacheWeight to 0 so that the new cache gets complete control. This flag disables that behavior so that all existing blend weights are retained. |
|||
layerNode (ln) | bool | ||
|
|||
nextAvailable (na) | bool | ||
|
|||
object (obj) | unicode | ||
|
|||
objectIndex (oi) | int | ||
In edit mode, used in conjunction with the connectCache flag to indicate the objectIndex to be connected. In query mode, returns the index related to the object specified with the object flag. |
Derived from mel command maya.cmds.cacheFileCombine
Example:
import pymel.core as pm
import maya.cmds as cmds
# Create a cacheBlend node so that additional caches can be added to
# the shape. This will attach the existing cacheFile on the shape
# to the new cacheBlend node.
#
pm.select( 'cachedShape', r=True )
newBlend = pm.cacheFileCombine()
# attach an additional cacheFile to the cacheBlend node
#
pm.cacheFileCombine( newBlend[0], e=True, cc='cacheFile2' )
# query the index of the newly connected cache
#
pm.cacheFileCombine( newBlend[0], cc='cacheFile2', query=True, cacheIndex=True )
# When more than one object is driven by the caches connected
# to the cacheBlend node, the -channelName and -objectIndex flags can be
# used to control which is connected.
#
# Query the objectIndex for the armShape geometry driven by cacheBlend3:
#
index = pm.cacheFileCombine('cacheBlend3' ,object='armShape', query=True, objectIndex=True)
# Connect another cache up to drive the armShape
#
pm.cacheFileCombine( 'cacheBlend3', channelName='myChannel', objectIndex=index, e=True, cc='cacheFile2' )