Search code examples
mayaeditortemplates

How to add command/button to Maya AETemplate?


I'm trying to integrate a simulator into Maya. I have a solver node. I would like to put a button on the attribute editor, "Simulate" for example that calls a command. How can this be achieved with AETemplates and MEL?


Solution

  • Have a look at some templates which use extra elements like AEfileTemplate.mel. You have to use the current parent to add the UI elements at the correct place.

    string $oldParent = `setParent -q`;
    setParent $parent;
    

    Now you can continue creating your own UI layouts or buttons.