andrewhwood / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

maya plugin: worldspace export doesn't work as expected #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

run the following function:

 def _test(geo=None, range=None, newFile=False):
   import maya.cmds as mc
   import os
   mc.loadPlugin('AbcImport', 'AbcExport')

   if newFile:
       mc.file(new=1, force=1)

   if not geo:
       s = mc.polySphere()[0]
       s2=mc.polySphere()[0]
       g = mc.group(em=True)
       mc.parent(s, g)
       mc.parent(s2, g)

       mc.currentTime(0, e=1)
       mc.setKeyframe(s)
       mc.setKeyframe(s2)
       mc.setKeyframe(g)

       mc.currentTime(10, e=1)
       mc.xform(s, t=[5,6,7], ro=[20,40,60])
       mc.xform(s2, t=[-5,6,7], ro=[-20,-40,-60])
       mc.xform(g, t=[-5,-6,-7], ro=[-20,-40,-60])
       mc.setKeyframe(g)
       mc.setKeyframe(s)
       mc.setKeyframe(s2)
       geo = "%s %s" % (s, s2)

   if not range:
       range = "1 10"
   path = os.path.join(os.environ.get('HOME'), 'abcTest.abc')

   mc.AbcExport('range %s worldSpace uv %s %s' % (range, geo, path), d=1)
   print "Finished exporting"

   mc.AbcImport(path, d=1)
   print "Finished importing"

What is the expected output? What do you see instead?
I would expect the imported spheres to lie directly on top of the spheres from 
the file, but they are offset. The output from the cache isn't in local space 
though.

What version of the product are you using? On what operating system?
Maya2011 Fedora 14

Please provide any additional information below.

Original issue reported on code.google.com by jspatr...@gmail.com on 25 May 2011 at 3:08

GoogleCodeExporter commented 9 years ago
Forgot to mention, this is using Alembic 0.9.3

Original comment by jspatr...@gmail.com on 25 May 2011 at 3:09

GoogleCodeExporter commented 9 years ago
Hi, thanks for the great and thorough example!

I believe your issue is because of a bug in XformSample as mentioned here:
http://groups.google.com/group/alembic-discussion/browse_thread/thread/c2bf5ce80
aafb7ac

There was some confusion about radians and degrees so the calculation of the 
4x4 matrix (which ends up getting used by the AbcImport for non-trivial 
matrices) is incorrect.

This will be fixed in the mainline branch very soon.

I've tested it against my clone here:
http://code.google.com/r/millerlucas-dev/source/checkout

And it appears to be working as expected.

Original comment by miller.lucas on 25 May 2011 at 7:50

GoogleCodeExporter commented 9 years ago
Thanks!  I also built your clone, and this appears to resolve the issue.

Original comment by jspatr...@gmail.com on 25 May 2011 at 10:49

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 25 May 2011 at 10:52