简体   繁体   中英

Alphabetically sorted attributes in a custom node Maya Python API 2.0

I'm currently working on a custom node using Maya Python API 2.0.

I've managed to create the node inheiriting from MPxNode and added a couple MFnNumericAttributes and MFnCompoundAttributes. However. In Maya when i create this node the attributes are sorted alphabetically...

It looks like this -> ZoneNode1 picture

I would like my attributes so they are sorted according to their insertion to the node, not alphabetically as they seem to be from default.

Does anyone know what calls to make?

If you want your own sorting, you can use a NodeEditorTemplate xml file. It works similiar to an AETemplate file and will be used in NodeEditor to display the inputs and outputs of your node.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM