// Copyright (C) 1997-2011 Autodesk, Inc., and/or its licensors.
// All rights reserved.
//
// The coded instructions, statements, computer programs, and/or related
// material (collectively the "Data") in these files contain unpublished
// information proprietary to Autodesk, Inc. ("Autodesk") and/or its licensors,
// which is protected by U.S. and Canadian federal copyright law and by
// international treaties.
//
// The Data is provided for use exclusively by You. You have the right to use,
// modify, and incorporate this Data into other products for purposes authorized 
// by the Autodesk software license agreement, without fee.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. AUTODESK
// DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTIES
// INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF NON-INFRINGEMENT,
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE 
// OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT WILL AUTODESK AND/OR ITS
// LICENSORS BE LIABLE FOR ANY LOST REVENUES, DATA, OR PROFITS, OR SPECIAL,
// DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS
// LICENSORS HAS BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES.

//
//  Procedure Name:
//	AEjointTemplate
//
//  Description:
//	Creates the attribute editor controls for the joint Node
//
//  Input Value:
//	nodeName
//
//  Output Value:
//	None
//

source "jointTemplateUtils";

global proc AEjointTemplate ( string $nodeName ) 
{

editorTemplate -beginScrollLayout;
	// include/call base class/node attributes
	AEtransformMain $nodeName;

editorTemplate -beginLayout (uiRes("m_AEjointTemplate.kJoint"))  -collapse 0;

	editorTemplate -addControl "drawStyle";

	editorTemplate -addControl "radius";

	editorTemplate -callCustom "AEjointTypeNew" "AEjointTypeReplace" 
				"jointTypeX"
				"jointTypeY"
				"jointTypeZ";

	editorTemplate -addControl "stiffness";

	editorTemplate -addControl "preferredAngle";

	editorTemplate -addControl "jointOrient";
	editorTemplate -addControl "segmentScaleCompensate";


	editorTemplate -beginLayout (uiRes("m_AEjointTemplate.kJointLabelling"))  -collapse 0;
	editorTemplate -addControl "side";
	editorTemplate -addControl "type" "checkPuppetPartOther";
	editorTemplate -label (uiRes("m_AEjointTemplate.kOtherType"))  -addControl "otherType";
	editorTemplate -addControl "drawLabel";
	editorTemplate -endLayout;
	
	editorTemplate -beginLayout (uiRes("m_AEjointTemplate.kJointRotationLimitDamping")) ;
		editorTemplate -callCustom "AEminRotateDampRangeNew"
			"AEminRotateDampRangeReplace" "minRotateDampRange";
		editorTemplate -callCustom "AEmaxRotateDampRangeNew"
			"AEmaxRotateDampRangeReplace" "maxRotateDampRange";
		editorTemplate -callCustom "AEminRotateDampStrengthNew"
			"AEminRotateDampStrengthReplace" "minRotateDampStrength";
		editorTemplate -callCustom "AEmaxRotateDampStrengthNew"
			"AEmaxRotateDampStrengthReplace" "maxRotateDampStrength";
	editorTemplate -endLayout;


editorTemplate -endLayout;

	//suppressed attributes
	editorTemplate -suppress "inverseScale";
	editorTemplate -suppress "bindPose";
	editorTemplate -suppress "bindRotation";
	editorTemplate -suppress "bindJointOrient";
	editorTemplate -suppress "bindScale";
	editorTemplate -suppress "bindInverseScale";	
	editorTemplate -suppress "bindSegmentScaleCompensate";	
	editorTemplate -suppress "jointOrientType";
	editorTemplate -suppress "jointType";	
	editorTemplate -suppress "dofMask";
	editorTemplate -suppress "fkRotate";
	editorTemplate -suppress "ikRotate";
	editorTemplate -suppress "Character"; // dynamic attribute added by HumanIK

	ccAttributeDispatcher( $nodeName );

	// include/call base class/node attributes
	AEtransformNoScroll $nodeName;

	// For joints bound to smooth skins
	//
	AEtransformSkinCluster $nodeName;

editorTemplate -addExtraControls;
editorTemplate -endScrollLayout;

}
