MPxNode Derived class doesnt have attributes categories.

MPxNode Derived class doesnt have attributes categories.

jonathan_ouellet
Contributor Contributor
532 Views
3 Replies
Message 1 of 4

MPxNode Derived class doesnt have attributes categories.

jonathan_ouellet
Contributor
Contributor

Hello, I created a new class which is derived from MPxNode.  Everything works fine with the compute function and the input/output.  However, when I select my node and I go in the Attributes Editor tab, my attributes are not sorted by categories. 

 

My Node:

Untitled2.png

Locator Node:

Untitled.png

 

Any clue why I don't have the Attributes drop down in my Node ("Node Behavior", Locator Attributes which should be MyNodeName Attributes) ?

 

Thanks !

 

0 Likes
Accepted solutions (2)
533 Views
3 Replies
Replies (3)
Message 2 of 4

RFlannery1
Collaborator
Collaborator
Accepted solution

Off the top of my head, I would guess that you need to provide an Attribute Editor template file for your node.

See Maya's "scripts/AETemplates" directory for examples.  This will be located somewhere like, "C:/Program Files/Autodesk/Maya2016/scripts/AETemplates".  When you make your custom template file, I recommend not putting it in this folder.  Instead, set the MAYA_SCRIPT_PATH environment variable (if you make a .mel template file), and put your custom template in a folder on that path.  Alternately, use the MAYA_CUSTOM_TEMPLATE_PATH if you make a .xml template file.  (Honestly, I'm not sure when you are supposed to use MEL and when you are supposed to use XML.)

Edit: Forgot to mention that the template must be named after your node.  So if your new node type is "myCustomNode", then your template must be called "AEmyCustomNodeTemplate".

Message 3 of 4

jonathan_ouellet
Contributor
Contributor

Seems like this is what I need!

 

But I'm not very familiar with this.  Do you know how to specify that my node will use this file ?

 

Thx ! 

 

Jo

0 Likes
Message 4 of 4

jonathan_ouellet
Contributor
Contributor
Accepted solution

Oh its seems to be hardcoded with the filename !  AE{nodeName}Template.mel.

 

Thanks again.

0 Likes