View Single Post
# 87 17-06-2006 , 08:45 PM
arneoog's Avatar
Registered User
Join Date: Mar 2006
Posts: 189
I did some more on it...

Code:
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;
}

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 camera() 
{} 

	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 "camera";

	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 "commandButton.xpm" -command "diffuce";
shelfButton -annotation "Phong Shader" -image "commandButton.xpm" -command "phong";
shelfButton -annotation "Specular Shader" -image "commandButton.xpm" -command "specular";
shelfButton -annotation "Mesh Light Shader" -image "commandButton.xpm" -command "meshlight";
shelfButton -annotation "Metal Shader" -image "commandButton.xpm" -command "metal";
 				setParent ..;

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

 			shelfLayout Misc;
shelfButton -annotation "Camera" -image "commandButton.xpm"  -command "camera";
 				setParent ..;
 			setParent ..;
text -label "General setting" -w 390 -align "center" -font "boldLabelFont";
//Settings
frameLayout -collapsable true -label "Render Setting" -w 390;

 			columnLayout -columnAlign "center";
			
				checkBox -label "Metropolis" -align "center";
				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;
				checkBox -label "Pathtracing" -align "center";
				checkBox -label "Bidirectional" -align "center";
	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;