Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Maya 2012 python image control won't resize images
  RSS 2.0 ATOM  

Maya 2012 python image control won't resize images
Rate this thread
 
61155
 
Permlink of this thread  
avatar
  • Total Posts: 3
  • Joined: 19 October 2011 02:42 AM

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?



Replies: 0
avatar
  • Raemon777
  • Posted: 18 November 2011 02:58 AM

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?



Replies: 0
avatar
  • ldunham1
  • Posted: 18 November 2011 04:23 AM

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?



Lee Dunham | Character TD
ldunham.blogspot.com

Replies: 0
avatar
  • Raemon777
  • Posted: 18 November 2011 06:04 AM

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.



Replies: 0
avatar

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



Replies: 0