Put custom icon on any Maya node for display in the GUI.
import sticker
# Set icon
sticker.put(["nodeShape1", "nodeShape2"], "polyCube.png")
sticker.put("nodeShape3", "path/to/my_icon.png")
# Revert to default icon
sticker.remove("nodeShape1")
# Reveal icons from saved file
sticker.reveal()
- Icon file format must be
PNG
. - Preferred size in the Outliner is 20 x 20 pixels.
- File path can be an absolute path or be relative to the
XBMLANGPATH
environment variable. - Can use environ var in path in these form:
$var
${var}
%var%
- Will add a custom attribute
customIconPath
in node to save icon path. - Powered by Maya Python API 1.0 (Can not achieve with 2.0)