diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py index 96f0990088af0a513f7f82c42c7f2b1afb530e0c..c176d95c225c3ae1bf931b89a133e6449938e728 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 c20afbac9e17ebe5e5b5da78dc89ea44b1c2f6fe..28c0abac5276b6a91c9bd014a39b9d1df7d4d71b 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)