[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2894] trunk/py/scripts/addons/ io_import_scene_dxf.py: -extensively tested for CIRCLE, ARC and TEXT entities
Remigiusz Fiedler
migius at gmx.net
Sat Jan 14 00:36:47 CET 2012
Revision: 2894
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2894
Author: migius
Date: 2012-01-13 23:36:41 +0000 (Fri, 13 Jan 2012)
Log Message:
-----------
-extensively tested for CIRCLE, ARC and TEXT entities
-reverted previous changes to matrix*vector order (sorry, didn't realize changes in rev.2180)
Modified Paths:
--------------
trunk/py/scripts/addons/io_import_scene_dxf.py
Modified: trunk/py/scripts/addons/io_import_scene_dxf.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_dxf.py 2012-01-13 20:54:42 UTC (rev 2893)
+++ trunk/py/scripts/addons/io_import_scene_dxf.py 2012-01-13 23:36:41 UTC (rev 2894)
@@ -55,7 +55,7 @@
Installation:
Place this file to Blender addons directory
(on Windows it is %Blender_directory%\2.53\scripts\addons\)
-The script must activated in "Addons" tab (user preferences).
+The script must be activated in "Addons" tab (user preferences).
Access it from File > Import menu.
History:
@@ -314,7 +314,7 @@
ma = getOCS(self.normal)
if ma:
#ma.invert()
- points = [v * ma for v in points]
+ points = [ma * v for v in points]
#print ('arc vn=', vn)
#print ('faces=', len(faces))
return ((points, edges, faces, vn))
@@ -523,7 +523,7 @@
ma = getOCS(self.normal)
if ma:
#ma.invert()
- points = [v * ma for v in points]
+ points = [ma * v for v in points]
#print ('cir vn=', vn)
#print ('faces=',len(faces))
return( (points, edges, faces, vn) )
@@ -629,7 +629,7 @@
ma = getOCS(self.normal)
if ma:
#ma.invert()
- points = [v * ma for v in points]
+ points = [ma * v for v in points]
return ((points, edges, faces, vn))
#
@@ -813,7 +813,7 @@
ma = getOCS(self.normal)
if ma:
#ma.invert()
- verts = [v * ma for v in verts]
+ verts = [ma * v for v in verts]
return (verts, edges, [], vn-1)
#
@@ -1021,7 +1021,7 @@
if self.normal!=Vector((0,0,1)):
ma = getOCS(self.normal)
if ma:
- verts = [v * ma for v in verts]
+ verts = [ma * v for v in verts]
return((verts, lines, [], vn-1))
#
@@ -1185,7 +1185,7 @@
if self.normal!=Vector((0,0,1)):
ma = getOCS(self.normal)
if ma:
- points = [v * ma for v in points]
+ points = [ma * v for v in points]
return((points, edges, faces, vn))
#
@@ -1318,7 +1318,7 @@
if self.normal!=Vector((0,0,1)):
ma = getOCS(self.normal)
if ma:
- points = [v * ma for v in points]
+ points = [ma * v for v in points]
return ((points, edges, faces, vn))
#
@@ -1423,19 +1423,19 @@
def transform(normal, rotation, obj): #--------------------------------------------
"""Use the calculated ocs to determine the objects location/orientation in space.
"""
- ma = Matrix().resize_4x4()
+ ma = Matrix()
o = Vector(obj.location)
ma_new = getOCS(normal)
if ma_new:
- ma = ma_new.resize_4x4()
- o = o * ma
+ ma_new.resize_4x4()
+ ma = ma_new
+ o = ma * o
if rotation != 0:
- g = radians(rotation)
- rmat = Matrix.Rotation(g, 3, 'Z')
- ma = ma * rmat.to_4x4()
+ rmat = Matrix.Rotation(radians(rotation), 4, 'Z')
+ ma = ma * rmat
- obj.matrix_world = ma #must be matrix4x4
+ obj.matrix_world = ma
obj.location = o
More information about the Bf-extensions-cvs
mailing list