View Full Version : iconTextButton image problem
Gnimmel 01-06-2010, 01:30 PM Hello all,
I'm trying to get a script working on both mac and windows versions of maya, but I'm having problems with the iconTextButton images. When I use bmp files as images it works on windows, but not on a mac. When I use .iff it works on a mac but not on windows. It seems to be the same results with any image format I use, one will work on one system but not the other. I can't get the images to show up on both systems? Anyone have any thoughts on this? I'm still using maya 8.5 for this script, if things have changed in future versions.
Thanks,
Richard
|
|
AlexOddbratt
01-06-2010, 02:08 PM
Have you tried the xpm image format?. It's the format I always use for icons and it hasn't failed me so far. If that doesn't work you could always solve it the ugly way, by querying what OS you are on and have different image formats assigned to the iconSymbolButton depending on if it is mac, windows or linux.
Geuse
01-06-2010, 05:38 PM
interesting. how do you query the OS in mel?
thanks
AlexOddbratt
01-06-2010, 06:13 PM
There is a MEL command called "about" which has a lot of flags for finding which OS or if it's 64-bit.
Geuse
01-06-2010, 06:41 PM
cool thanks!
Gnimmel
01-07-2010, 11:33 AM
xpm seems to work on both machines :) thanks. However, now I've hit another problem. These icons need to be generated from maya and when I set the renderer to xpm, it saves a .img file? If I render in maya manually and set it up to xpm, copy the settings from the script editor and use the same in my sciprt, it's not a xpm I get at the end.
Any thoughts on this one?
Thanks,
Richard
AlexOddbratt
01-07-2010, 11:54 AM
The xpm rendering as .img issue can be solved by checking the custom extension checkbox in render settings and inputting xpm as the extension or by just renaming the .img image to .xpm. But I wouldn't recommend rendering directly to xpm in Maya since it seems that Maya applies some really crappy compression to xpm images. Try rendering to some other format and convert it to xpm through a compositing program like nuke or through gimp(if I remember correctly photoshop also compresses xpm images pretty badly).
CGTalk Moderation
01-07-2010, 11:54 AM
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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.