SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / query world coords
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 04-12-2008, 11:06 AM   #1
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default 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
Dann is offline   Reply With Quote
Old 05-12-2008, 04:50 AM   #2
bendingiscool
Subscriber
 
bendingiscool's Avatar
 
Join Date: Jul 2006
Location: London
Posts: 567
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
bendingiscool is offline   Reply With Quote
Old 05-12-2008, 05:55 AM   #3
Dann
Registered User
 
Dann's Avatar
 
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Thanks: 0
Thanked 2 Times in 2 Posts
Default



exactly right. much obliged. (fyi... the rotate flag is -rt, but you got me close enough and I appreciate your help)
Dann is offline   Reply With Quote
Old 05-12-2008, 07:05 AM   #4
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Yeah xforms the first port of call when doing anything to do with translations/rotiations
__________________
"No pressure, no diamonds" Thomas Carlyle
gster123 is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.