Maya 2012 python image control won't resize images

Maya 2012 python image control won't resize images

Anonymous
Not applicable
635 Views
4 Replies
Message 1 of 5

Maya 2012 python image control won't resize images

Anonymous
Not applicable
I'd been writing GUI for my company for Maya 2011. We're about to switch to 2012, and some things are working differently. I have an image control that can show various files in a gallery folder, resizing them all to 200x200:

mc.image('pictureFrame', image=r'Y:\\RESOURCES\\3D_cinematic_library\\gallery\\none.jpg', h=200, w=200)

In 2012, rather than resizing them it just crops them off at the 200x200 mark. Anyone know what's up with this or how to fix it?
0 Likes
636 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Can people tell me if they a) have not had this problem at all, or b) just don't know what to do about it?
0 Likes
Message 3 of 5

lee.dunham
Collaborator
Collaborator
unfortunately it was part of the move to qt in maya 2011;

http://area.autodesk.com/blogs/cory/what_s_new_in_2011

Additional formats for custom icons: Maya now has expanded sup... Additionally, images that are not the correct size are scaled now rather than cropped.


i don't think there's an alternative besides having correctly scaled images in the first place.

it might be worth looking into a PyQt solution?
0 Likes
Message 4 of 5

Anonymous
Not applicable
Huh. So the resizing feature was ONLY available in 2011? (2009 and 2012 both don't work). They decided it was a bad idea for some reason?

I'll look into the pyQt solution, although I don't know anything about that currently.
0 Likes
Message 5 of 5

Anonymous
Not applicable
you could always use a library like PIL (Python image library), resize your image and load the resized version.
0 Likes