ジャンプ先: 概要. 戻り値. 関連. フラグ. 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 | 作成したノードの名前。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
-addNode(-an)
|
string[]
|
|
||
|
||||
-asset(-a)
|
string[]
|
|
||
|
||||
-assetMember(-am)
|
string
|
|
||
|
||||
-bindAttr(-ba)
|
string string
|
|
||
|
||||
-connectionList(-cl)
|
|
|
||
|
||||
-current(-c)
|
boolean
|
|
||
|
||||
-fileName(-fn)
|
string[]
|
|
||
|
||||
-findContainer(-fc)
|
string[]
|
|
||
|
||||
-force(-f)
|
|
|
||
|
||||
-includeHierarchyAbove(-iha)
|
|
|
||
|
||||
-includeHierarchyBelow(-ihb)
|
|
|
||
|
||||
-includeNetwork(-inc)
|
|
|
||
|
||||
-includeNetworkDetails(-ind)
|
string
|
|
||
|
||||
-includeShaders(-isd)
|
|
|
||
|
||||
-includeShapes(-ish)
|
|
|
||
|
||||
-includeTransform(-it)
|
|
|
||
|
||||
-isContainer(-isc)
|
|
|
||
|
||||
-name(-n)
|
string
|
|
||
|
||||
-nodeList(-nl)
|
|
|
||
|
||||
-nodeNamePrefix(-nnp)
|
|
|
||
|
||||
-parentContainer(-par)
|
|
|
||
|
||||
-preview(-p)
|
|
|
||
|
||||
-publishAndBind(-pb)
|
string string
|
|
||
|
||||
-publishAsChild(-pac)
|
string string
|
|
||
|
||||
-publishAsParent(-pap)
|
string string
|
|
||
|
||||
-publishAsRoot(-pro)
|
string boolean
|
|
||
|
||||
-publishAttr(-pa)
|
string
|
|
||
|
||||
-publishConnections(-pc)
|
|
|
||
|
||||
-publishName(-pn)
|
string
|
|
||
|
||||
-removeContainer(-rc)
|
|
|
||
|
||||
-removeNode(-rn)
|
string[]
|
|
||
|
||||
-type(-typ)
|
string
|
|
||
|
||||
-unbindAndUnpublish(-ubp)
|
string
|
|
||
|
||||
-unbindAttr(-ua)
|
string string
|
|
||
|
||||
-unbindChild(-unc)
|
string
|
|
||
|
||||
-unbindParent(-unp)
|
string
|
|
||
|
||||
-unpublishChild(-upc)
|
string
|
|
||
|
||||
-unpublishName(-un)
|
string
|
|
||
|
||||
-unpublishParent(-upp)
|
string
|
|
||
|
||||
-unsortedOrder(-uso)
|
|
|
||
|
||||
// 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;