What are you overloading the *clientData part of the function with?
I'm not sure how it works in python, but I had a similar problem with
creating
a MNodeMessage::addNodeDirtyCallback in c++. I had my function wanting
to access a pointer
to my node but had not overloaded the callback with that pointer. Most
examples put NULL into
the *clientData, however you might need to input "this" or "self," I
guess. You might also or otherwise need to
overload the MPlugFunction function itself like this maybe:
def myfunction(OpenMaya.MMessage.MPlugFunction(srcPlg,destPlg,True(or
False),self))
That is just my guess. Overall it might be preferable to use c++ for
callback functions
since it's easier to see where everything needs to go....

On Aug 1, 4:16 pm, Chris Gardner <[email protected]> wrote:
> Hi all,
>
> Has anyone sucessfully used the MDGMessage.addPreConnectionCallback
> from python? If i attempt to setup a callback on this, all i get is a
> nice wee crash.
>
> It crashes on the following for me: win maya1012, win maya 2011.5, mac maya 
> 2012
>
> interestingly, MDGMessage.addConnectionCallback is happy and does not crash.
>
> Any insights gratefully accepted.
> cheers,
> chrisg

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to