ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.
container [-addNode string[]] [-asset string[]] [-assetMember string] [-bindAttr string string] [-connectionList] [-current boolean] [-fileName string[]] [-findContainer string[]] [-force] [-includeHierarchyAbove] [-includeHierarchyBelow] [-includeNetwork] [-includeNetworkDetails string] [-includeShaders] [-includeShapes] [-includeTransform] [-isContainer] [-name string] [-nodeList] [-nodeNamePrefix] [-parentContainer] [-preview] [-publishAndBind string string] [-publishAsChild string string] [-publishAsParent string string] [-publishAsRoot string boolean] [-publishAttr string] [-publishConnections] [-publishName string] [-removeContainer] [-removeNode string[]] [-type string] [-unbindAndUnpublish string] [-unbindAttr string string] [-unbindChild string] [-unbindParent string] [-unpublishChild string] [-unpublishName string] [-unpublishParent string] [-unsortedOrder]
[string...]
container は、取り消し可能、照会可能、および 編集可能 です。
このコマンドは、コンテナ ノードの作成と照会に使用できます。また次のような、コンテナに対する操作にも使用します。string | 作成したノードの名前。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-name(-n)
|
string
|
|||
|
||||
-addNode(-an)
|
string[]
|
|||
|
||||
-force(-f)
|
|
|||
|
||||
-removeNode(-rn)
|
string[]
|
|||
|
||||
-nodeList(-nl)
|
|
|||
|
||||
-unsortedOrder(-uso)
|
|
|||
|
||||
-findContainer(-fc)
|
string[]
|
|||
|
||||
-removeContainer(-rc)
|
|
|||
|
||||
-connectionList(-cl)
|
|
|||
|
||||
-publishConnections(-pc)
|
|
|||
|
||||
-publishAttr(-pa)
|
string
|
|||
|
||||
-publishName(-pn)
|
string
|
|||
|
||||
-unpublishName(-un)
|
string
|
|||
|
||||
-bindAttr(-ba)
|
string string
|
|||
|
||||
-unbindAttr(-ua)
|
string string
|
|||
|
||||
-publishAndBind(-pb)
|
string string
|
|||
|
||||
-unbindAndUnpublish(-ubp)
|
string
|
|||
|
||||
-publishAsParent(-pap)
|
string string
|
|||
|
||||
-publishAsChild(-pac)
|
string string
|
|||
|
||||
-publishAsRoot(-pro)
|
string boolean
|
|||
|
||||
-unpublishParent(-upp)
|
string
|
|||
|
||||
-unpublishChild(-upc)
|
string
|
|||
|
||||
-unbindParent(-unp)
|
string
|
|||
|
||||
-unbindChild(-unc)
|
string
|
|||
|
||||
-nodeNamePrefix(-nnp)
|
|
|||
|
||||
-includeNetwork(-inc)
|
|
|||
|
||||
-includeNetworkDetails(-ind)
|
string
|
|||
|
||||
-includeHierarchyAbove(-iha)
|
|
|||
|
||||
-includeHierarchyBelow(-ihb)
|
|
|||
|
||||
-includeTransform(-it)
|
|
|||
|
||||
-includeShapes(-ish)
|
|
|||
|
||||
-includeShaders(-isd)
|
|
|||
|
||||
-fileName(-fn)
|
string[]
|
|||
|
||||
-current(-c)
|
boolean
|
|||
|
||||
-parentContainer(-par)
|
|
|||
|
||||
-assetMember(-am)
|
string
|
|||
|
||||
-asset(-a)
|
string[]
|
|||
|
||||
-preview(-p)
|
|
|||
|
||||
-type(-typ)
|
string
|
|||
|
||||
-isContainer(-isc)
|
|
|||
|
フラグはコマンドの作成モードで表示できます | フラグはコマンドの編集モードで表示できます |
フラグはコマンドの照会モードで表示できます | コマンド内でフラグを複数回使用できます。 |
// Create a container holding a locator transform only (not its shape) // string $loc[] = `spaceLocator`; string $con1 = `container -addNode { $loc[0] }`; // Select the nodes that would be in the container, but don't create it // container -preview -addNode { $cone[0] } -includeNetwork -includeHierarchyBelow; // Create a container holding a polygon shape, its transform and its // history node. Publish its tx attr. // string $cone[] = `polyCone`; string $con2 = `container -addNode { $cone[0] } -includeNetwork -includeHierarchyBelow`; // Publish the cone's tx and the locator's tx with the same name // container -edit -publishName "main_tx" $con1; container -edit -bindAttr ($loc[0]+".tx") "main_tx" $con1; container -edit -publishName "main_tx" $con2; container -edit -bindAttr ($cone[0]+".tx") "main_tx" $con2; // Publish the name "sam", but don't bind it to anything // container -edit -publishName "sam" $con1; // Query the bound publications // container -query -bindAttr $con1; // Result: locator1.translateX main_tx // // Query all the published names: // container -query -publishName $con1; // Result: main_tx sam // // Query just the bound published names: // container -query -publishName -bindAttr $con1; // Result: main_tx // // Query just the unbound published names: container -query -publishName -unbindAttr $con1; // Result: sam // // Query just the published name for the published attribute locator1.translateX // container -query -publishName -publishAttr locator1.translateX $con1; // Result: main_tx // // keyframe the cone's tx // currentTime 0; setKeyframe ($cone[0]+".tx"); currentTime 4; setAttr ($cone[0]+".tx") 10.0; setKeyframe ($cone[0]+".tx"); // Query the nodes in the container // string $nodes[] = `container -query -nodeList $con2`; // Remove a node from the container // container -edit -removeNode $nodes[2] $con2; // Remove the container without deleting the nodes within it // container -edit -removeContainer $con2; // query a referenced scenes for its assets // container -fileName "C:/My Documents/maya/projects/default/scenes/refFile.mb" -q;