Python API 2.0 Reference
|
Static Public Member Functions | |
def | addConnectionCallback () |
def | addDelayedTimeChangeCallback () |
def | addDelayedTimeChangeRunupCallback () |
def | addForceUpdateCallback () |
def | addNodeAddedCallback () |
def | addNodeChangeUuidCheckCallback () |
def | addNodeRemovedCallback () |
def | addPreConnectionCallback () |
def | addTimeChangeCallback () |
Additional Inherited Members |
Class used to register callbacks for Dependency Graph related messages. Method resolution order: - MDGMessage - MMessage - builtins.object
|
static |
addConnectionCallback(function, clientData=None) -> id This method registers a callback that is called whenever a connection is made or broken in the dependency graph. This callback is triggered after the given connection has been made or broken, unlike the addPreConnectionCallback which is triggered before the operation. * function - callable which will be passed a MPlug indicating the source plug of the connection, a MPlug indicating the destination plug of the connection, a boolean set to True if a new connection will be made, False if it will be broken and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addDelayedTimeChangeCallback(function, clientData=None) -> id This method registers a callback that is called whenever the time changes in the dependency graph, but after the time changed callback. * function - callable which will be passed a MTime object indicating the new time and the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addDelayedTimeChangeRunupCallback(function, clientData=None) -> id This method registers a callback that is called whenever the time changes in the dependency graph, but after the other time changed callbacks which can be used to invoke a dynamics solve or runup if needed * function - callable which will be passed a MTime object indicating the new time and the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addForceUpdateCallback(function, clientData=None) -> id This method registers a callback that is called after the time changes and after all nodes have been evaluated in the dependency graph. * function - callable which will be passed a MTime object indicating the new time and the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addNodeAddedCallback(function, nodeType, clientData=None) -> id This method registers a callback that is called whenever a new node is added to the dependency graph. The nodeType argument allows you to specify the type of nodes that will trigger the callback. The default node type is "dependNode" which matches all nodes. * function - callable which will be passed a MObject indicating the new node and the clientData object * nodeType (MString) - type of node that will trigger the callback * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addNodeChangeUuidCheckCallback(function, clientData=None) -> id This method registers a callback that is called whenever a node may have its UUID changed. Possible causes include the 'rename' command, and the UUID for a node being read from a file during file I/O. Note that nodes are assigned a UUID when they are created; this does not invoke this callback. During file I/O the stored UUID is applied as a separate step after creation (which does invoke this callback). Depending on the situation Maya may or may not use the new UUID by default. For example, when importing a file, Maya reads the UUID from the file but does not use it. The boolean argument to the callback function lets the callback know whether Maya is intending to use the UUID or not. The callback returns a MMessage.Action constant: * kDefaultAction - The callback does not want to change whether the UUID is used or not. * kDoNotDoAction - Do not use the new UUID. * kDoAction - Use the new UUID. In any case, the callback may leave the new uuid as is, or may provide a new uuid of its own choosing to be used instead. * function - callable which will be passed a boolean indicating whether the UUID will be applied, a MObject indicating the node whose UUID may be changed, the MUuid that may be applied to the node (typically the one read from the file, during file I/O) - the callback may provide its own uuid to be applied by changing this parameter - and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addNodeRemovedCallback(function, nodeType, clientData=None) -> id This method registers a callback that is called whenever a new node is removed from the dependency graph. The nodeType argument allows you to specify the type of nodes that will trigger the callback. The default node type is "dependNode" which matches all nodes. * function - callable which will be passed a MObject indicating the node being removed and the clientData object * nodeType (MString) - type of node that will trigger the callback * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addPreConnectionCallback(function, clientData=None) -> id This method registers a callback that is called whenever any connection is made or broken in the dependency graph. This callback is triggered before the given connection has been made or broken, unlike the addConnectionCallback which is triggered after the operation. * function - callable which will be passed a MPlug indicating the source plug of the connection, a MPlug indicating the destination plug of the connection, a boolean set to True if a new connection will be made, False if it will be broken and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addTimeChangeCallback(function, clientData=None) -> id This method registers a callback that is called whenever the time changes in the dependency graph. * function - callable which will be passed a MTime object indicating the new time and the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.