移動先: 概要 戻り値 キーワード. フラグ. Python 例.

概要

cacheFileCombine([cacheIndex=boolean], [channelName=string], [connectCache=string], [keepWeights=boolean], [layerNode=boolean], [nextAvailable=boolean], [object=string], [objectIndex=int])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

cacheFileCombine は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

指定したオブジェクトに対して複数の cacheFiles を結合、レイヤまたはブレンドするために使用できる cacheBlend ノードを作成します。

戻り値

string作成されるキャッシュ レイヤ ノードの名前

戻り値の型は照会モードでは照会フラグが基になります。

キーワード

cache, file, disk, blend

フラグ

cacheIndex, channelName, connectCache, keepWeights, layerNode, nextAvailable, object, objectIndex
ロング ネーム(ショート ネーム) 引数型 プロパティ
layerNode(ln) boolean query
選択したオブジェクト上にある既存の cacheBlends の文字配列を返す照会フラグです。cacheBlends が見つからない場合は、空の文字配列を返します。
nextAvailable(na) boolean query
選択した cacheBlend ノード上の次に使用可能なインデックスを返す照会フラグです。
connectCache(cc) string queryedit
指定した cacheBlend ノード上の次に使用可能なインデックスにコネクトされる cacheFile ノードを指定する編集フラグです。照会フラグとしては、指定した cacheBlend ノードまでの cacheFiles を含む文字配列を返します。

このフラグは照会モードでは値を受け入れます。

cacheIndex(ci) boolean query
connectCache フラグで指定したキャッシュに関連するインデックスを返す照会モード専用フラグです。
keepWeights(kw) boolean edit
これは connectCache フラグとの組み合わせでのみ使用するフラグです。デフォルトでは、connectCache フラグは新たに追加された cacheWeight 以外のすべてのウェイトを 0 に設定し、新しいキャッシュを完全にコントロールできるようにします。このフラグはその動作を無効にし、すべての既存のブレンド ウェイトが保持されるようにします。
object(obj) string query
このフラグは objectIndex フラグと組み合わせて使用します。照会するインデックスを持つオブジェクトを指定するために使用します。

このフラグは照会モードでは値が必要になります。

objectIndex(oi) int queryedit
編集モードでは、connectCache フラグと併用して、コネクトされる objectIndex を示します。 照会モードでは、オブジェクト フラグで指定したオブジェクトに関連するインデックスを返します。
channelName(cnm) string editmultiuse
connectCache フラグと併用して、コネクトされるチャンネルを示します。指定しないと、ファイル内の最初のチャンネルが使用されます。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

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.
#
cmds.select( 'cachedShape', r=True )
newBlend = cmds.cacheFileCombine()
# attach an additional cacheFile to the cacheBlend node
#
cmds.cacheFileCombine( newBlend[0], e=True, cc='cacheFile2' )
# query the index of the newly connected cache
#
cmds.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 = cmds.cacheFileCombine('cacheBlend3' ,object='armShape', query=True, objectIndex=True)
# Connect another cache up to drive the armShape
#
cmds.cacheFileCombine( 'cacheBlend3', channelName='myChannel', objectIndex=index, e=True, cc='cacheFile2' )