diff --git a/add_mesh_BoltFactory/createMesh.py b/add_mesh_BoltFactory/createMesh.py index 87b5bc394656e30f34d4d462cb48ca5148dfa2a0..65b890899bc9b60988b67b65c6de495909782519 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 6331d13a711e6be3f62e5b8b0ce2dbaec52138c2..e3a4d336d46622c2e6c24480c6e270072ec121b5 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