Removes a particular instance of a multiElement. This is only useful for input attributes since outputs will get regenerated the next time the node gets executed. This command will remove the instance and optionally break all incoming and outgoing connections to that instance. If the connections are not broken (with the -b true) flag, then the command will fail if connections exist.
|Long name (short name)||Argument Types||Properties|
If the argument is true, all connections to the attribute will be broken before the element is removed. If false, then the command will fail if the element is connected. Flag can have multiple arguments, passed either as a tuple or a list.
Derived from mel command maya.cmds.removeMultiInstance
import pymel.core as pm pm.createNode('choice',n='choice') # Result: nt.Choice(u'choice') # pm.setAttr('choice.input',2.0) pm.setAttr('choice.input',4.0) pm.connectAttr('choice.input','choice.input') # 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. # pm.removeMultiInstance( 'choice.input' ) # This will remove the element with index 100 from the input of # the choice node, breaking any existing connections first. # pm.removeMultiInstance( 'choice.input', b=True )