vbox(id = 'menu_mtl' clip = '0')(margin = '9 9 0 0') ::
{
	hbox(size = '28' clip = '0')(hint = 'Select Material [ALT+LButton]') ::
	{
		switch(class = 'panel')(def='h1' path = '1 1' selected = '1' text = 'Material')(flex = '1')
		
		switch(def = 'sw-sub' onClick = 'set pt_mod' text = 'All')
		(size = '30' margin = '0 0 3 3')(hint = 'Modify All Materials')
	}

	vbox(clip = '0' prev = '5') ::
	{
		opBox(class = 'tab')(def = 'outline' id = "mtl_menu" index = '0' margin = '-3 -3 -5 -5' size = '72' next = '4') ::
		{
			hbox(def = 'outline-i') ::
			{
				vbox(flex = '1') ::
				{
					option(class = 'cmd' def = 'option')(text = 'Diffuse')(flex = '1')(corner = '12' radius = '2')(hint = 'Diffuse Material')(select_value = [['menu_diffuse']])(onClick = 'set pt_mtl_t _diffuse')
					option(class = 'cmd' def = 'option')(text = 'Emit'	)(flex = '1')(corner = '3' radius = '2')(hint = 'Emissive Material')(select_value = [['menu_emit']])(onClick = 'set pt_mtl_t _emit')
					option(class = 'cmd' def = 'option')(text = 'Blend'	)(flex = '1')(hint = 'Blend Materials')(select_value = [['menu_surf' 'menu_media' 'menu_metal' 'menu_tran']])(onClick = 'set pt_mtl_t _blend')
				}
				vbox(flex = '1') ::
				{
					option(class = 'cmd' def = 'option')(text = 'Metal'	)(flex = '1')(hint = 'Metal/Plastic Material')(select_value = [['menu_surf' 'menu_metal']])(onClick = 'set pt_mtl_t _metal')
					option(class = 'cmd' def = 'option')(text = 'Glass'	)(flex = '1')(hint = 'Glass Material')(select_value = [['menu_surf' 'menu_tran' 'menu_media']])(onClick = 'set pt_mtl_t _glass')
					option(class = 'cmd' def = 'option')(text = 'Cloud'	)(flex = '1')(hint = 'Cloud Material')(select_value = [['menu_media']])(onClick = 'set pt_mtl_t _media')
				}
			}
		}

		hbox(size = '22' prev = '6' margin = '4 4 0 0' next = '6') ::
		{
			button(def = 'bn-ic' text = '^38' textFont = 'icon' onClick = 'mtl_reset' delayed = '1' textSize = '14 14')(flex = '1')(hint = 'Reset to Diffuse Material [CTRL+R]')
			button(def = 'bn-ic' text = '^51' textFont = 'icon' onClick = 'mtl_copy'  delayed = '1' textSize = '14 14')(flex = '1')(hint = 'Copy Material [CTRL+C]')
			button(def = 'bn-ic' text = '^52' textFont = 'icon' onClick = 'mtl_paste' delayed = '1' textSize = '14 14')(flex = '1')(hint = 'Paste Material [CTRL+V]')	
		}
			
		vbox(id = 'menu_surf' hidden = '1') ::
		{
			sp(def = 'bar-h' size = '3')

			hbox(size = '28' clip = '0')(hint = 'Surface Properties') ::
			{
				switch(class = 'panel')(def='h1' path = '1 1' selected = '1' text = 'Surface')(flex = '1')
			}
	
			vbox(next = '6') ::
			{
				vbox(hint = 'Surface Roughness') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'Roughness')(flex = '1')
						textField(def = 'tf-sub' id = 'pt_rough' onEnter = 'set pt_mtl _rough')(size = '24')
					}
					slider(id = 'pt_rough_sl' onChange = 'set pt_mtl _rough')(size = '28')
				}
		
				vbox(hint = 'Refractive Index') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'IOR')(flex = '1')
						textField(def = 'tf-sub' id = 'pt_ior' maxLength = '5' onEnter = 'set pt_mtl _ior')(size = '35')
					}
					slider(id = 'pt_ior_sl' onChange = 'set pt_mtl _ior' range = '1 3' snap = '0.01')(size = '28')
				}

				vbox(id = 'menu_metal' hidden = '1') ::
				{	
					vbox(hint = 'Specular') ::
					{
						hbox(size = '15') ::
						{
							label(def = 'h3' text = 'Specular')(flex = '1')
							textField(def = 'tf-sub' id = 'pt_sp' onEnter = 'set pt_mtl _sp')(size = '24')
						}
						slider(id = 'pt_sp_sl' onChange = 'set pt_mtl _sp' range = '1 2' snap = '0.01')(size = '28')
					}

					vbox(hint = 'Metallic') ::
					{
						hbox(size = '15') ::
						{
							label(def = 'h3' text = 'Metallic')(flex = '1')
							textField(def = 'tf-sub' id = 'pt_metal' onEnter = 'set pt_mtl _metal')(size = '24')
						}
						slider(id = 'pt_metal_sl' onChange = 'set pt_mtl _metal')(size = '28')
					}					
				}

				vbox(id = 'menu_tran' hidden = '1' hint = 'Transparency') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'Transparency')(flex = '1')
						textField(def = 'tf-sub' id = 'pt_trans' onEnter = 'set pt_mtl _trans')(size = '24')
					}
					slider(id = 'pt_trans_sl' onChange = 'set pt_mtl _trans')(size = '28')
				}
			}
		}	
		
		vbox(id = 'menu_media' hidden = '1' clip = '0') ::
		{
			sp(def = 'bar-h' size = '3')
			
			hbox(size = '28'  margin = '0 -8 0 0')(hint = 'Media Properties') ::
			{
				switch(class = 'panel')(def='h1' path = '1 1' selected = '1' text = 'Media')(flex = '1')

				opBox(class = 'tab')(id = 'pt_media' index = '0')(prev = '3')::
				{
					hbox ::
					{
						option(text = '^39' textFont = 'icon' textsize = '12 13')(size = '15')(hint = 'Absorb Media')					(class = 'cmd')(onSelect = 'set pt_media 0')
						option(text = '^40' textFont = 'icon' textsize = '11 11')(size = '15')(hint = 'Scatter Media')					(class = 'cmd')(onSelect = 'set pt_media 1')(select_value = [['menu_g']])
						option(text = '^62' textFont = 'icon' textsize = '12 12')(size = '15')(hint = 'Emissive Media')					(class = 'cmd')(onSelect = 'set pt_media 2')
						option(text = 'S'   textFont = 'std' textsize = '7 7'  )(size = '15')(hint = 'Subsurface Scattering Media')		(class = 'cmd')(onSelect = 'set pt_media 3')
					}
				}
			}

			vbox(next = '6') ::
			{
				vbox(hint = 'Media Density') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'Density')(flex = '1')
					
						textField(def = 'tf-sub' id = 'pt_d' onEnter = 'set pt_mtl _d' maxLength = '6')(size = '40')
					
						resizer(class = 'float')(range = '0 5000.0' step = '1' space = '2')(size = '8' prev ='3' margin = '0 0 -6.5 -6.5')
					}

					slider(id = 'pt_d_sl' onChange = 'set pt_mtl _d')(size = '28')
				}
				
				vbox(id = 'menu_g' hint = 'Media Phase' hidden = '1') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'Phase')(flex = '1')
					
						textField(def = 'tf-sub' id = 'pt_g' onEnter = 'set pt_mtl _g' maxLength = '5')(size = '40')
					
						resizer(class = 'float')(range = '-0.9 0.9' step = '0.01' space = '2')(size = '8' prev ='3' margin = '0 0 -6.5 -6.5')
					}

					slider(id = 'pt_g_sl' onChange = 'set pt_mtl _g' range = '-0.9 0.9' snap = '0.01')(size = '28')
				}
			}
		}
	
		vbox(id = 'menu_emit' hidden = '1') ::
		{
			sp(def = 'bar-h' size = '3')
			
			hbox(size = '28' clip = '0')(hint = 'Emission Properties') ::
			{
				switch(class = 'panel')(def='h1' path = '1 1' selected = '1' text = 'Emission')(flex = '1')
			}
		
			//----------------
			// Emission
			//----------------
			vbox(hidden = '0') ::
			{
				vbox(hint = 'Light Emission') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'Emission')(flex = '1')
						textField(def = 'tf-sub' id = 'pt_emit' onEnter = 'set pt_mtl _emit')(size = '24')
					}
					slider(id = 'pt_emit_sl' onChange = 'set pt_mtl _emit')(size = '28')
				}
	
				vbox(hint = 'Radiant Flux') ::
				{
					label(def = 'h3' text = 'Power' align = '1')(size = '15' flex = '1')
					slider(class = 'blk')(range = '0 5' snap = '1' exclusive = '1' barWidth = '8' border = '2')
					(id = 'pt_flux_sl' onChange = 'set pt_mtl _flux')(size = '28')
				}

				vbox(hint = 'Low Dynamic Range') ::
				{
					hbox(size = '15') ::
					{
						label(def = 'h3' text = 'Ldr')(flex = '1')
						textField(def = 'tf-sub' id = 'pt_ldr' onEnter = 'set pt_mtl _ldr')(size = '24')
					}
					slider(id = 'pt_ldr_sl' onChange = 'set pt_mtl _ldr')(size = '28')
				}
			}
		}
	}

	sp(id = 'rr_sep0' def = 'bar-h' size = '3' hidden = '1')
}

