Added scalePart to mathutils matrix type object.
and made it so toEuler converts a 4x4 matrix to a 3x3 rather then raising an error.
Its not straight fwd to get an objects worldspace loc/size/rot from its 4x4 matrix.
Example from updated docs.
      import Blender
      scn = Blender.Scene.GetCurrent()
      ob = scn.getActiveObject()
      if ob:
        mat= ob.mat # Same as martixWorld
        print 'Location", mat.translationPart() # 3D Vector
        print 'Size", mat.scalePart() # 3D Vector
        print 'Rotation", mat.toEuler() # Euler object
			
			
This commit is contained in:
		@@ -70,6 +70,7 @@ PyObject *Matrix_Determinant( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_Invert( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_TranslationPart( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_RotationPart( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_scalePart( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_Resize4x4( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_toEuler( MatrixObject * self );
 | 
			
		||||
PyObject *Matrix_toQuat( MatrixObject * self );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user