Ok,
So I'm working on a plugin at the moment and I have found out (see:
someone with more experience with this than me told me..) that I need
to set the value to an attribute on the node I'm creating directly
rather than using a compute.  What I need some help with is the
general syntax of how to do this sort of thing. For example:

class testNode(omMPx.MPxNode):
    # input and output variables
    MYATTR = om.MObject()


def someFunction()
        ...do some stuff
        ...set the value of MYATTR on testNode during runtime


def nodeInit():
    numAttr = om.MFnNumericAttribute()
    testNode.MYATTR = numAttr.create
("myAttr","my",om.MFnNumericData.kFloat,0.0)
    numAttr.setStorable(1)
    numAttr.setWritable(1)

    testNode.addAttribute(testNode.MYATTR)


I hope that explains it enough and thanks for any help that can point
me in the right direction
--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to