[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29634] trunk/blender/source/blender/ python: mathutils.RotationMatrix
Martin Poirier
theeth at yahoo.com
Wed Jun 23 04:42:40 CEST 2010
Revision: 29634
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29634
Author: theeth
Date: 2010-06-23 04:42:39 +0200 (Wed, 23 Jun 2010)
Log Message:
-----------
mathutils.RotationMatrix
Angles are in radians. Doc and example should reflect reality
Modified Paths:
--------------
trunk/blender/source/blender/python/doc/examples/mathutils.py
trunk/blender/source/blender/python/generic/mathutils.c
Modified: trunk/blender/source/blender/python/doc/examples/mathutils.py
===================================================================
--- trunk/blender/source/blender/python/doc/examples/mathutils.py 2010-06-23 02:40:30 UTC (rev 29633)
+++ trunk/blender/source/blender/python/doc/examples/mathutils.py 2010-06-23 02:42:39 UTC (rev 29634)
@@ -1,8 +1,9 @@
import mathutils
+from math import radians
vec = mathutils.Vector(1.0, 2.0, 3.0)
-mat_rot = mathutils.RotationMatrix(90, 4, 'X')
+mat_rot = mathutils.RotationMatrix(radians(90), 4, 'X')
mat_trans = mathutils.TranslationMatrix(vec)
mat = mat_trans * mat_rot
Modified: trunk/blender/source/blender/python/generic/mathutils.c
===================================================================
--- trunk/blender/source/blender/python/generic/mathutils.c 2010-06-23 02:40:30 UTC (rev 29633)
+++ trunk/blender/source/blender/python/generic/mathutils.c 2010-06-23 02:42:39 UTC (rev 29634)
@@ -168,7 +168,7 @@
"\n"
" Create a matrix representing a rotation.\n"
"\n"
-" :arg angle: The angle of rotation desired.\n"
+" :arg angle: The angle of rotation desired, in radians.\n"
" :type angle: float\n"
" :arg size: The size of the rotation matrix to construct [2, 4].\n"
" :type size: int\n"
More information about the Bf-blender-cvs
mailing list