[Maya2osg-users] Patch for units
Status: Alpha
Brought to you by:
jtaibo
|
From: Jean-Sébastien G. <jea...@cm...> - 2011-10-18 14:39:20
|
Hi guys,
I found out how to query what units were set in the Maya UI, so I made a
small modification to export using the correct units.
Quick recap of the problem: Vertices and translations are always
returned in centimeters when using the Maya C++ API, no matter what was
set in the units settings in the Maya UI.
That means that if we set the Maya UI to meters, and modeled a 1x1x1
cube, when exporting, we would get a 100x100x100 cube. (100 centimeters)
This modification will query what unit is set in the Maya UI, and
multiply vertex positions and translations to be in the correct units.
Note that I have tested this on a relatively old version of maya2osg,
which is why I provide a patch - if I provided modified files they would
not match anyways, so it's clearer if you only see the changes and can
apply them. It's nothing complicated anyways.
Thanks,
J-S
--
______________________________________________________
Jean-Sébastien Guay jea...@cm...
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
|