[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2040] trunk/py/scripts/addons/ io_scene_x3d: fix [#27697] VRML Importing: Extra line segment added, orientation changed

Campbell Barton ideasman42 at gmail.com
Mon Jun 20 03:33:50 CEST 2011


Revision: 2040
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2040
Author:   campbellbarton
Date:     2011-06-20 01:33:47 +0000 (Mon, 20 Jun 2011)
Log Message:
-----------
fix [#27697] VRML Importing: Extra line segment added, orientation changed

Modified Paths:
--------------
    trunk/py/scripts/addons/io_scene_x3d/__init__.py
    trunk/py/scripts/addons/io_scene_x3d/import_x3d.py

Modified: trunk/py/scripts/addons/io_scene_x3d/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x3d/__init__.py	2011-06-19 19:53:01 UTC (rev 2039)
+++ trunk/py/scripts/addons/io_scene_x3d/__init__.py	2011-06-20 01:33:47 UTC (rev 2040)
@@ -73,7 +73,7 @@
                    ('-Y', "-Y Up", ""),
                    ('-Z', "-Z Up", ""),
                    ),
-            default='-Y',
+            default='Y',
             )
 
     def execute(self, context):
@@ -123,7 +123,7 @@
                    ('-Y', "-Y Up", ""),
                    ('-Z', "-Z Up", ""),
                    ),
-            default='-Y',
+            default='Y',
             )
 
     path_mode = path_reference_mode

Modified: trunk/py/scripts/addons/io_scene_x3d/import_x3d.py
===================================================================
--- trunk/py/scripts/addons/io_scene_x3d/import_x3d.py	2011-06-19 19:53:01 UTC (rev 2039)
+++ trunk/py/scripts/addons/io_scene_x3d/import_x3d.py	2011-06-20 01:33:47 UTC (rev 2040)
@@ -1551,7 +1551,7 @@
         mtx = mat * mtx
 
     # worldspace matrix
-    mtx = mtx * global_matrix
+    mtx = global_matrix * mtx
 
     return mtx
 
@@ -1883,8 +1883,7 @@
             continue
         co = points[line[0]]
         nu = bpycurve.splines.new('POLY')
-        nu.points.add(len(line))
-
+        nu.points.add(len(line) - 1)  # the new nu has 1 point to begin with
         for il, pt in zip(line, nu.points):
             pt.co[0:3] = points[il]
 
@@ -2334,7 +2333,7 @@
 
     mtx = Matrix.Translation(Vector(position)) * translateRotation(orientation)
 
-    bpyob = node.blendObject = bpy.data.objects.new("TODO", bpycam)
+    bpyob = node.blendObject = bpy.data.objects.new(name, bpycam)
     bpy.context.scene.objects.link(bpyob)
     bpyob.matrix_world = getFinalMatrix(node, mtx, ancestry, global_matrix)
 



More information about the Bf-extensions-cvs mailing list