Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--add_mesh_BoltFactory/createMesh.py6
-rw-r--r--io_import_scene_dxf.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/add_mesh_BoltFactory/createMesh.py b/add_mesh_BoltFactory/createMesh.py
index 87b5bc39..65b89089 100644
--- a/add_mesh_BoltFactory/createMesh.py
+++ b/add_mesh_BoltFactory/createMesh.py
@@ -142,11 +142,11 @@ def Simple_RotationMatrix(angle, matSize, axisFlag):
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
diff --git a/io_import_scene_dxf.py b/io_import_scene_dxf.py
index 6331d13a..e3a4d336 100644
--- a/io_import_scene_dxf.py
+++ b/io_import_scene_dxf.py
@@ -1410,7 +1410,7 @@ def getOCS(az): #--------------------------------------------------------------
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 @@ def transform(normal, rotation, obj): #----------------------------------------
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