thanks guys.
this is basically what i have.
class myNode(OpenMayaMPx.MPxDeformerNode ):
myMobject=OpenMaya.MObject()
def __init__(self):
OpenMayaMPx.MPxDeformerNode.__init__( self )
def postConstructor(self):
attrChangedCBId=OpenMaya.MNodeMessage.addAttributeChangedCallback(
myNode.myMobject, myNode.attrChangedCallback, self)
def attrChangedCallback(*args):
print 'this node callback is working'
however i generally get a
# RuntimeError: (kInvalidParameter): Unexpected Internal Failure //
this is in the post constructor.
not sure if i have implemented it wrong
john
On 09/04/2011 05:44 AM, Chad Vernon wrote:
You can also use setDependentsDirty to check when things change.
On Sat, Sep 3, 2011 at 12:33 PM, notanymike <[email protected]
<mailto:[email protected]>> wrote:
In c++ I usually install it in MPxNode's postConstructor method and
remove it in it's ~MPxNode method
However I don't know what the "~" equivalent to Python is...
On Sep 3, 7:49 am, johnvdz <[email protected]
<mailto:[email protected]>> wrote:
> hi all,
>
> i'm really scratching my head here. anyone know of an example
out there
> for attributeCallbacks
(MNodeMessage.addAttributeChangedCallback) within
> a deformer or mpxnode.
>
> not sure if i should be putting this in the __init__ func or in
its own
> custom constructor.
>
> I'm not really sure about what its passing how to deal with what it
> passes so any examples would be great. Google search doesn't
bring up
> much python stuff.
>
> i need to be able to pass some message to update for the node to
> recalculate an array of values.
>
> thanks in advance
>
> john
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe