Hello everyone,
I am working on making a node and i would like to be able to have a button in the attribute editor that will add extra attributes to my node.
I am creting the node in Python and using MEL for the AE<node name>Template
I am able to create a simple class method inside my plug-in module that prints a message when the button is pressed.
I have been trying to add the custom attributes using the OpenMaya.MFnDependencyNode() class , and it’s .addAttrribute()method.
ex.
nodeFn = OpenMaya.MFnDependencyNode()
nodeFn.addAttribute(<nodename.attreibuteName>, OpenMaya.MFnDependencyNode.kLocalDynamicAttr)
It looks like the constructor for OpenMaya.MFnDependencyNode() needs a node object to operate on. I am having a lot of trouble linking my custom node to this class and its associated methods.
I have tried many things to no avail.
What i want to happen is that whenever someone selects one of my node they can add attributes to that particular node usiong the buttonm in my custom Attribute Editor UI
Any ideas?