No unit!
I'm actually looking for a rational explanation for something I discovered,
yes this is a known design issue in maya. Actually it was NOT present in maya 1. But it was widely requested by customers, thus breaking maya. Even the time flag will NOT HELP YOU So using getAttr helps you absolutely nothing.
See maya works on dg connections, and connections autotrigger on demand. However the big cutomers requested something VERY unwise which kindof breaks maya. Maya as a general rule does NOT enforce correctness. If you od something stupid its assumed you know what your doing and can live with it.
Now maya can make use of nodes that do trasparent setting, usually this node is a unwise expression. Expressions as a general rule play ball with the dg but you can do the following in expressions.
aetAttr whatever.attrib 124;
This kindof breaks maya. Maya nolonger knows when the expression has to be evaluated and nolonger knows that the target is paired with the expression node. Theese nodes now only trigger on time change (because there ssuch a switch in expression nodes). And the values will after this pairing NEVER EVER be right unless you change time. even wuerring:
getAttr -time $startFrame whatever.attrib;
does not evaluate correctly. because it doesnet force redraw, and the expression node is paired with redraw.
Anyway the right way to do this is to setattr the global time node with no update and then querry the value, but again it does not resolve out of dg evaluations.
But to get xform to provide the right values for that time, currentTime must use the -update 1 flag
if you wnat to do this robustly you have no choice whatsoever. Otherwise the users will find break your exporter eventually. You can temporarily turn viewports off tough (this speeds things up a bit).
Alternatively you can put a restriction on to rig things. But saying users are stupid rarely works well for any developper.
, despite what the on-line help's section on transform node attributes says, the translateX attribute is NOT in world space.
Please point us to this source so we can get it redracted asap. But yes ive never seen any such thing.
to the hidden worldMatrix attribute
its not hidden!*** your probably actually reading the wrong part of your manual read:
node reference entry for transform
But reading that alone helps nothing as the base explanation is under the parent nodetype from which it inherits behaviours so click nn the
dagNode
link
which in my test case is unscaled and unrotated and perfectly affine --
returning translation values that are 100 times greater than what xform returns?
because thets what maya does maya stores units that are called in the panels cm (the matrix is raw data that is of no use to normal users), in reality you shouldnt change default units for ANY REASON WHASOEVER**. Because maya didnt originally have units. Now you can just not slap units on a sytem like this. Its not just maya that has this flaw but pretty much ALL applications that were not designed ground up with units in mind (but then they are 10 times slower to evaluate stuff).
Actually maya has NO UNIT*. Just that the consept of numbers is so alien to most people that they had to incorpiorate it. Best think of one maya unit as whatever you cdeide it is and keep the globals slowing cm. And store whwtever you think somewhere else. (please note allmost ALL maya users/exporters assume 1 maya defult unit = 1 m)
Some kind of undocumented, Autodesk tribal knowledge?
Oh no, its documented alright! Apart for the 1 maya unit is aof undefined thing. Quite, well in fact.
- to be exact maya units is 1 cm = 1 m if you look carefully on how myas set up.
** unless you want to be knee deep in shit, form now on forever.
*** now truly hidden attributes do exsist and those are really pesky.