On 25/02/2015 at 06:45, xxxxxxxx wrote:
Cinema 4D Version:
Language(s) : C++ ; PYTHON ;
I know the matrix scale is determined by the length of v1, v2 and v3.
def get_matrix_scale(mat) : r""" Returns the scale component from a Matrix. """ return c4d.Vector( mat.v1.GetLength(), mat.v2.GetLength(), mat.v3.GetLength())
But how can I figure if the scale is negative or positive?
Btw, the information in the Python documentation is not correct. If you use the normalized version
of v1, v2 and v3, you'll just get a scale of 1, 1, 1.
Originally posted by xxxxxxxx
Getting the scale is just a matter of measuring the length of each of the axis vectors:
m = obj.GetMg()
scale = c4d.Vector( m.v1.GetNormalized(),