Search code examples
listlistboxmaya

Maya Plugin Attribute Editor support for List boxes


I'm currently compiling using both Maya 2015 and 2017.

I have two custom nodes Parent and Child. I want Parent via the attribute editor to be able to register multiple Child nodes on itself.

To facilitate this I am trying to update Maya's attribute editor to contain two list boxes. One to display the unattached particle emitters and another for those already attached emitters.

The unattached emitters in the list should be clickable (or have an associated button to trigger an action) and in clicking become attached to the particle system. Likewise I need to be able to detach those emitters attached to the system.

I am thinking the solution will be a combination of callbacks on dependency/dag node changes and editing my custom nodes compute function.

Does anyone have any ideas/links on how to go about this, as it doesn't look like there is a MFnAttribute derivitive that outputs a string array in this listbox-esque way.

I remain open to other suggestions as maybe I'm going about this all wrong.


Solution

  • Try making an "AE" mel script to customize the attribute editor for your node.

    http://www.chadvernon.com/blog/resources/maya-api-programming/attribute-editor-templates/