// Copyright (C) 1997-2004 Alias Systems Corp.
// 
// The information in this file is provided for the exclusive use of the
// licensees of Alias.  Such users have the right to use, modify,
// and incorporate this code into other products for purposes authorized
// by the Alias license agreement, without fee.
// 
// ALIAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
// INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
// EVENT SHALL ALIAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
// CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
// DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.

//
//  Alias|Wavefront Script File
//
//  Creation Date:	May 9, 1997
//
//  Procedure Name:
//	AEpointLightTemplate
//
//  Description:
//	Creates the attribute editor controls for the pointLightNode
//
//  Input Value:
//	nodeName
//
//  Output Value:
//	None
//



global proc AEpointLightFogNew (string $fogGeometry)
//
// Description:
//		Setup up button that makes fog.
//
{
	setUITemplate -pst attributeEditorTemplate;

	attrNavigationControlGrp -l "Light Fog"
		-at $fogGeometry
		-ignoreNotSupported
		lightFogControl;

	setUITemplate -ppt;
}

global proc AEpointLightFogReplace (string $fogGeometry)
//
// Description:
//		Replace the button with the command to create fog
//		for the new light.
//
{
	attrNavigationControlGrp -edit
		-at $fogGeometry
		-ignoreNotSupported
		lightFogControl;
}


//
//  Procedure Name:
//	 AEpointLightGlowNew 
//
//

global proc AEpointLightGlowNew (string $lightGlow)
{
	setUITemplate -pst attributeEditorTemplate;

	attrNavigationControlGrp -l "Light Glow"
		-at $lightGlow
		-ignoreNotSupported
		lightGlowControl;

	setUITemplate -ppt;
}

//
//  Procedure Name:
//	AEpointLightGlowReplace
//
//

global proc AEpointLightGlowReplace (string $lightGlow)
{
	attrNavigationControlGrp -edit
		-at $lightGlow
		-ignoreNotSupported
		lightGlowControl;
}

//
//  Procedure Name:
//	AEpointLightTemplate
//
//

global proc AEpointLightTemplate ( string $nodeName )
{
	AEswatchDisplay $nodeName;

editorTemplate -beginScrollLayout;

	editorTemplate -beginLayout "Point Light Attributes" -collapse 0;
		AElightCommon $nodeName;
		AEnonAmbientLightShapeNodeDecay $nodeName;
	editorTemplate -endLayout;

	ccAttributeDispatcher( $nodeName );

	editorTemplate -beginLayout "Light Effects";
			editorTemplate -callCustom 
				"AEpointLightFogNew" 		
				"AEpointLightFogReplace"
				"fogGeometry";
			editorTemplate -addControl "fogType";
			editorTemplate -addControl "fogRadius";
			editorTemplate -addControl "fogIntensity";

			editorTemplate -addSeparator;
			editorTemplate -callCustom 
				"AEpointLightGlowNew" 
				"AEpointLightGlowReplace" 
				"lightGlow";

			editorTemplate -suppress "fogGeometry";
			editorTemplate -suppress "fogType";
			editorTemplate -suppress "objectType";
			editorTemplate -suppress "pointWorld";
			editorTemplate -suppress "farPointWorld";
			editorTemplate -suppress "lightGlow";
			editorTemplate -suppress "farPointCamera";
	editorTemplate -endLayout;

	editorTemplate -beginLayout "Shadows";
		editorTemplate -addControl "shadowColor";

		// include the depth part of the nonExtendedLightShapeNode first
		AEnonExtendedLightShapeDepthMapAttr $nodeName;

		AElightCommonShadow1 $nodeName;
	
		// include the main part of the nonExtendedLightShapeNode
		AEnonExtendedLightShapeShadowAttr $nodeName;

		// include the last part of the lightNode
		AElightCommonShadow2 $nodeName;
	editorTemplate -endLayout;	

	// mental ray light attributes
	AEmentalrayPointLight $nodeName;

	// include all other inherited attrs
	AEshapeTemplate $nodeName;

	//suppressed attributes
	editorTemplate -suppress "receiveShadows";

editorTemplate -addExtraControls;
editorTemplate -endScrollLayout;
}
