[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30207] trunk/blender/source/blender/ python/doc/examples: bugfix [#22800] Mathutil bug with vector
Campbell Barton
ideasman42 at gmail.com
Sun Jul 11 18:12:33 CEST 2010
Revision: 30207
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30207
Author: campbellbarton
Date: 2010-07-11 18:12:32 +0200 (Sun, 11 Jul 2010)
Log Message:
-----------
bugfix [#22800] Mathutil bug with vector
example wasnt updated.
Modified Paths:
--------------
trunk/blender/source/blender/python/doc/examples/mathutils.Vector.py
trunk/blender/source/blender/python/doc/examples/mathutils.py
Modified: trunk/blender/source/blender/python/doc/examples/mathutils.Vector.py
===================================================================
--- trunk/blender/source/blender/python/doc/examples/mathutils.Vector.py 2010-07-11 15:30:32 UTC (rev 30206)
+++ trunk/blender/source/blender/python/doc/examples/mathutils.Vector.py 2010-07-11 16:12:32 UTC (rev 30207)
@@ -1,15 +1,15 @@
import mathutils
# zero length vector
-vec = mathutils.Vector(0, 0, 1)
+vec = mathutils.Vector((0, 0, 1))
# unit length vector
vec_a = vec.copy().normalize()
-vec_b = mathutils.Vector(0, 1, 2)
+vec_b = mathutils.Vector((0, 1, 2))
-vec2d = mathutils.Vector(1, 2)
-vec3d = mathutils.Vector([1, 0, 0])
+vec2d = mathutils.Vector((1, 2))
+vec3d = mathutils.Vector((1, 0, 0))
vec4d = vec_a.copy().resize4D()
# other mathutuls types
Modified: trunk/blender/source/blender/python/doc/examples/mathutils.py
===================================================================
--- trunk/blender/source/blender/python/doc/examples/mathutils.py 2010-07-11 15:30:32 UTC (rev 30206)
+++ trunk/blender/source/blender/python/doc/examples/mathutils.py 2010-07-11 16:12:32 UTC (rev 30207)
@@ -1,7 +1,7 @@
import mathutils
from math import radians
-vec = mathutils.Vector(1.0, 2.0, 3.0)
+vec = mathutils.Vector((1.0, 2.0, 3.0))
mat_rot = mathutils.RotationMatrix(radians(90), 4, 'X')
mat_trans = mathutils.TranslationMatrix(vec)
More information about the Bf-blender-cvs
mailing list