pyMel bug?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2010   #1
pyMel bug?

Hey,

1. create a new sphere
2. set it's rotation too "100,100,100"
3 query the rotation with this:


 from pymel.core import *
 sel = ls(selection=True)
   print sel[0].getRotation()
  


Result = [-80.0, 80.0, -80.0]

But if I use xform

from pymel.core import *
 sel = ls(selection=True)
print xform(sel[0],query=True,rotation=True)
  


Result = [100.0, 100.0, 100.0]

Why the hell is getRotation returning the wrong values?

Cheers,

Nick
 
Old 10 October 2010   #2
You are right, the getRotation() result is wrong while
sel.rotate.get()

gives you the correct result. Because the getRotation() is derived from maya.OpenMaya.MSpace.getRotation(), it would be interesting in which values the API call results and if the problem lies in the wrapping pymel or in the api method.
 
Old 10 October 2010   #3
Cheers for that,

It says in the docs it return Quanterions, so maybe that has something todo with it. I'll role with your code, much nicer than xform.
 
Old 10 October 2010   #4
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:06 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.