View Full Version : UI Changes Between 2010 and 2012
10-06-2011, 01:18 AM
Hey there, so I had a melscript whose UI looked fine in 2010, but is now badly spaced in 2012. I know they went through a major UI overhaul between 2010 and 2011, is this change to the formatting of melscript UIs something that a lot of people have had to deal with? What's the best way to fix this issue?
I've included both an image of the UI and the melscript below. Thanks for any info.
10-06-2011, 03:46 PM
I haven't looked at your script in any great detail, but I see that you're explicitly setting some heights/widths in there. I think Maya can now handle default spacing a bit better than before so just try getting rid of all that and see what it looks like.
I commented out all your -h, -w, -marginHeight, -columnWidth settings and this is what it looks like for me.
10-06-2011, 07:31 PM
Thanks for the info, I did some cleaning of basically all formatting and the UI works much better now, in both 2011 and 2012, Linux and Windows. Sadly, the same code doesn't work in 2010 (the UI now looks all messed up), so I guess I'll distribute an older and newer version of the script, depending on which version of maya you have. Thanks for the info.
Alternatively you can test for the current Maya version in the script, and present different UI options accordingly:
To get the current Maya version, use:
int $version = `about -v`;
float $v = getApplicationVersionAsFloat();
10-07-2011, 04:38 AM
I considered that, but considering the amount of code that would need to be swapped, I'm basically writing the UI twice anyways (It's not just like one or two lines different). But thanks for the code, I always wondered what the best way was to get the maya softyware version was, filed away for someday when I need it.
10-07-2011, 04:19 PM
I would recommend using a single formLayout as opposed to the nested rowLayout setup for each of Translate, Rotate and Scale.
A form layout will give you greater flexiblity and uniformity with your controls, even when working between the older UI and new Qt UI. It may even help you avoid hardcoding different UI sizes for different OSs.
All you have to do it remove the heights from your frameLayouts. It will look fine in both 2010 and 2011.
10-10-2011, 07:01 PM
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.