PDA

View Full Version : attrFieldGrp & matrix


yaoyansi
11-17-2010, 01:01 AM
hi all

I know how to add a vector into UI:

//create a cube

polyCube -ch on -o on -cuv 4 ;



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

string $obj;



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;

but when i add a matrix type , it doesn't work anymore:
//create a cube

polyCube -ch on -o on -cuv 4 ;



//create a window which lists the translate, rotate and scale

//fields of selected o transform bjects



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

string $obj;





matrix $mm[4][4]= <<0, 1, 2, 3; 4, 5, 6, 7; 8, 9, 10, 11; 12, 13, 14, 15>>;//<---------------NOTE



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");

attrFieldGrp -attribute "mm";//<---------------NOTE

}

showWindow;

Could you tell me how to use attrFieldGrp or any other mel command to display a matrix ?

Thank you.

NaughtyNathan
11-17-2010, 01:34 PM
MEL doesn't contain any UI capable of showing a matrix. You just can't do it. The closest you'll be able to come is manually using 4 floatFieldGrps but this may be a bit of a mess to support.

:nathaN

CGTalk Moderation
11-17-2010, 01:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.