Mel - Maya Embedded Language

Fields are used to automaticlly update associated objects in your scene. Consult maya help menu to see full list of options associated with fields.

-floatFieldGrp
//create a window with three scale values.
// add an extra label to the end.

    string $window = `window`;
    columnLayout;
    floatFieldGrp -numberOfFields 3
    	-label "Scale" -extraLabel "cm"
    	-value1 0.3 -value2 0.5 -value3 0.1;
    showWindow $window;
-attrFieldGrp
//create a window which lists  the translate, rotate and scale
//fields of selected o transform bjects

string $object[] = `ls -sl `;
string  $obj;

if (size($object) == 0)
	{
	error("please select one or more pieces of geometry");
	}

for ( $objects in $object ) 
	{
	if ( `nodeType $objects` != "transform" ) 
		{
		error ("please select geometry only");
 		}
	}

 
string $window = `window -title "attrFieldGrp Example"`;
    	columnLayout;
	for($i =0; $i< size($object); $i++)
	{
	text -label $object[$i];
    	attrFieldGrp -attribute ($object[$i] + ".translate");
    	attrFieldGrp -attribute ($object[$i] + ".rotate");
    	attrFieldGrp -attribute ($object[$i] + ".scale");
	}
showWindow;
<Top>