Created
August 14, 2015 18:14
-
-
Save BigRoy/d7848602d86e4f254582 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.OpenMaya as om | |
import maya.cmds as mc | |
def callback(node, clientData): | |
fnDep = om.MFnDependencyNode(node) | |
node_name = fnDep.name() | |
print node_name | |
if __name__ == '__main__': | |
# Delete previous run (testing only) | |
if 'id' in globals(): | |
try: | |
om.MMessage.removeCallback(id) | |
except RuntimeError, e: | |
print e | |
id = om.MDGMessage.addNodeAddedCallback(callback) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment