CGTalk > Software > Autodesk Maya
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 03-06-2013, 02:54 AM   #1
Always Fail
Jiang Han
former Effects Animator
former UBISOFT Shanghai Studio now 待业
Shanghai, China
Join Date: Oct 2004
Posts: 82
Send a message via MSN to oglop
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 ?

Last edited by oglop : 03-06-2013 at 02:58 AM.
Old 03-06-2013, 07:21 AM   #2
Always Fail
Jiang Han
former Effects Animator
former UBISOFT Shanghai Studio now 待业
Shanghai, China
Join Date: Oct 2004
Posts: 82
Send a message via MSN to oglop
answered my own question ...


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
label=QLabel() label.setPixmap(QPixmap('cube.xpm'))

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))

Last edited by oglop : 03-06-2013 at 04:33 PM.
Old 04-15-2013, 07:55 PM   #3
lucericr's Avatar
Maya UI Team
Montreal, Canada
Join Date: Mar 2013
Posts: 129
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() test.setLayout(layout) icon = QtGui.QIcon(":/cube.png") button = QtGui.QToolButton() button.setFixedSize(24,24) button.setIcon(icon) button.setIconSize(QtCore.QSize(20,20)) layout.addWidget(button)
Old 04-15-2013, 07:55 PM   #4
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:45 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.