For the curious: it would seem there's a bug with api.MNodeMessage.addNodeDirtyPlugCallback in python in maya 2008 - thankfully, it appears to have been fixed in 2009!
Huzzah! Anyway, this code seems to fail with maya 2008, and succeeds in 2009... - Paul http://pastebin.com/f4332cc67 # test code for MNodeMessage.addNodeDirtyPlugCallback import maya.OpenMaya as api nodeName = 'side' def getMobj(mayaName): selList = api.MSelectionList() selList.add(mayaName) mobj = api.MObject() selList.getDependNode(0, mobj) return mobj def plugDirtyCallback(mObj, plug, data): print plug, "on", mObj, "was dirtied!" api.MNodeMessage.registeringCallableScript() api.MNodeMessage.addNodeDirtyPlugCallback(getMobj(nodeName), plugDirtyCallback, None) # Error: in method 'MNodeMessage_addNodeDirtyPlugCallback', argument 2 of type 'MMessage::MNodePlugFunction' # Traceback (most recent call last): # File "<maya console>", line 17, in <module> # TypeError: in method 'MNodeMessage_addNodeDirtyPlugCallback', argument 2 of type 'MMessage::MNodePlugFunction' # --~--~---------~--~----~------------~-------~--~----~ Yours, Maya-Python Club Team. -~----------~----~----~----~------~----~------~--~---
