FORUMS: list search recent posts

NOOB Q: center selection

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Eric Chard
NOOB Q: center selection
on Apr 23, 2010 at 7:41:56 pm

This is one of those simple NOOB questions that are surprisingly resistant to finding on teh Googlez:

Is there a one-button function to center the selected elements? That is, move them to the origin?

Thanks, and sorry for the basicness: I did look in the help.....



Return to posts index

Michiel Duvekot
Re: NOOB Q: center selection
on Apr 23, 2010 at 9:11:44 pm

No. Or, more precisely, not by default. There is no one button solution unless you use a MEL script and create a button for it.

for example, you could take this bit of MEL, paste it into the script editor, drag it up on a shelf, and you have your button.

string $sel[] = `ls -sl -transforms`;
string $tmp;
for ($tmp in $sel){
select $tmp;
CenterPivot;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;
float $tx = `getAttr ".tx"` - `getAttr ".spx"`;
float $ty = `getAttr ".ty"` - `getAttr ".spy"`;
float $tz = `getAttr ".tz"` - `getAttr ".spz"`;
move -r $tx $ty $tz;
}
select $sel;


Return to posts index

Eric Chard
Re: NOOB Q: center selection
on Apr 26, 2010 at 7:18:27 pm

Thanks. I'm just adding Maya to my skillset (longtime LW user) and it's odd how something one uses all the time in one app is missing, but not missed, in another.

++++++++++++++++
"Putting the HARM in 'harmonica' since 2005."
++++++++++++++++


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]