pyMel bug?

Become a member of the CGSociety

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

Thread Tools Search this Thread Display Modes
  10 October 2010
pyMel bug?


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?


  10 October 2010
You are right, the getRotation() result is wrong while

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.
  10 October 2010
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.
  10 October 2010
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
Society of Digital Artists

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

All times are GMT. The time now is 03:21 AM.

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