View Single Post
25-11-2011, 04:42 PM   #1
Jouri
Lone Wolf Productions
 
Jouri's Avatar
 
Join Date: Nov 2011
Location: Belgium, Antwerp
Posts: 18
changing the "Quick help" window size in the maya 2012 script editor.
Since I upgraded from Maya 2009 to maya 2012 I noticed that the quickhelp frame inside the script editor window has a fixed size.
while previously when you selected quick help again the frame would double in size each time, making it easier to read everything.

Now I searched everywhere in my settings and nowhere could I find how to change it.
And since I started exploring MEL it's a feature I use alot.

So there where 2 possibilities:
A : I missed it
B : It is not there

Now i searched the internet and everywhere i see people asking that very same question I had.

So I started to dig into the Maya defined variables and created the next script that could help people running Maya 2012.

NOTE :
This script has been tested with maya 2012 only.

IMPORTANT NOTE :
Changing predifined settings can be dangerous in 99.9% of the cases if you dont know what your doing. This script is safe and i only can keep that guarantee if you use it unmodified. If for any reason the script gives you unwanted results just hit the reset button or close the quick help to restore the original maya settings.
This will also happen when you exit the quick help or maya as the script does not alter maya settings on your system but rather modifies them until the quick help is closed or maya is closed.
This means if you loose the script, Maya settings are unmodified.

Script Updated : november 27, 2011 - 07:12am CET


Code:
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
///                                                                                              ///
///               -= LoneWolf Productions =-                          __.....__                  ///
///               --------------------------                       .-'         '-.               ///
///                                                              .'               '.             ///
///                                                             /                   \            ///
///                      Script Editor                         /        |\           \           ///
///                Quick Help Window Resizer                  ;        |V \_          ;          ///
///                                                           |        |  ' \         ;          ///
///                        Autodesk                           ;        )   ,_\        |          ///
///                          Maya                             ;       /    |          ;          ///
///                          2012                              \     /      \        /           ///
///                         Script                              \    |       \      /            ///
///                                                              '.   \       \   .'             ///
///                                                                '-._|       \-'               ///
///         Created By : Caers Jouri aka Lone Wolf                     | |\     |                ///
///                     CopyRight 2011                         __lwp___/ |_'.   /______          ///
///                                                                                              ///
////////////////////////////////////////////////////////////////////////////////////////////////////
///                      2011 Lone Wolf Productions.  All rights reserved.                      ///
////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
///                                        Important Note                                        ///
///                                        ==============                                        ///
///                    !!!This script is accessing maya defined variables!!!                     ///
///                                   Change at your own risk!                                   ///
///                                                                                              ///
///                  The script is not permanent, the settings will reset when,                  ///
///                                 Quick help or Maya is closed                                 ///
///                   this is only guaranteed if the script is used unmodified                   ///
///                                                                                              ///
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////

if(`window -exists quickHelpUserResizeWindow`)
	{
		deleteUI -window quickHelpUserResizeWindow;	
	}
	
proc okQuickHelpUserResize()
	{
		global string $gCommandExecuterSideBar;
		int $newWidthQuickHelpUserResize = `intSliderGrp -q -v newQuickHelpUserResize`;
		tabLayout  -e -visible true -width $newWidthQuickHelpUserResize $gCommandExecuterSideBar;
		deleteUI -window quickHelpUserResizeWindow;		
	}
proc applyQuickHelpUserResize()
	{
		global string $gCommandExecuterSideBar;
		int $newWidthQuickHelpUserResize = `intSliderGrp -q -v newQuickHelpUserResize`;
		if ($newWidthQuickHelpUserResize < 120) 
		{
			$newWidthQuickHelpUserResize = 120;
			intSliderGrp -e -v 120 newQuickHelpUserResize;
		}		
		tabLayout  -e -visible true -width $newWidthQuickHelpUserResize $gCommandExecuterSideBar;
	}
proc resetQuickHelpUserResize()
	{
		global string $gCommandExecuterSideBar;
		intSliderGrp -e -v 120 newQuickHelpUserResize;
		tabLayout  -e -visible true -width 120 $gCommandExecuterSideBar;
	}
	
string $quickHelpUserResizeWindow = `window -title "Script Editor Quick Help Resizer" -wh 500 100  quickHelpUserResizeWindow`;

columnLayout -w 300;
intSliderGrp -label "Quick Help Frame Size" -field true
						-cal 1 "center"
						-v 120
						-cc applyQuickHelpUserResize
						-dc applyQuickHelpUserResize
						-minValue 120 -maxValue 500
						-fieldMinValue 0 -fieldMaxValue 500
						newQuickHelpUserResize;

separator;


rowColumnLayout -nc 2 -cw 1 200 -cw 2 200;
button -label "Ok" -c okQuickHelpUserResize;
button -label "Reset" -c resetQuickHelpUserResize;



int $quickHelpResizerDisclaimerConfirmationPass;
string $quickHelpResizerDisclaimerConfirmation;
string $quickHelpResizerDisclaimer = "Disclaimer."+"\n"+
									 "\n"+
									 "You agree that you use these script on your own responsibility."+"\n"+
									 "\n"+
									 " You are aware that the script may not work below Maya 2012."+"\n"+
									 "\n"+
									 "These scripts will never make modifications to your system settings, as long as they are used unaltered. Any change you make, you make on your own responsibility."+"\n"+
									 "\n"+
									 "Feedback and bug reports can reported on the forum where you have found this script, or at the following email address."+"\n"+
									 "\n"+
									 "feedback.lone.wolf.productions@dommel.be"+"\n"+
									 "\n"+
									 "\n"+
									 "By pressing the OK button, you agree to the disclaimer above."+"\n"+
									 "\n"+
									 "Lone Wolf Productions."+"\n";

$quickHelpResizerDisclaimerConfirmation = `confirmDialog -title "Quick Help Resizer- Disclaimer."
								                         -message $quickHelpResizerDisclaimer
								                         -button "Ok"
								                         -button "Cancel"
								                         -defaultButton "Ok"
								                         -cancelButton "Cancel"
								                         -dismissString "Cancel"
								                         -icon "information"`;
if($quickHelpResizerDisclaimerConfirmation == "Ok")
	{
		showWindow $quickHelpUserResizeWindow;
		window -e -wh 405 52 quickHelpUserResizeWindow;
	}
__________________
There are no stupid questions, only stupid answers.
All grammar errors are Copyrighted to me

Last edited by jouri; 27-11-2011 at 06:18 AM.
  Reply with quote