ジャンプ先: 概要. 戻り値. フラグ. Python 例.
removeMultiInstance(
attribute
, [allChildren=boolean], [b=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
removeMultiInstance は、取り消し可能、照会不可能、および編集不可能です。
multiElement の特定のインスタンスを除去します。出力アトリビュートは、ノードが次回実行された際に再生成されるので、入力アトリビュートのみに便利です。このコマンドはインスタンスを除去し、オプションでそのインスタンスの入出力接続をすべて切断します。-b true フラグを使用して接続を切断しない場合、接続が存在すると、このコマンドはエラーになります。
| boolean | (インスタンスが除去された場合は true、何らかの問題がある場合は false (アトリビュートが接続されているが、-b true が指定されなかった場合など)) |
allChildren, b
| ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
allChildren(all)
|
boolean
|
|
|
引数が true の場合は、複数の親のすべての子を削除します。
|
|
b(b)
|
boolean
|
|
|
この引数を true にすると、アトリビュートのすべての接続が切断されてから要素が除去されます。false にした場合、要素が接続されていると、このコマンドはエラーになります。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
cmds.createNode('choice',n='choice')
cmds.setAttr('choice.input[0]',2.0)
cmds.setAttr('choice.input[4]',4.0)
cmds.connectAttr('choice.input[8]','choice.input[100]')
# This will remove the element with index 4 from the input of
# the choice node as long as there are no incoming or outgoing
# connections to the attribute.
#
cmds.removeMultiInstance( 'choice.input[4]' )
# This will remove the element with index 100 from the input of
# the choice node, breaking any existing connections first.
#
cmds.removeMultiInstance( 'choice.input[100]', b=True )