[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1377] trunk/py/scripts/addons: update for changes in blender.
Campbell Barton
ideasman42 at gmail.com
Sun Jan 9 16:00:50 CET 2011
Revision: 1377
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1377
Author: campbellbarton
Date: 2011-01-09 15:00:50 +0000 (Sun, 09 Jan 2011)
Log Message:
-----------
update for changes in blender.
Modified Paths:
--------------
trunk/py/scripts/addons/add_mesh_BoltFactory/createMesh.py
trunk/py/scripts/addons/io_export_anim_mesh_xna/export_xna.py
trunk/py/scripts/addons/io_import_scene_dxf.py
Modified: trunk/py/scripts/addons/add_mesh_BoltFactory/createMesh.py
===================================================================
--- trunk/py/scripts/addons/add_mesh_BoltFactory/createMesh.py 2011-01-09 09:16:15 UTC (rev 1376)
+++ trunk/py/scripts/addons/add_mesh_BoltFactory/createMesh.py 2011-01-09 15:00:50 UTC (rev 1377)
@@ -142,11 +142,11 @@
q = radians(angle) #make the rotation go clockwise
if axisFlag == 'x':
- matrix = MATHUTILS.Matrix([1,0,0,0],[0,cos(q),sin(q),0],[0,-sin(q),cos(q),0],[0,0,0,1])
+ matrix = MATHUTILS.Matrix(((1,0,0,0),(0,cos(q),sin(q),0),(0,-sin(q),cos(q),0),(0,0,0,1)))
elif axisFlag == 'y':
- matrix = MATHUTILS.Matrix([cos(q),0,-sin(q),0],[0,1,0,0],[sin(q),0,cos(q),0],[0,0,0,1])
+ matrix = MATHUTILS.Matrix(((cos(q),0,-sin(q),0),(0,1,0,0),(sin(q),0,cos(q),0),(0,0,0,1)))
elif axisFlag == 'z':
- matrix = MATHUTILS.Matrix([cos(q),sin(q),0,0],[-sin(q),cos(q),0,0],[0,0,1,0],[0,0,0,1])
+ matrix = MATHUTILS.Matrix(((cos(q),sin(q),0,0),(-sin(q),cos(q),0,0),(0,0,1,0),(0,0,0,1)))
else:
print ("Simple_RotationMatrix can only do x y z axis")
return matrix
Modified: trunk/py/scripts/addons/io_export_anim_mesh_xna/export_xna.py
===================================================================
--- trunk/py/scripts/addons/io_export_anim_mesh_xna/export_xna.py 2011-01-09 09:16:15 UTC (rev 1376)
+++ trunk/py/scripts/addons/io_export_anim_mesh_xna/export_xna.py 2011-01-09 15:00:50 UTC (rev 1377)
@@ -213,7 +213,7 @@
# http://www.blender.org/documentation/249PythonDoc/Mathutils.Matrix-class.html
# There is probably a built in function to get the Identity matrix but I
# could not find it in the documentation quickly enough.
- GLOBAL_MATRIX = Matrix([1,0,0,0], [0,1,0,0], [0,0,1,0], [0,0,0,1])
+ GLOBAL_MATRIX = Matrix(((1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1)))
if bpy.ops.object.mode_set.poll():
bpy.ops.object.mode_set(mode='OBJECT')
Modified: trunk/py/scripts/addons/io_import_scene_dxf.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_dxf.py 2011-01-09 09:16:15 UTC (rev 1376)
+++ trunk/py/scripts/addons/io_import_scene_dxf.py 2011-01-09 15:00:50 UTC (rev 1377)
@@ -1410,7 +1410,7 @@
def transform(normal, rotation, obj): #--------------------------------------------
"""Use the calculated ocs to determine the objects location/orientation in space.
"""
- ma = Matrix([1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1])
+ ma = Matrix(((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)))
o = Vector(obj.location)
ma_new = getOCS(normal)
if ma_new:
@@ -1419,7 +1419,7 @@
if rotation != 0:
g = radians(-rotation)
- rmat = Matrix([cos(g), -sin(g), 0], [sin(g), cos(g), 0], [0, 0, 1])
+ rmat = Matrix(((cos(g), -sin(g), 0), (sin(g), cos(g), 0), (0, 0, 1)))
ma = ma * rmat.resize4x4()
obj.matrix_world = ma #must be matrix4x4
More information about the Bf-extensions-cvs
mailing list