Go to: Synopsis. Return value. Related. Flags. Python examples.
vnnChangeBracket(
string string
, [close=boolean], [open=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
vnnChangeBracket is undoable, NOT queryable, and NOT editable.
The vnnChangeBracket command is used to postpone change notifications
and graph validation while executing vnn commands.
When building a graph by adding/removing nodes or connections, numerous - and usually
unwanted - notifications and graph validation can greatly impact performance.
It works on either a container or a compound.
For a compound, both the names of the container and compound are required,
For a container, only its name is needed.
Without any flag (-open/-close) vnnChangeBracket can be used to check the change bracket
status of said container/compound, true if any change bracket opened, false otherwise.
vnnCompound, vnnConnect
close, open
| Long name (short name) |
Argument types |
Properties |
|
close(c)
|
boolean
|
|
|
Close a previously opened change bracket on the container/compound.
|
|
open(o)
|
boolean
|
|
|
Open a new change bracket for the container/compound.
Notifications and graph validation will be postponed until the change bracket gets closed.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
vnnContainer = "bifrostGraphShape1"
vnnCompound = "/"
# creating a change bracket for a single compound
cmds.vnnChangeBracket(vnnContainer, vnnCompound, open=True)
# creating a change bracket for an entire container
# will postpone the notification/graph validation of all compounds and nodes
cmds.vnnChangeBracket(vnnContainer, open=True)
# querying the change bracket status of a container
print ("return value before close is " + str(cmds.vnnChangeBracket(vnnContainer)) + "\n")
# close the bracket
cmds.vnnChangeBracket(vnnContainer, vnnCompound, close=True)
# querying the change bracket status of a container
print ("return value before close is " + str(cmds.vnnChangeBracket(vnnContainer)) + "\n")
# close the bracket
cmds.vnnChangeBracket(vnnContainer, close=True)
# querying the change bracket status of a container
print ("return value after last close is " + str(cmds.vnnChangeBracket(vnnContainer)) + "\n")