pymel.core.general.vnnChangeBracket

vnnChangeBracket(*args, **kwargs)

The vnnChangeBracketcommand 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.

Flags:

Long Name / Short Name Argument Types Properties
close / c bool ../../../_images/create.gif
  Close a previously opened change bracket on the container/compound.
open / o bool ../../../_images/create.gif
  Open a new change bracket for the container/compound. Notifications and graph validation will be postponed until the change bracket gets closed. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.vnnChangeBracket

Example:

::

import pymel.core as pm

# creating a change bracket for a single compound pm.vnnChangeBracket(vnnContainer, vnnCompound, open=True) # do stuff pm.vnnChangeBracket(vnnContainer, vnnCompound, close=True)

# creating a change bracket for an entire container # will postpone the notification/graph validation of all compounds and nodes pm.vnnChangeBracket(vnnContainer, open=True) # do stuff pm.vnnChangeBracket(vnnContainer, close=True)

# querying the change bracket status of a compound pm.vnnChangeBracket(vnnContainer, vnnCompound) # returns True if any change bracket opened, False otherwise