[Closed] Getting the world transform of a gizmo
Is there any straight forward way of getting the world position, scale and rotation of a gizmo? Or do I just have to calculate it by hand?
- Neil
You just have to calcuate it. gizmo.transform*inverse object.transform if memory serves me right.
Any modifier in particular?
$.modifiers[1].gizmo.transform
This works for all of the modifiers I tried. UVW map, Bend, Lathe, and a few more.
Stev
That will return the parent space transform of the modifier not the world transform. I tried with a bend and I had a position value of 0,0,0 and it was not at world center.
Neil,
Look up Modifier Sub-Object Transform Properties in the Maxscript Help. First example shows getting and setting world coordinates.
To convert from local to world coordinates, you multiply the local coordinates by the nodes objecttransform matrix. To convert from world to local coordinates, you multiple the world coordinates by the inverse of the nodes objecttransform matrix.
-Eric