PDA

View Full Version : maximize window with mel/python


goodvibrato
10-16-2009, 08:43 AM
In Maya 2010, there's no option to have the render view window maximized by default and it doesn't remember that you had it maximized if you close it. I was wondering if anyone knows how to maximize a window using mel or python, so I can make a hotkey. Thanks.

Pyrokinesis
10-16-2009, 12:14 PM
Im pretty sure that's a system thing not a Maya thing.

On windows you can use:
'alt' + 'spacebar' + 'x'

On Linux I think its 'win' + '+'

goodvibrato
10-16-2009, 08:38 PM
Pyrokinesis, thanks for the tip, but I'd rather be able to open the render view window and maximize it in one step than having to open the window and maximize later, which is what I already have to do.

efecto
10-18-2009, 11:08 PM
If you know the max resolution then you can hardcode the resolution like below..

// select a viewport
RenderIntoNewWindow;
window -e -wh 1200 800 renderWindowPanel1Window; // it's usually 1

goodvibrato
10-20-2009, 04:58 AM
Hey efecto, RenderIntoNewWindow executes just fine, but the next line gives me this error:

Object not found: renderWindowPanel1Window

efecto
10-20-2009, 06:01 AM
you could try renderWindowPanel2Window instead of renderWindowPanel1Window

basicallyyou need to find the name of your render window.

Pyrokinesis
10-20-2009, 08:06 AM
Ahhh, now I see what you are trying to do. You should be able to find what you need in the renderWindowPanel.mel found here:
Autodesk\MayaVersion\scripts\others.

Sorry I don't have time to dig through it for you. Good Luck.

goodvibrato
10-20-2009, 02:42 PM
Ok, I just echoed all commands and opened the render window and it said:

// Result: renderViewWindow //

So I used that and it worked. Now, I can indeed set the size of the window, but that is still not quite what I'm after. I want the window to be maximized. It seems like there should be an argument I could pass to "window" in order to do that. I'll keep looking and see what I can find.

efecto
10-20-2009, 08:13 PM
i dunno if window has a flag to maximize it.. or you can query resolution of yourdesktop then assign the values to width and height..
window -e -wh 1200 800 renderWindowPanel1Window; // it's usually 1

You need to find out the name of your render window.
lsUI -type "window";

CGTalk Moderation
10-20-2009, 08:13 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.