Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 04-12-2008 , 12:06 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

query world coords

Hey,

Can anyone help me figure out how to query the world space transform and rotational values of an object? I've looked all through the docs and just can't find it. Pivot points no problem, but I need rotation as well so that doesn't help me.

Thanks a bunch.

-tarmy

# 2 05-12-2008 , 05:50 AM
bendingiscool's Avatar
Subscriber
Join Date: Jul 2006
Location: London
Posts: 567
Use xform...

you can either store it in a float array or a vector like so..

///////////////////////

vector $translates = `xform -query -worldSpace -t name of object`;

///////////////////////

you can replace the t with an r for rotates.

Chris

# 3 05-12-2008 , 06:55 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
user added image

exactly right. much obliged. (fyi... the rotate flag is -rt, but you got me close enough and I appreciate your help)

# 4 05-12-2008 , 08:05 AM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Yeah xforms the first port of call when doing anything to do with translations/rotiations


"No pressure, no diamonds" Thomas Carlyle
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads