ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
vnnCompound(
string string
, [addNode=string], [addStatePortUI=boolean], [canResetToFactory=string], [connected=boolean], [connectedTo=string], [connectedToInput=boolean], [connectedToOutput=boolean], [create=string], [createInputPort=[string, string]], [createOutputPort=[string, string]], [deletePort=string], [explode=string], [inputPort=boolean], [listNodes=boolean], [listPortChildren=string], [listPorts=boolean], [moveNodeIn=string], [movePort=[string, int]], [nodeType=string], [outputPort=boolean], [queryIsReferenced=boolean], [queryMetaData=string], [queryPortDataType=string], [queryPortMetaDataValue=[string, string]], [removeNode=string], [renameNode=[string, string]], [renamePort=[string, string]], [resetToFactory=string], [saveAs=string], [setIsReferenced=boolean], [setMetaData=[string, string]], [setPortDataType=[string, string]], [setPortMetaDataValue=[string, string, string]], [specializedTypeName=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
vnnCompound は、取り消し可能、照会不可能、および編集不可能です。
複合および VNN グラフを操作するには、vnnCompound コマンドを使用します。最初のパラメータは VNN グラフが含まれている DG ノードのフル ネームです。2 番目のパラメータは、複合の名前です。
vnn, vnnConnect
addNode, addStatePortUI, canResetToFactory, connected, connectedTo, connectedToInput, connectedToOutput, create, createInputPort, createOutputPort, deletePort, explode, inputPort, listNodes, listPortChildren, listPorts, moveNodeIn, movePort, nodeType, outputPort, queryIsReferenced, queryMetaData, queryPortDataType, queryPortMetaDataValue, removeNode, renameNode, renamePort, resetToFactory, saveAs, setIsReferenced, setMetaData, setPortDataType, setPortMetaDataValue, specializedTypeName
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
addNode(an)
|
string
|

|
|
|
addStatePortUI(spu)
|
boolean
|
|
|
反復状態ポートを追加するためのウィンドウが表示されます。
|
|
canResetToFactory(crf)
|
string
|
|
|
指定した複合がその初期状態にリセットできるかどうかを照会します。
|
|
connected(cn)
|
boolean
|
|
|
「listNodes」または「listPorts」と一緒に使用すると、引数が true の場合に接続されているノードまたは内部ノードを照会します。 引数が false の場合は、接続されてないすべてのノードを返します。接続の反対側は別のノードまたはポートにできます。
|
|
connectedTo(ct)
|
string
|

|
|
「listNodes」と一緒に使用すると、指定したポートに接続されているすべてのノードが照会されます。
|
|
connectedToInput(cti)
|
boolean
|
|
|
「listNodes」と一緒に使用すると、すべての入力ポートに接続されているすべてのノードが照会されます。
|
|
connectedToOutput(cto)
|
boolean
|
|
|
「listNodes」と一緒に使用すると、すべての出力ポートに接続されているすべてのノードが照会されます。
|
|
create(c)
|
string
|
|
|
指定した複合内に下位の複合を作成します。作成された下位の複合の名前は、指定した複合の前では使用できません。
|
|
createInputPort(cip)
|
[string, string]
|

|
|
複合内に入力ポートを作成します。最初の引数はポートの名前です。2 番目の引数は、ポートのデータ タイプです。
|
|
createOutputPort(cop)
|
[string, string]
|

|
|
複合の出力ポートを作成します。最初の引数はポートの名前です。2 番目の引数は、ポートのデータ タイプです。
|
|
deletePort(dp)
|
string
|

|
|
|
explode(ec)
|
string
|

|
|
指定した複合を分解して、そこからその親にノードを移動します。
|
|
inputPort(ip)
|
boolean
|
|
|
「listPorts」と一緒に使用すると、複合のいずれかの入力ポートに接続されているすべての内部ポートが照会されます。
|
|
listNodes(ln)
|
boolean
|
|
|
複合内のすべてのノードを表示します。「dataType」、「connectedToInput」などの他のフラグと一緒に使用して、指定されたノードの一部を照会することができます。返される結果はノード名のリストです。
|
|
listPortChildren(lpc)
|
string
|
|
|
|
listPorts(lp)
|
boolean
|
|
|
入力ポートと出力ポートを含む、複合内のすべての内部ポートを表示します。「output」、「connected」などの他のフラグと一緒に使用して、指定されたポートの一部を照会することができます。
|
|
moveNodeIn(mi)
|
string
|

|
|
|
movePort(mp)
|
[string, int]
|
|
|
複合内の指定したインデックスにポートを移動します。
|
|
nodeType(nt)
|
string
|
|
|
「listNodes」と一緒に使用すると、複合内の指定されたノード タイプのすべてのノードが照会されます。
|
|
outputPort(op)
|
boolean
|
|
|
「listPorts」と一緒に使用すると、複合のいずれかの出力ポートに接続されているすべてのノードが照会されます。
|
|
queryIsReferenced(qir)
|
boolean
|
|
|
|
queryMetaData(qmd)
|
string
|
|
|
|
queryPortDataType(qpt)
|
string
|
|
|
|
queryPortMetaDataValue(qpm)
|
[string, string]
|
|
|
指定したポートのメタデータ タイプを照会します。1 番目の引数は照会するポートで、2 番目の引数は照会するメタデータのタイプです。
|
|
removeNode(rmn)
|
string
|

|
|
|
renameNode(rn)
|
[string, string]
|

|
|
複合内のノードの名前を変更します。最初の引数はノードの古い名前です。2 番目の引数は新しい名前です。
|
|
renamePort(rp)
|
[string, string]
|

|
|
複合のポートの名前を変更します。最初の引数はポートの古い名前です。2 番目の引数は新しい名前です。
|
|
resetToFactory(rtf)
|
string
|

|
|
指定した複合を初期状態にリセットします。指定した複合が、リセット可能である必要があります。
|
|
saveAs(sa)
|
string
|
|
|
ノード エディタの複合(Compound)メニューで複合を書き出す場合に使用します。引数は保存するファイルのパスです。
|
|
setIsReferenced(sir)
|
boolean
|
|
|
複合の参照ステータスを変更します。-sir/setIsReferenced が true の場合、複合はパブリック化され、それ以外の場合はその親の複合にプライベート化されます。
|
|
setMetaData(smd)
|
[string, string]
|
|
|
メタデータ値を設定します。引数の順序は、メタデータ名、設定するメタデータ値です。
|
|
setPortDataType(spt)
|
[string, string]
|
|
|
|
setPortMetaDataValue(spm)
|
[string, string, string]
|
|
|
指定した複合ポートのメタデータ値を設定します。引数の順序は、設定するポート名、メタデータ名、メタデータ値です。
|
|
specializedTypeName(stn)
|
boolean
|
|
|
「Bifrost_DoWhile」や、標準複合用の「Compound」など、特殊な実装クラスの名前を照会する場合に使用します。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# create a bifrost liquid node
# to operate VNN graph of the bifrost container
import maya.cmds as cmds
cmds.file(f=True, new=True)
cmds.polyPlane()
cmds.CreateBifrostLiquid()
# please open bifrost liquid container in node editor
# Create a sub-compound in the graph
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", create="subCompound")
# Explode a sub-compound
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", explode="subCompound")
# Create an output port in the compound
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", createOutputPort=["newOutput","Bifrost::Types::ObjectDescriptor"])
# Create an input port in the compound
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", createInputPort=["newInput","Bifrost::Types::ObjectDescriptor"])
# Rename a port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", renamePort=["newOutput","outputValue"])
# Move a port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", movePort=["newInput", 0])
# Delete a port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", deletePort="newInput")
# set the type of a internal port of the compound
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", setPortDataType=["outputValue","string"])
# query the data type of a specified port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", queryPortDataType="outputValue")
# set the state value of specified port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", setPortMetaDataValue=["portName","metaDataName","value"])
# query the current state value of specified port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", queryPortMetaDataValue=["portName","metaDataName"])
# query the children of a specified port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listPortChildren="portName")
# Add a new node into VNN graph of the bifrost container
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", addNode="Bifrost,Bifrost::Nodes::Math,add")
# Rename a node
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", renameNode=["add","plus"])
# Remove the node
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", removeNode="plus")
# Pop up a window to add input or output port and set their data type
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", addStatePortUI=True)
# Query the specialized type name
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", specializedTypeName=True)
# Query if the compound is referenced
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", queryIsReferenced=True)
# Make the compound private
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", setIsReferenced=False)
# List all child nodes in the specified compound
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True)
# List the nodes in the specified compound which are of a specific type
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True, nodeType="Math")
# List all the nodes in the specified compound which have no connections
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True, connected=False)
# List nodes in the specified compound which are connected to the parent's internal input
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True, connectedToInput=True)
# List nodes in the specified compound which are connected to the parent's internal output
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True, connectedToOutput=True)
# List nodes in the specified compound which are connected to both the parent's internal input and output port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True, connectedToInput=True, connectedToOutput=True)
# Query the name of the node that is connected to a specified port
# It could be either an input port or an output port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listNodes=True, connectedTo="Solid")
# Result: SetDescriptorFromObject1.value #
# List the names of all compound's internal ports
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listPorts=True)
# List the names of the compound's internal input ports
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listPorts=True, inputPort=True)
# List the names of the compound's internal output ports
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listPorts=True, outputPort=True)
# List all the compound's internal unconnected input and output port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listPorts=True, connected=False)
# List all the compound's internal connected input and output port
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", listPorts=True, connected=True)
# Query if the specified compound can be reset to factory
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", canResetToFactory="CompoundName")
# Reset the specified compound to factory
cmds.vnnCompound("|bifrostLiquid1|bifrostLiquidContainer1", "liquid", resetToFactory="CompoundName")