pymel.core.system.cacheFileCombine

static system.cacheFileCombine(*args, **kwargs)

Creates a cacheBlend node that can be used to combine, layer or blend multiple cacheFiles for a given object.

Flags:
Long name (short name) Argument Types Properties
cacheIndex (ci) bool ../../../_images/query.gif
 
A query only flag that returns the index related to the cache specified with the connectCache flag.
channelName (cnm) unicode ../../../_images/edit.gif
 

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 have multiple arguments, passed either as a tuple or a list.

connectCache (cc) unicode ../../../_images/query.gif ../../../_images/edit.gif
 

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 ../../../_images/edit.gif
 

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 ../../../_images/query.gif
 
A query flag that returns a string array of the existing cacheBlends on the selected object(s). Returns an empty string array if no cacheBlends are found.
nextAvailable (na) bool ../../../_images/query.gif
 
A query flag that returns the next available index on the selected cacheBlend node.
object (obj) unicode ../../../_images/query.gif
 
This flag is used in combination with the objectIndex flag. It is used to specify the object whose index you wish to query.
objectIndex (oi) int ../../../_images/query.gif ../../../_images/edit.gif
 

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

# 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' )

Previous topic

pymel.core.system.cacheFile

Next topic

pymel.core.system.cacheFileMerge

Core

Core Modules

Other Modules

This Page