How to find all existing xpm/png icon names come with maya after 2011 ?


Hi all, i want to find all the xpm icons bundled with maya. i know that after maya 2011, they decided to use .png icons. and i found parts of icons in maya2011/icons folder, but i can’t find all the icons ( pre-2011, the xpm icons are in maya200*/bin/mayaRes.dll )

in 2011 2012 2013, i can’t find where cube.xpm is . ( or sphere.xpm etc)
how do i find all the names of these icons ?
( i know that part of the icons previously found in mayaRes.dll now shows in maya201*/icons folder as xpms (linux) or pngs(windows) )

is there a cube.xpm somewhere in a folder or in a dll file ( windows) ? and on linux, where do i find all the names ?

this will return all the available "system" icons.
found this usage in shelf editor, in this file
import as resourceBrowser
    resBrowser = resourceBrowser.resourceBrowser()
    path =
maybe the icons are in python resource file,need to investigate more

now the question is how do i use these icons in my pyqt gui ?
i tried


but it’s not working, pyqt wants an absolute path to an image file or a image in resource file.
then what shall i do?
save all the png folders to a folder then use these images ?
by using this?

cmds.resourceManager(saveAs=(resName, path))


This is a month old post, but I’ll reply in case someone needs the info.
The trick is to use the prefix “:/” at the begining of an image path, to let Qt load the image file from Maya’s Qt resource.

Sample to run from the script editor:

from PySide import QtGui, QtCore
test = QtGui.QWidget()
layout = QtGui.QHBoxLayout()

icon = QtGui.QIcon(":/cube.png")
button = QtGui.QToolButton()



This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.