[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34197] trunk/blender/release/scripts/op: update for change to Matrix class.
Campbell Barton
ideasman42 at gmail.com
Sun Jan 9 16:09:19 CET 2011
Revision: 34197
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34197
Author: campbellbarton
Date: 2011-01-09 15:09:18 +0000 (Sun, 09 Jan 2011)
Log Message:
-----------
update for change to Matrix class.
Modified Paths:
--------------
trunk/blender/release/scripts/op/io_scene_3ds/import_3ds.py
trunk/blender/release/scripts/op/io_shape_mdd/export_mdd.py
trunk/blender/release/scripts/op/uvcalc_smart_project.py
Modified: trunk/blender/release/scripts/op/io_scene_3ds/import_3ds.py
===================================================================
--- trunk/blender/release/scripts/op/io_scene_3ds/import_3ds.py 2011-01-09 15:07:14 UTC (rev 34196)
+++ trunk/blender/release/scripts/op/io_scene_3ds/import_3ds.py 2011-01-09 15:09:18 UTC (rev 34197)
@@ -612,11 +612,11 @@
data = list( struct.unpack('<ffffffffffff', temp_data) )
new_chunk.bytes_read += STRUCT_SIZE_4x3MAT
- contextMatrix_rot = mathutils.Matrix(\
- data[:3] + [0],\
- data[3:6] + [0],\
- data[6:9] + [0],\
- data[9:] + [1])
+ contextMatrix_rot = mathutils.Matrix((data[:3] + [0], \
+ data[3:6] + [0], \
+ data[6:9] + [0], \
+ data[9:] + [1], \
+ ))
elif (new_chunk.ID == MAT_MAP_FILEPATH):
texture_name, read_str_len = read_string(file)
Modified: trunk/blender/release/scripts/op/io_shape_mdd/export_mdd.py
===================================================================
--- trunk/blender/release/scripts/op/io_shape_mdd/export_mdd.py 2011-01-09 15:07:14 UTC (rev 34196)
+++ trunk/blender/release/scripts/op/io_shape_mdd/export_mdd.py 2011-01-09 15:09:18 UTC (rev 34197)
@@ -73,12 +73,11 @@
me = obj.create_mesh(scene, True, 'PREVIEW')
#Flip y and z
- mat_flip = mathutils.Matrix(\
- [1.0, 0.0, 0.0, 0.0],\
- [0.0, 0.0, 1.0, 0.0],\
- [0.0, 1.0, 0.0, 0.0],\
- [0.0, 0.0, 0.0, 1.0],\
- )
+ mat_flip = mathutils.Matrix(((1.0, 0.0, 0.0, 0.0), \
+ (0.0, 0.0, 1.0, 0.0), \
+ (0.0, 1.0, 0.0, 0.0), \
+ (0.0, 0.0, 0.0, 1.0), \
+ ))
numverts = len(me.vertices)
Modified: trunk/blender/release/scripts/op/uvcalc_smart_project.py
===================================================================
--- trunk/blender/release/scripts/op/uvcalc_smart_project.py 2011-01-09 15:07:14 UTC (rev 34196)
+++ trunk/blender/release/scripts/op/uvcalc_smart_project.py 2011-01-09 15:09:18 UTC (rev 34197)
@@ -78,12 +78,8 @@
nor = side1.cross(side2)
- l1 = [side1[0], side1[1], side1[2]]
- l2 = [side2[0], side2[1], side2[2]]
- l3 = [nor[0], nor[1], nor[2]]
+ mtx = Matrix((side1, side2, nor))
- mtx = Matrix(l1, l2, l3)
-
# Zero area 2d tri, even tho we throw away zerop area faces
# the projection UV can result in a zero area UV.
if not mtx.determinant():
More information about the Bf-blender-cvs
mailing list