ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
listHistory(
objects
, [allConnections=boolean], [allFuture=boolean], [allGraphs=boolean], [breadthFirst=boolean], [fastIteration=boolean], [fullNodeName=boolean], [future=boolean], [futureLocalAttr=boolean], [futureWorldAttr=boolean], [groupLevels=boolean], [historyAttr=boolean], [interestLevel=int], [leaf=boolean], [levels=uint], [pruneDagObjects=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
listHistory は、取り消し可能、照会可能、および編集不可能です。
指定したノードからグラフ内を前後に移動し、コマンドが通過するコンストラクション ヒストリがあるすべてのノードを返します。コンストラクション ヒストリは、クリエータとして定義されているノードの特定アトリビュートへの接続と、ノードのメイン データの結果(NURBS カーブ ノードのカーブなど)から構成されます。
特定プラグでヒストリ 接続の情報を調べるには、「listConnections」コマンドを最初に使用してヒストリの始まる場所を検索し、次に作成されたノードでこのコマンドを使用します。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
listConnections, listRelatives
allConnections, allFuture, allGraphs, breadthFirst, fastIteration, fullNodeName, future, futureLocalAttr, futureWorldAttr, groupLevels, historyAttr, interestLevel, leaf, levels, pruneDagObjects
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
cmds.curve( d=3, p=[(-3, 0, 0),(-1, 0, 6),(6, 0, 8),(8, 0, 2)], k=[0,0,0,1,1,1], n="snake" )
cmds.instance( n="rattler" )
cmds.revolve( 'rattler', ch=True, n="charmer" )
cmds.revolve( 'snake', ch=True, n="medusa" )
cmds.listHistory()
# Result:[u'medusaShape', u'revolve2', u'snake|curveShape1'] #
cmds.listHistory( 'charmer' )
# Result:[u'charmerShape', u'revolve1', u'rattler|curveShape1'] #
cmds.listHistory( 'medusa', lv=1 )
# Result:[u'medusaShape', u'revolve2'] #
cmds.listHistory( 'medusa', future=True )
# Result:[u'medusaShape', u'initialShadingGroup'] #
# If you just list the curve's future you get both directions
cmds.listHistory( 'curveShape1', future=True )
# Result:[u'snake|curveShape1', u'revolve2', u'medusaShape', u'revolve1', u'charmerShape'] #
# To follow only one history you'll need to follow the path you
# want first, then add the node you started at if so desired since
# it will not be included (here snake|curveShape1 won't list).
# List the future of the first curve
hist = cmds.listConnections('curveShape1.ws[0]',c=1)
cmds.listHistory( hist[1], future=True )
# Result:[u'revolve2', u'medusaShape'] #
# List the future of the second curve
hist = cmds.listConnections('curveShape1.ws[1]',c=1)
cmds.listHistory( hist[1], future=True )
# Result:[u'revolve1', u'charmerShape'] #
cmds.listHistory( leaf=0 )
# Result:[u'medusa'] #