diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-20 05:33:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-20 05:33:47 +0400 |
commit | 6ac61fedc9bc0ab96b1159682736052c4b62d087 (patch) | |
tree | 5fa6f397b314352aaf2f90a36492c082fcb0c087 /io_scene_x3d | |
parent | 670bf72cb6978ff2f26a23bf2b5bb83b6e631e10 (diff) |
fix [#27697] VRML Importing: Extra line segment added, orientation changed
Diffstat (limited to 'io_scene_x3d')
-rw-r--r-- | io_scene_x3d/__init__.py | 4 | ||||
-rw-r--r-- | io_scene_x3d/import_x3d.py | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py index 96f09900..c176d95c 100644 --- a/io_scene_x3d/__init__.py +++ b/io_scene_x3d/__init__.py @@ -73,7 +73,7 @@ class ImportX3D(bpy.types.Operator, ImportHelper): ('-Y', "-Y Up", ""), ('-Z', "-Z Up", ""), ), - default='-Y', + default='Y', ) def execute(self, context): @@ -123,7 +123,7 @@ class ExportX3D(bpy.types.Operator, ExportHelper): ('-Y', "-Y Up", ""), ('-Z', "-Z Up", ""), ), - default='-Y', + default='Y', ) path_mode = path_reference_mode diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py index c20afbac..28c0abac 100644 --- a/io_scene_x3d/import_x3d.py +++ b/io_scene_x3d/import_x3d.py @@ -1551,7 +1551,7 @@ def getFinalMatrix(node, mtx, ancestry, global_matrix): mtx = mat * mtx # worldspace matrix - mtx = mtx * global_matrix + mtx = global_matrix * mtx return mtx @@ -1883,8 +1883,7 @@ def importMesh_IndexedLineSet(geom, ancestry): 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 @@ def importViewpoint(node, ancestry, global_matrix): 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) |