View Single Post
# 89 28-06-2006 , 05:25 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
Yo, Matt!
Congrats with the move user added image

I've done some more on it, but not that much...

Code:
//-----------------MAYA TO INDIGO CONTROL PANEL------------------

//Made by Arne OOG
//-------------------------------------------------------------------------------

//-----------------ABOUT MAYA -> INDIGO------------------

global proc abWin() 
{ 
window -title "About Maya -> Indigo" -h 200 -w 300 -sizeable false;
columnLayout;
text -label "About Maya -> Indigo" -w 300 -h 40 -backgroundColor 1 1 1 -font "boldLabelFont" -align "center" ;

text -label "" -w 300 -align "center";
text -label "Creators:" -w 300 -font "boldLabelFont" -align "center";
text -label "Matt B. (mostly)" -w 300 -align "center";
text -label "Arne OOG" -w 300 -align "center";
text -label "" -w 300 -align "center";

	separator -w 300;

text -label "" -w 300 -align "center";
text -label "Copyright © 2006" -w 300 -align "center";
			showWindow;
}

//-----------------ACTIVATE FIELDS------------------

proc skylight() 
{ 
int $state = `checkBox -query -value SkylightCheckBox`; 

  if ($state == 0) 
    floatSliderGrp -edit -enable 0 skylightSlider; 
  else 
    floatSliderGrp -edit -enable 1 skylightSlider; 
} 

proc bglight() 
{ 
int $state = `checkBox -query -value BgCheckBox`; 

  if ($state == 0) 
    floatSliderGrp -edit -enable 0 bgSlider; 
  else 
    floatSliderGrp -edit -enable 1 bgSlider; 
} 

proc hdrlight() 
{ 
int $state = `checkBox -query -value HDRCheckBox`; 

  if ($state == 0) 
    attrNavigationControlGrp -edit -enable 0 hdrSlider; 
  else 
    attrNavigationControlGrp -edit -enable 1 hdrSlider; 
} 

//-----------------CREATE STUFF------------------

proc sun() 
{sphere -r 0.5 -n Sun;} 

proc reclight() 
{ } 

proc indcamera() 
{camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 1 
-horizontalFilmAperture 1.41732 -horizontalFilmOffset 0 -verticalFilmAperture 0.94488 
-verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 
-nearClipPlane 0.01 -farClipPlane 1000 -orthographic 0 -orthographicWidth 30; 
objectMoveCommand; cameraMakeNode 3 "";} 

//-----------------THE CONTROL PANEL------------------

	window -title "Maya -> Indigo Controll Panel" -h 600 -w 400 -menuBar true -sizeable false;

	menu -label "Edit" -tearOff true;

		menuItem -label "Save Settings";
		menuItem -label "Reset Settings";
		menuItem -divider true;
		menuItem -label "Close" -command "closeWindow";

	menu -label "Create" -tearOff true;

	menuItem -label "Materials" -subMenu true;
		menuItem -label "Diffuse Shader";
		menuItem -label "Phong Shader";
		menuItem -label "Specular Shader";
		menuItem -label "Mesh Light Shader";
		menuItem -label "Metal Shader";
 				setParent -menu ..;
	menuItem -label "Lights" -subMenu true;
		menuItem -label "Sky Light" -command "sun";
		menuItem -label "Rectangle Light" -command "reclight";
 				setParent -menu ..;
	menuItem -label "Misc" -subMenu true;
		menuItem -label "Camera" -command "indcamera";

	menu -label "Window" -tearOff true;

		menuItem -label "Material Editor"  -command "materialEditor";
		menuItem -label "Material Browser"  -command "materialBrowser";
			
	menu -label "Help" -helpMenu true;
		menuItem -label "About Maya -> Indigo..." -command "abWin";

columnLayout -columnAlign "center";
text -label "Maya -> Indigo Controll Panel" -w 390 -h 40 -backgroundColor 1 1 1 -font "boldLabelFont" -align "center";

 		tabLayout;
 			shelfLayout Materials;
shelfButton -annotation "Diffuse Shader" -image "indigo_diffuce.bmp" -command "diffuce";
shelfButton -annotation "Phong Shader" -image "indigo_phong.bmp" -command "phong";
shelfButton -annotation "Specular Shader" -image "indigo_specular.bmp" -command "specular";
shelfButton -annotation "Mesh Light Shader" -image "indigo_meshLight.bmp" -command "meshlight";
shelfButton -annotation "Metal Shader" -image "indigo_metal.bmp" -command "metal";
 				setParent ..;

 			shelfLayout Lights;
shelfButton -annotation "Sky Light" -image "indigo_sun.bmp" -command "sun";
shelfButton -annotation "Rectangle Light" -image "commandButton.xpm"  -command "reclight";
 				setParent ..;

 			shelfLayout Misc;
shelfButton -annotation "Camera" -image "indigo_camera.bmp"  -command "indcamera";
 				setParent ..;
 			setParent ..;
text -label "General setting" -w 390 -align "center" -font "boldLabelFont";

//-----------------SETTINGS------------------

frameLayout -collapsable true -label "Render Setting" -w 390;

 			columnLayout -columnAlign "center";
			
				optionMenu -label "Metropolis";
		menuItem -label "True";
		menuItem -label "False";
				floatSliderGrp -h 25 -label "Large Mutation Prob" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.001 -maxValue 1 -value 0.2 -precision 3;
				floatSliderGrp -h 25 -label "Max Change" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.001 -maxValue 0.1 -value 0.025 -precision 3;
				floatSliderGrp -h 25 -label "Russian Roulette Live Prob" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.001 -maxValue 1 -value 0.7 -precision 3;
				floatSliderGrp -h 25 -label "Max Depth" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 100 -maxValue 10000 -value 1000 -precision 3;
				optionMenu -label "Pathtracing";
		menuItem -label "True";
		menuItem -label "False";
				optionMenu -label "Bidirectional";
		menuItem -label "True";
		menuItem -label "False";
	separator -w 390 -h 12;

optionMenu -label "Logging";
		menuItem -label "True";
		menuItem -label "False";

 			                setParent ..;
 			setParent ..;

frameLayout -collapsable true -label "Camera Setting" -w 390;

 			columnLayout -columnAlign "center";
			
				floatSliderGrp -h 25 -label "Sensor Width" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.001 -maxValue 0.1 -value 0.036 -precision 3;
				floatSliderGrp -h 25 -label "Lens Sensor Dist" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.0000001 -maxValue 0.1 -value 0.0523314 -precision 7;
	separator -w 390 -h 12;

optionMenu -label "White Balance";
		menuItem -label "E";
		menuItem -label "D50";
		menuItem -label "D55";
		menuItem -label "D60";
		menuItem -label "D65";
		menuItem -label "D75";
		menuItem -label "A";
		menuItem -label "B";
		menuItem -label "C";
		menuItem -label "9300";
		menuItem -label "F2";
		menuItem -label "F7";
		menuItem -label "F11";

 			                setParent ..;
 			setParent ..;

frameLayout -collapsable true -label "Environment Setting" -w 390;

 			columnLayout -columnAlign "center";

				checkBox -label "Sky Light" -align "center"  -value 0 -changeCommand "skylight" SkylightCheckBox;
floatSliderGrp -h 25 -label "Turbidity" -field true -fieldMinValue -10000 -fieldMaxValue 10000 -minValue 0.1 -maxValue 5 -value 2 -precision 3 -enable 0 skylightSlider;
	separator -w 390 -h 12;
				checkBox -label "Background Light" -align "center" -changeCommand "bglight" BgCheckBox;
	colorSliderGrp -h 25 -label "Backgroung Light Color" -rgb 0.5 0.5 0.5 -enable 0 bgSlider;
	separator -w 390 -h 12;
				checkBox -label "HDR map" -align "center" -changeCommand "hdrlight" HDRCheckBox;
		attrNavigationControlGrp -l "HDR file" -enable 0 hdrSlider;

 			                setParent ..;
 			setParent ..;

button -w 390 -h 30 -label "Generate XML code" -align "center"  -command "indigoOutput";

			showWindow;
I've also created some Icons for th GUI
user added image
user added image
user added image
user added image
user added image
user added image
user added image

May create new Material Icons... (they are simple maya renders)
They have to be placed in the "C:\Documents and settings\User\My Documents\maya\6.0\prefs\icons" Folder to work...

Please just add stuff to the GUI and make it use your script, Matt.

I'm leaving for a 3.5 weeks long vacation somewhere in Europe, tomorrow...
I may come by the site some times from an internet café or so...
But I won't be able to do much computer stuff user added image

user added image