global proc AEhmFillNodeTemplate( string $nodeName )
{
	//Start the scroll layout
    editorTemplate -beginScrollLayout;
	
	
	// The all go into the collapsable "Parameters" section
	editorTemplate -beginLayout "Basic Parameters" -collapse false;
	
	
	
	//Add the main controls

	editorTemplate -callCustom "inComponentsControl" "inComponentsControlReplace" "edgeLoopA";
	editorTemplate -callCustom "inComponentsControl" "inComponentsControlReplace" "edgeLoopB";
	editorTemplate -addSeparator;
	
	
	
	editorTemplate -label "Interpolate Blend" -addControl "smoothFiller";
	editorTemplate -callCustom "intSliderControl2100" "intSliderControlReplace" "sectionSpans";
	editorTemplate -callCustom "floatSliderControl01" "floatSliderControlReplace" "weightA";
	editorTemplate -callCustom "floatSliderControl01" "floatSliderControlReplace" "weightB";
	
	editorTemplate -addSeparator;
	editorTemplate -label "Blend Strategy" -addControl "fillStrategy";
	editorTemplate -label "Refine Blend" -addControl "refinement";
	editorTemplate -addSeparator;
	
	editorTemplate -endLayout;
	
	// Add the advanced controls here
	editorTemplate -beginLayout "Advanced Parameters" -collapse false;
	
	
	
	
	
	
	editorTemplate -label "Use Ramp" -addControl "activeRampedFiller";
	editorTemplate -label "Parallel Move" -addControl "rampMode";
	
	editorTemplate -callCustom "floatSliderControl0011" "floatSliderControlReplace" "rampChordDist";
	editorTemplate -callCustom "floatSliderControlmin10plus10" "floatSliderControlReplace" "rampOffset";
	editorTemplate -callCustom "floatSliderControlmin10plus10" "floatSliderControlReplace" "rampScale";
	AEaddRampControl( $nodeName + ".rampedFiller" );
	editorTemplate -addSeparator;
	

	editorTemplate -addControl "computeNormals";
	editorTemplate -addControl "continuity";
	
	editorTemplate -endLayout;
	
	//This will add the extra attributes frame
    editorTemplate -addExtraControls;

    editorTemplate -endScrollLayout;
	
	
	// Tell the attribute editor not to display the attributes we
	// don't care about.
	editorTemplate -suppress "inCurves";
	editorTemplate -suppress "inCurvesMatrix";
	editorTemplate -suppress "inMeshes";
	editorTemplate -suppress "inMeshesMatrix";
	
	
	//Suppress "special channels", they are created from the python node connector, and would be great to don't
	// have the need to hardcode here the names...if they're not present no problems or errors..
	editorTemplate -suppress "hmMeshConnectionA";
	editorTemplate -suppress "hmMeshConnectionB";
	editorTemplate -suppress "hmCompoundOutToMesh";
	editorTemplate -suppress "ouUnion_0";
	editorTemplate -suppress "ouDifferenceA_0";
	editorTemplate -suppress "ouDifferenceB_0";
	editorTemplate -suppress "ouDifferenceA_1";
	editorTemplate -suppress "ouDifferenceB_1";
	editorTemplate -suppress "ouIntersection_0";
	editorTemplate -suppress "ouPanelA_0";
	editorTemplate -suppress "ouPanelB_0";
	editorTemplate -suppress "ouPanelA_1";
	editorTemplate -suppress "ouPanelB_1";


/* 	if (`attributeQuery -exists -node $nodeName  "hmMeshConnectionA"`)
		{
		print "esiste!!";
		editorTemplate -suppress "hmMeshConnectionA";
		} */
}

//============ CUSTOM CONTROLS ========================

//Use this trick for custom limits on controls
global proc floatSliderControlmin10plus10( string $attrName )
	{
	floatSliderControl($attrName, -10, 10);
	}
global proc floatSliderControl0011( string $attrName )
	{
	floatSliderControl($attrName, 0.0001, 1);
	}
global proc floatSliderControl01( string $attrName )
	{
	floatSliderControl($attrName, 0, 1);
	}

global proc floatSliderControl0180( string $attrName )
	{
	floatSliderControl($attrName, 0, 180);
	}



global proc intSliderControl2100( string $attrName )
	{
	intSliderControl($attrName, 2, 100);	
	}


//===================== Int slider ================================= 

global proc intSliderControl( string $attrName, float $minVal, float $maxVal )
	{
		
	//Extract a clean name for the labels
	//Add the buffer for the result
	// string $buffer[];
	// $numTokens = `tokenize $attrName "." $buffer`;

	string $niceName = `attributeName -nice $attrName`;
	
	//Create the integer slider control
	intSliderGrp
		-label $niceName
		-field 1 
		-columnWidth 2 50
		-min $minVal
		-max $maxVal
		intSliderCtrl;

	//Connect control to the attribute 
	connectControl intSliderCtrl $attrName;
	}


global proc intSliderControlReplace( string $attrName )
	{
	// Install the connection between the ... and the
	// actual scale attribute
	connectControl intSliderCtrl $attrName;
	}




//===================== Float slides ================================= 
   
global proc floatSliderControl( string $attrName, float $minVal, float $maxVal )
	{

	//Extract a clean name for the labels
	//Add the buffer for the result
	// string $buffer[];
	// $numTokens = `tokenize $attrName "." $buffer`;

	string $niceName = `attributeName -nice $attrName`;

	//Create the float slider control
	floatSliderGrp
		-label $niceName
		-field 1 
		-precision 3
		-columnWidth 2 50
		-min $minVal
		-max $maxVal
		sliderGrp;

	//Connect control to the attribute 
	connectControl sliderGrp $attrName;
	}


global proc floatSliderControlReplace( string $attrName )
	{
	// Install the connection between the radioButtonGrp and the
	// actual scale attribute
	connectControl sliderGrp $attrName;
	}
	
	
//===================== Input Components ================================= 

//Use this trick for custom limits on controls
global proc inComponentsControl( string $attrName )
	{
	string $niceName = `attributeName -nice $attrName`;
	
	textFieldGrp -label $niceName -adj 2 -cat 2 "right" 0 -w 100  textFieldControl ; 
	rowLayout -nc 2 -cat 1 "both" 0;	
	text "";
	button -label "replace with selection" -w 50;
	}
	
global proc inComponentsControlReplace( string $attrName )
	{
	// Install the connection between the optionMenu and the
	// actual boolean control
	connectControl textFieldControl $attrName;
	}