Skip to content
hannes edited this page Feb 16, 2023 · 7 revisions

Icons

default icons

Use the default filenames of the icons, same as shelf icon. e.g. polySphere.png

To view all default icons, you can use Maya Icons 1.1.0 NOT TESTED

see cmds.resourceManager

import maya.cmds as cmds
print(cmds.resourceManager(nameFilter="polysphere*"))
# ['polySphere.png', 'polySphere.svg', 'polySphereProj.png', 'polySphereProjLarge.png']

custom icons

Add your icons to the maya env, TODO instructions. Use the name of your icon.

custom menu attributes

you can pass custom attributes in the kwargs attribute of the config see autodesk maya docs for all attributes

label: my_label
command: print("hi")
kwargs:
    allowOptionBoxes: 1
    tearOff: 0

for developers, see DEV-Maya