瀏覽代碼

Most things now go through the Array() structure (transformation
matrices etc) so they can be rounded in the same place

Geoffrey Irons 7 年之前
父節點
當前提交
306dc60ce5

+ 0 - 77
io_scene_godot/encoders.py

@@ -1,77 +0,0 @@
-"""This file contains operations that take a blender or python concept and
-translate it into a string that godot will understand when it is parsed
-
-It also contains a dictionary called CONVERSIONS which encapsulates all the
-encoders by their types
-"""
-import mathutils
-
-
-def mat4_to_string(mtx):
-    """Converts a matrix to a "Transform" string that can be parsed by Godot"""
-    def fix_matrix(mtx):
-        """ Shuffles a matrix to change from y-up to z-up"""
-        # Todo: can this be replaced my a matrix multiplcation?
-        trans = mathutils.Matrix(mtx)
-        up_axis = 2
-
-        for i in range(3):
-            trans[1][i], trans[up_axis][i] = trans[up_axis][i], trans[1][i]
-        for i in range(3):
-            trans[i][1], trans[i][up_axis] = trans[i][up_axis], trans[i][1]
-
-        trans[1][3], trans[up_axis][3] = trans[up_axis][3], trans[1][3]
-
-        trans[up_axis][0] = -trans[up_axis][0]
-        trans[up_axis][1] = -trans[up_axis][1]
-        trans[0][up_axis] = -trans[0][up_axis]
-        trans[1][up_axis] = -trans[1][up_axis]
-        trans[up_axis][3] = -trans[up_axis][3]
-
-        return trans
-
-    mtx = fix_matrix(mtx)
-    out_str = ""
-    for row in range(3):
-        for col in range(3):
-            out_str += " {},".format(mtx[row][col])
-
-    # Export the basis
-    for axis in range(3):
-        out_str += " {},".format(mtx[axis][3])
-
-    out_str = out_str[:-1]  # Remove trailing comma
-
-    out_str = "Transform( {} )".format(out_str)
-    return out_str
-
-
-def color_to_string(rgba):
-    """Converts an RGB colors in range 0-1 into a fomat Godot can read. Accepts
-    iterables of 3 or 4 in length, but is designed for mathutils.Color"""
-    alpha = 1.0 if len(rgba) < 4 else rgba[3]
-    return "Color( {}, {}, {}, {} )".format(
-        rgba[0],
-        rgba[1],
-        rgba[2],
-        alpha,
-    )
-
-
-def vector_to_string(vec):
-    """Encode a mathutils.vector. actually, it accepts iterable of any length,
-    but 2, 3 are best...."""
-    elements = list(vec)
-    return "Vector{}({})".format(
-        len(elements),
-        ", ".join(str(e) for e in elements)
-    )
-
-
-# Finds the correct conversion function for a datatype
-CONVERSIONS = {
-    bool: lambda x: 'true' if x else 'false',
-    mathutils.Matrix: mat4_to_string,
-    mathutils.Color: color_to_string,
-    mathutils.Vector: vector_to_string,
-}

+ 91 - 9
io_scene_godot/structures.py

@@ -4,7 +4,7 @@ This file contains classes to help dealing with the actual writing to the file
 """
 import os
 import collections
-from .encoders import CONVERSIONS
+import mathutils
 
 
 class ESCNFile:
@@ -122,13 +122,7 @@ class FileEntry(collections.OrderedDict):
         out_str = ''
         for var in self:
             val = self[var]
-
-            converter = CONVERSIONS.get(type(val))
-            if converter is not None:
-                val = converter(val)
-
-            if hasattr(val, "to_string"):
-                val = val.to_string()
+            val = to_string(val)
 
             out_str += '\n{} = {}'.format(var, val)
         return out_str
@@ -269,7 +263,7 @@ class Array(list):
         """Convert the array to serialized form"""
         return "{}{}{}".format(
             self.prefix,
-            self.seperator.join([str(v) for v in self]),
+            self.seperator.join([to_string(v) for v in self]),
             self.suffix
         )
 
@@ -287,3 +281,91 @@ class NodePath:
             self.ref_path,
             self.attr_name
         )
+
+
+# ------------------ Implicit Conversions of Blender Types --------------------
+def mat4_to_string(mtx):
+    """Converts a matrix to a "Transform" string that can be parsed by Godot"""
+    def fix_matrix(mtx):
+        """ Shuffles a matrix to change from y-up to z-up"""
+        # Todo: can this be replaced my a matrix multiplcation?
+        trans = mathutils.Matrix(mtx)
+        up_axis = 2
+
+        for i in range(3):
+            trans[1][i], trans[up_axis][i] = trans[up_axis][i], trans[1][i]
+        for i in range(3):
+            trans[i][1], trans[i][up_axis] = trans[i][up_axis], trans[i][1]
+
+        trans[1][3], trans[up_axis][3] = trans[up_axis][3], trans[1][3]
+
+        trans[up_axis][0] = -trans[up_axis][0]
+        trans[up_axis][1] = -trans[up_axis][1]
+        trans[0][up_axis] = -trans[0][up_axis]
+        trans[1][up_axis] = -trans[1][up_axis]
+        trans[up_axis][3] = -trans[up_axis][3]
+
+        return trans
+
+    mtx = fix_matrix(mtx)
+    array = Array('Transform(')
+    for row in range(3):
+        for col in range(3):
+            array.append(mtx[row][col])
+
+    # Export the basis
+    for axis in range(3):
+        array.append(mtx[axis][3])
+
+    return array.to_string()
+
+
+def color_to_string(rgba):
+    """Converts an RGB colors in range 0-1 into a fomat Godot can read. Accepts
+    iterables of 3 or 4 in length, but is designed for mathutils.Color"""
+    alpha = 1.0 if len(rgba) < 4 else rgba[3]
+    col = list(rgba[0:3]) + [alpha]
+    return Array('Color(', values=[col]).to_string()
+
+
+def vector_to_string(vec):
+    """Encode a mathutils.vector. actually, it accepts iterable of any length,
+    but 2, 3 are best...."""
+    return Array('Vector{}('.format(len(vec)), values=[vec]).to_string()
+
+
+def float_to_string(num):
+    """Intelligently rounds float numbers"""
+    if abs(num) < 1e-15:
+        # This should make floating point errors round sanely. It does mean
+        # that if you have objects with large scaling factors and tiny meshes,
+        # then the object may "collapse" to zero.
+        # There are still some e-8's that appear in the file, but I think
+        # people would notice it collapsing.
+        return '0.0'
+    return '{:.6}'.format(num)
+
+
+def to_string(val):
+    """Attempts to convert any object into a string using the conversions
+    table, explicit conversion, or falling back to the str() method"""
+    if hasattr(val, "to_string"):
+        val = val.to_string()
+    else:
+        converter = CONVERSIONS.get(type(val))
+        if converter is not None:
+            val = converter(val)
+        else:
+            val = str(val)
+
+    return val
+
+
+# Finds the correct conversion function for a datatype
+CONVERSIONS = {
+    float: float_to_string,
+    bool: lambda x: 'true' if x else 'false',
+    mathutils.Matrix: mat4_to_string,
+    mathutils.Color: color_to_string,
+    mathutils.Vector: vector_to_string
+}

文件差異過大導致無法顯示
+ 0 - 0
tests/reference-exports/armature_with_mesh.escn


文件差異過大導致無法顯示
+ 0 - 0
tests/reference-exports/armature_with_physics.escn


文件差異過大導致無法顯示
+ 0 - 0
tests/reference-exports/armature_with_pose.escn


+ 8 - 8
tests/reference-exports/duplicate_name.escn

@@ -6,7 +6,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -25,7 +25,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -44,7 +44,7 @@ flags_unshaded = false
 flags_vertex_lighting = false
 flags_transparent = false
 vertex_color_use_as_albedo = false
-albedo_color = Color( 0.800000011920929, 0.800000011920929, 0.800000011920929, 1.0 )
+albedo_color = Color(0.8, 0.8, 0.8, 1.0)
 subsurf_scatter_enabled = false
 
 [sub_resource id=4 type="ArrayMesh"]
@@ -53,8 +53,8 @@ surfaces/0 = {
 	"material":SubResource(3),
 	"primitive":4,
 	"arrays":[
-		Vector3Array(1.0, -1.0, 1.0, -0.9999996423721313, -1.0, -1.0000003576278687, 1.0, -1.0, -0.9999999403953552, -0.9999999403953552, 1.0, -1.0, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0000004768371582, 1.0, -0.999999463558197, 1.0000004768371582, 1.0, -0.999999463558197, 1.0, -1.0, 1.0, 1.0, -1.0, -0.9999999403953552, 0.9999993443489075, 1.0, 1.0000005960464478, -1.0000001192092896, -1.0, 0.9999998211860657, 1.0, -1.0, 1.0, -1.0000001192092896, -1.0, 0.9999998211860657, -0.9999999403953552, 1.0, -1.0, -0.9999996423721313, -1.0, -1.0000003576278687, 1.0, -1.0, -0.9999999403953552, -0.9999999403953552, 1.0, -1.0, 1.0000004768371582, 1.0, -0.999999463558197, 1.0, -1.0, 1.0, -1.0000001192092896, -1.0, 0.9999998211860657, -0.9999996423721313, -1.0, -1.0000003576278687, -0.9999999403953552, 1.0, -1.0, -1.0000003576278687, 1.0, 0.9999996423721313, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0000004768371582, 1.0, -0.999999463558197, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0, -1.0, 1.0, 0.9999993443489075, 1.0, 1.0000005960464478, -1.0000003576278687, 1.0, 0.9999996423721313, -1.0000001192092896, -1.0, 0.9999998211860657, -1.0000001192092896, -1.0, 0.9999998211860657, -1.0000003576278687, 1.0, 0.9999996423721313, -0.9999999403953552, 1.0, -1.0, 1.0, -1.0, -0.9999999403953552, -0.9999996423721313, -1.0, -1.0000003576278687, -0.9999999403953552, 1.0, -1.0),
-		Vector3Array(2.980232949312267e-08, -1.0, -0.0, 2.980232949312267e-08, -1.0, -0.0, 2.980232949312267e-08, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 1.0, -2.384185791015625e-07, -0.0, 1.0, -2.384185791015625e-07, -0.0, 1.0, -2.384185791015625e-07, -0.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0),
+		Vector3Array(1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 0.999999, 1.0, 1.0, 1.0, 1.0, -0.999999, 1.0, 1.0, -0.999999, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 0.999999, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -0.999999, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 0.999999, 1.0, 1.0, 1.0, 1.0, -0.999999, 0.999999, 1.0, 1.0, 1.0, -1.0, 1.0, 0.999999, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0),
+		Vector3Array(2.98023e-08, -1.0, 0.0, 2.98023e-08, -1.0, 0.0, 2.98023e-08, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, -2.38419e-07, 0.0, 1.0, -2.38419e-07, 0.0, 1.0, -2.38419e-07, 0.0, -8.9407e-08, -4.76837e-07, 1.0, -8.9407e-08, -4.76837e-07, 1.0, -8.9407e-08, -4.76837e-07, 1.0, -1.0, -1.49012e-07, -2.38419e-07, -1.0, -1.49012e-07, -2.38419e-07, -1.0, -1.49012e-07, -2.38419e-07, 2.68221e-07, 2.38419e-07, -1.0, 2.68221e-07, 2.38419e-07, -1.0, 2.68221e-07, 2.38419e-07, -1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 5.96047e-08, 1.0, 0.0, 5.96047e-08, 1.0, 0.0, 5.96047e-08, 1.0, 0.0, 1.0, 3.27825e-07, 5.96046e-07, 1.0, 3.27825e-07, 5.96046e-07, 1.0, 3.27825e-07, 5.96046e-07, -4.76837e-07, 1.19209e-07, 1.0, -4.76837e-07, 1.19209e-07, 1.0, -4.76837e-07, 1.19209e-07, 1.0, -1.0, -1.19209e-07, -2.38419e-07, -1.0, -1.19209e-07, -2.38419e-07, -1.0, -1.19209e-07, -2.38419e-07, 2.08616e-07, 8.9407e-08, -1.0, 2.08616e-07, 8.9407e-08, -1.0, 2.08616e-07, 8.9407e-08, -1.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -73,16 +73,16 @@ surfaces/0 = {
 
 mesh = SubResource(1)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 1.5957765579223633, 2.8124284744262695, -6.1164021492004395 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.59578, 2.81243, -6.1164)
 
 [node name="Cube001" type="MeshInstance" parent="."]
 
 mesh = SubResource(2)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 1.1332447528839111, 0.30739641189575195, -2.944631576538086 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.13324, 0.307396, -2.94463)
 
 [node name="Cube002" type="MeshInstance" parent="."]
 
 mesh = SubResource(4)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)

+ 15 - 15
tests/reference-exports/just_armature.escn

@@ -6,34 +6,34 @@
 
 [node name="Armature" type="Skeleton" parent="."]
 
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 bones/0/name = "Bone"
 bones/0/parent = -1
-bones/0/rest = Transform(  1.0, 0.0, -0.0, 0.0, 0.0, -1.0, -0.0, 1.0, 0.0, 0.0, 0.0, -0.0 )
-bones/0/pose = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+bones/0/rest = Transform(1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0)
+bones/0/pose = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 bones/0/enabled = true
 bones/1/name = "Bone.001"
 bones/1/parent = 0
-bones/1/rest = Transform(  -1.0, 8.742277657347586e-08, -0.0, 0.0, 0.0, -1.0, -8.742277657347586e-08, -1.0, 0.0, 0.0, 0.0, -1.0 )
-bones/1/pose = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+bones/1/rest = Transform(-1.0, 8.74228e-08, 0.0, 0.0, 0.0, -1.0, -8.74228e-08, -1.0, 0.0, 0.0, 0.0, -1.0)
+bones/1/pose = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 bones/1/enabled = true
 bones/2/name = "Bone.002"
 bones/2/parent = 1
-bones/2/rest = Transform(  -1.0, -6.357302595461078e-08, -8.742277657347586e-08, 8.742277657347586e-08, -2.0850114102149812e-15, -1.0, 6.357302595461078e-08, -1.0, 0.0, 0.0, 0.0, -1.0 )
-bones/2/pose = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+bones/2/rest = Transform(-1.0, -6.3573e-08, -8.74228e-08, 8.74228e-08, -2.08501e-15, -1.0, 6.3573e-08, -1.0, 0.0, 0.0, 0.0, -1.0)
+bones/2/pose = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 bones/2/enabled = true
 bones/3/name = "Bone.003"
 bones/3/parent = 0
-bones/3/rest = Transform(  0.0, 0.0, -0.9999999403953552, 1.0, -4.371138828673793e-08, -0.0, -4.371138828673793e-08, -1.0, 0.0, 0.0, 0.0, -1.0 )
-bones/3/pose = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+bones/3/rest = Transform(0.0, 0.0, -1.0, 1.0, -4.37114e-08, 0.0, -4.37114e-08, -1.0, 0.0, 0.0, 0.0, -1.0)
+bones/3/pose = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 bones/3/enabled = true
 
 [node name="Lamp" type="OmniLight" parent="."]
 
-omni_range = 29.999982833862305
+omni_range = 30.0
 shadow_enabled = true
-light_color = Color( 1.0, 1.0, 1.0, 1.0 )
-transform = Transform(  -0.29086464643478394, -0.7711008191108704, 0.5663931369781494, -0.05518905818462372, 0.6045246720314026, 0.7946722507476807, -0.9551711678504944, 0.199883371591568, -0.21839118003845215, 4.076245307922363, 5.903861999511719, -1.0054539442062378 )
+light_color = Color(1.0, 1.0, 1.0, 1.0)
+transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -41,7 +41,7 @@ light_energy = 1.0
 [node name="Camera" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 49.13434207760448
-transform = Transform(  0.6859206557273865, -0.32401350140571594, 0.6515582203865051, 0.0, 0.8953956365585327, 0.44527143239974976, -0.7276763319969177, -0.3054208755493164, 0.6141703724861145, 7.481131553649902, 5.34366512298584, 6.5076398849487305 )
+fov = 49.1343
+transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.48113, 5.34367, 6.50764)

+ 12 - 12
tests/reference-exports/just_cameras.escn

@@ -9,37 +9,37 @@
 far = 10.0
 near = 5.0
 projection = 0
-fov = 90.00000250447816
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 5.0, 0.0, -0.0 )
+fov = 90.0
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 5.0, 0.0, 0.0)
 
 [node name="Camera003" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 1
 size = 6.0
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 1.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0)
 
 [node name="Camera002" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 1
 size = 2.0
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, -2.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, -2.0, 0.0, 0.0)
 
 [node name="Camera001" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 90.00000250447816
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, -5.0, 0.0, -0.0 )
+fov = 90.0
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, -5.0, 0.0, 0.0)
 
 [node name="Camera" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 19.99999941818584
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, -7.0, 0.0, -0.0 )
+fov = 20.0
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, -7.0, 0.0, 0.0)

文件差異過大導致無法顯示
+ 4 - 4
tests/reference-exports/just_mesh.escn


+ 17 - 17
tests/reference-exports/just_point_lights.escn

@@ -6,7 +6,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -25,7 +25,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -44,7 +44,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(1.0, 0.0, 1.0, -1.0, 0.0, -1.0, -1.0, 0.0, 1.0, 1.0, 0.0, -1.0),
-		Vector3Array(0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -63,8 +63,8 @@ surfaces/0 = {
 
 omni_range = 5.0
 shadow_enabled = true
-light_color = Color( 0.674415111541748, 0.0003378598776180297, 1.0, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, 0.0, 0.3999999761581421, 1.0 )
+light_color = Color(0.674415, 0.00033786, 1.0, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 0.0, 0.4, 1.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -73,20 +73,20 @@ light_energy = 1.0
 
 mesh = SubResource(1)
 visible = true
-transform = Transform(  0.30000001192092896, 0.0, -0.0, 0.0, 0.6000000238418579, -0.0, -0.0, -0.0, 0.30000001192092896, 0.0, 0.0, 0.35525739192962646 )
+transform = Transform(0.3, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0, 0.0, 0.3, 0.0, 0.0, 0.355257)
 
 [node name="Cube" type="MeshInstance" parent="."]
 
 mesh = SubResource(2)
 visible = true
-transform = Transform(  0.30000001192092896, 0.0, -0.0, 0.0, 0.6000000238418579, -0.0, -0.0, -0.0, 0.30000001192092896, -2.0, 0.0, 0.35525739192962646 )
+transform = Transform(0.3, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0, 0.0, 0.3, -2.0, 0.0, 0.355257)
 
 [node name="Lamp002" type="OmniLight" parent="."]
 
 omni_range = 5.0
 shadow_enabled = false
-light_color = Color( 0.0, 1.0, 0.0024246724788099527, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, -2.0, 0.3999999761581421, 1.0 )
+light_color = Color(0.0, 1.0, 0.00242467, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, -2.0, 0.4, 1.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -95,8 +95,8 @@ light_energy = 1.0
 
 omni_range = 2.0
 shadow_enabled = false
-light_color = Color( 1.0, 0.0, 0.0, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, -6.0, 1.0, 3.0 )
+light_color = Color(1.0, 0.0, 0.0, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, -6.0, 1.0, 3.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -105,14 +105,14 @@ light_energy = 1.0
 
 mesh = SubResource(3)
 visible = true
-transform = Transform(  10.0, 0.0, -0.0, 0.0, 10.0, -0.0, -0.0, -0.0, 10.0, 0.0, 0.0, -0.0 )
+transform = Transform(10.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0)
 
 [node name="Lamp" type="OmniLight" parent="."]
 
 omni_range = 2.0
 shadow_enabled = false
-light_color = Color( 1.0, 1.0, 1.0, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, -6.0, 1.0, -0.0 )
+light_color = Color(1.0, 1.0, 1.0, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, -6.0, 1.0, 0.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -120,7 +120,7 @@ light_energy = 1.0
 [node name="Camera" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 49.13434207760448
-transform = Transform(  0.6859206557273865, -0.32401350140571594, 0.6515582203865051, 0.0, 0.8953956365585327, 0.44527143239974976, -0.7276763319969177, -0.3054208755493164, 0.6141703724861145, 7.481131553649902, 5.34366512298584, 6.5076398849487305 )
+fov = 49.1343
+transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.48113, 5.34367, 6.50764)

+ 39 - 39
tests/reference-exports/just_spot_lights.escn

@@ -6,7 +6,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -25,7 +25,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -44,7 +44,7 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(1.0, 0.0, 1.0, -1.0, 0.0, -1.0, -1.0, 0.0, 1.0, 1.0, 0.0, -1.0),
-		Vector3Array(0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0),
+		Vector3Array(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -62,11 +62,11 @@ surfaces/0 = {
 [node name="Lamp007" type="SpotLight" parent="."]
 
 spot_range = 3.0
-spot_angle = 9.99999970909292
+spot_angle = 10.0
 spot_angle_attenuation = 20.0
 shadow_enabled = false
-light_color = Color( 0.0, 1.0, 0.7969905138015747, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, 1.0, 2.0, -3.0 )
+light_color = Color(0.0, 1.0, 0.796991, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 1.0, 2.0, -3.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 5.0
@@ -74,11 +74,11 @@ light_energy = 5.0
 [node name="Lamp006" type="SpotLight" parent="."]
 
 spot_range = 3.0
-spot_angle = 9.99999970909292
-spot_angle_attenuation = 0.19801980198019803
+spot_angle = 10.0
+spot_angle_attenuation = 0.19802
 shadow_enabled = false
-light_color = Color( 0.0, 1.0, 0.7969905138015747, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, 2.0, 2.0, -3.0 )
+light_color = Color(0.0, 1.0, 0.796991, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 2.0, 2.0, -3.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 5.0
@@ -86,11 +86,11 @@ light_energy = 5.0
 [node name="Lamp005" type="SpotLight" parent="."]
 
 spot_range = 3.0
-spot_angle = 9.99999970909292
-spot_angle_attenuation = 0.19801980198019803
+spot_angle = 10.0
+spot_angle_attenuation = 0.19802
 shadow_enabled = false
-light_color = Color( 0.0, 1.0, 0.7969905138015747, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, 2.0, 2.0, -2.0 )
+light_color = Color(0.0, 1.0, 0.796991, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 2.0, 2.0, -2.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -98,11 +98,11 @@ light_energy = 1.0
 [node name="Lamp002" type="SpotLight" parent="."]
 
 spot_range = 3.0
-spot_angle = 9.99999970909292
+spot_angle = 10.0
 spot_angle_attenuation = 20.0
 shadow_enabled = false
-light_color = Color( 0.0, 1.0, 0.7969905138015747, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, -4.371138828673793e-08, 1.0, -0.0, -1.0, -4.371138828673793e-08, 1.0, 2.0, -2.0 )
+light_color = Color(0.0, 1.0, 0.796991, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 1.0, 2.0, -2.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -110,11 +110,11 @@ light_energy = 1.0
 [node name="Lamp001" type="SpotLight" parent="."]
 
 spot_range = 3.0
-spot_angle = 60.000001669652114
-spot_angle_attenuation = 1.249999953433873
+spot_angle = 60.0
+spot_angle_attenuation = 1.25
 shadow_enabled = false
-light_color = Color( 0.0, 1.0, 0.7969905138015747, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 0.9063078165054321, 0.4226182699203491, -0.0, -0.4226182699203491, 0.9063078165054321, 1.0, 1.0, 2.0 )
+light_color = Color(0.0, 1.0, 0.796991, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, 0.906308, 0.422618, 0.0, -0.422618, 0.906308, 1.0, 1.0, 2.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -122,11 +122,11 @@ light_energy = 1.0
 [node name="Lamp000" type="SpotLight" parent="."]
 
 spot_range = 5.0
-spot_angle = 9.99999970909292
-spot_angle_attenuation = 1.249999953433873
+spot_angle = 10.0
+spot_angle_attenuation = 1.25
 shadow_enabled = false
-light_color = Color( 0.009934368543326855, 1.0, 0.0, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 0.9063078165054321, 0.4226182699203491, -0.0, -0.4226182699203491, 0.9063078165054321, -1.0, 1.0, 2.0 )
+light_color = Color(0.00993437, 1.0, 0.0, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, 0.906308, 0.422618, 0.0, -0.422618, 0.906308, -1.0, 1.0, 2.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -135,22 +135,22 @@ light_energy = 1.0
 
 mesh = SubResource(1)
 visible = true
-transform = Transform(  0.30000001192092896, 0.0, -0.0, 0.0, 0.6000000238418579, -0.0, -0.0, -0.0, 0.30000001192092896, -6.0, 0.0, 0.35525739192962646 )
+transform = Transform(0.3, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0, 0.0, 0.3, -6.0, 0.0, 0.355257)
 
 [node name="Cube" type="MeshInstance" parent="."]
 
 mesh = SubResource(2)
 visible = true
-transform = Transform(  0.30000001192092896, 0.0, -0.0, 0.0, 0.6000000238418579, -0.0, -0.0, -0.0, 0.30000001192092896, -4.0, 0.0, 0.35525739192962646 )
+transform = Transform(0.3, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0, 0.0, 0.3, -4.0, 0.0, 0.355257)
 
 [node name="Lamp004" type="SpotLight" parent="."]
 
 spot_range = 5.0
-spot_angle = 37.49999933598528
-spot_angle_attenuation = 1.249999953433873
+spot_angle = 37.5
+spot_angle_attenuation = 1.25
 shadow_enabled = true
-light_color = Color( 0.9903545379638672, 0.0, 1.0, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 0.9063078165054321, 0.4226182699203491, -0.0, -0.4226182699203491, 0.9063078165054321, -4.0, 1.0, 2.0 )
+light_color = Color(0.990355, 0.0, 1.0, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, 0.906308, 0.422618, 0.0, -0.422618, 0.906308, -4.0, 1.0, 2.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -158,11 +158,11 @@ light_energy = 1.0
 [node name="Lamp003" type="SpotLight" parent="."]
 
 spot_range = 5.0
-spot_angle = 37.49999933598528
-spot_angle_attenuation = 1.249999953433873
+spot_angle = 37.5
+spot_angle_attenuation = 1.25
 shadow_enabled = false
-light_color = Color( 0.0, 0.3401070833206177, 1.0, 1.0 )
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 0.9063078165054321, 0.4226182699203491, -0.0, -0.4226182699203491, 0.9063078165054321, -6.0, 1.0, 2.0 )
+light_color = Color(0.0, 0.340107, 1.0, 1.0)
+transform = Transform(1.0, 0.0, 0.0, 0.0, 0.906308, 0.422618, 0.0, -0.422618, 0.906308, -6.0, 1.0, 2.0)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -171,12 +171,12 @@ light_energy = 1.0
 
 mesh = SubResource(3)
 visible = true
-transform = Transform(  10.0, 0.0, -0.0, 0.0, 10.0, -0.0, -0.0, -0.0, 10.0, 0.0, 0.0, -0.0 )
+transform = Transform(10.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0)
 
 [node name="Camera" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 49.13434207760448
-transform = Transform(  0.6859206557273865, -0.32401350140571594, 0.6515582203865051, 0.0, 0.8953956365585327, 0.44527143239974976, -0.7276763319969177, -0.3054208755493164, 0.6141703724861145, 7.481131553649902, 5.34366512298584, 6.5076398849487305 )
+fov = 49.1343
+transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.48113, 5.34367, 6.50764)

+ 10 - 10
tests/reference-exports/material_search.escn

@@ -7,9 +7,9 @@ surfaces/0 = {
 	"material":ExtResource(1),
 	"primitive":4,
 	"arrays":[
-		Vector3Array(1.0, -1.0, 1.0, -0.9999996423721313, -1.0, -1.0000003576278687, 1.0, -1.0, -0.9999999403953552, -0.9999999403953552, 1.0, -1.0, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0000004768371582, 1.0, -0.999999463558197, 1.0000004768371582, 1.0, -0.999999463558197, 1.0, -1.0, 1.0, 1.0, -1.0, -0.9999999403953552, 0.9999993443489075, 1.0, 1.0000005960464478, -1.0000001192092896, -1.0, 0.9999998211860657, 1.0, -1.0, 1.0, -1.0000001192092896, -1.0, 0.9999998211860657, -0.9999999403953552, 1.0, -1.0, -0.9999996423721313, -1.0, -1.0000003576278687, 1.0, -1.0, -0.9999999403953552, -0.9999999403953552, 1.0, -1.0, 1.0000004768371582, 1.0, -0.999999463558197, 1.0, -1.0, 1.0, -1.0000001192092896, -1.0, 0.9999998211860657, -0.9999996423721313, -1.0, -1.0000003576278687, -0.9999999403953552, 1.0, -1.0, -1.0000003576278687, 1.0, 0.9999996423721313, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0000004768371582, 1.0, -0.999999463558197, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0, -1.0, 1.0, 0.9999993443489075, 1.0, 1.0000005960464478, -1.0000003576278687, 1.0, 0.9999996423721313, -1.0000001192092896, -1.0, 0.9999998211860657, -1.0000001192092896, -1.0, 0.9999998211860657, -1.0000003576278687, 1.0, 0.9999996423721313, -0.9999999403953552, 1.0, -1.0, 1.0, -1.0, -0.9999999403953552, -0.9999996423721313, -1.0, -1.0000003576278687, -0.9999999403953552, 1.0, -1.0),
-		Vector3Array(2.980232949312267e-08, -1.0, -0.0, 2.980232949312267e-08, -1.0, -0.0, 2.980232949312267e-08, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 1.0, -2.384185791015625e-07, -0.0, 1.0, -2.384185791015625e-07, -0.0, 1.0, -2.384185791015625e-07, -0.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0),
-		FloatArray(0.0, 0.0, 0.9999999403953552, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.9999999403953552, 1.0, -1.0, 0.0, -2.6822084464583895e-07, 1.0, -1.0, 0.0, -2.6822084464583895e-07, 1.0, -1.0, 0.0, -2.6822084464583895e-07, 1.0, 2.384185791015625e-07, 1.0, 2.384185791015625e-07, 1.0, 2.384185791015625e-07, 1.0, 2.384185791015625e-07, 1.0, 2.384185791015625e-07, 1.0, 2.384185791015625e-07, 1.0, -3.2782557468635787e-07, 1.0, 4.7683712978141557e-07, 1.0, -3.2782557468635787e-07, 1.0, 4.7683712978141557e-07, 1.0, -3.2782557468635787e-07, 1.0, 4.7683712978141557e-07, 1.0, -1.4901162614933128e-07, 1.0, 2.384185791015625e-07, 1.0, -1.4901162614933128e-07, 0.9999999403953552, 2.3841856489070778e-07, 1.0, -1.4901162614933128e-07, 1.0, 2.384185791015625e-07, 1.0, -2.384185791015625e-07, -1.0, -2.384185791015625e-07, 1.0, -2.384185791015625e-07, -1.0, -2.384185791015625e-07, 1.0, -2.384185791015625e-07, -1.0, -2.384185791015625e-07, 1.0, -1.7881389169360773e-07, 0.0, 0.9999999403953552, 1.0, -1.7881390590446244e-07, 0.0, 1.0, 1.0, -1.7881390590446244e-07, 0.0, 1.0, 1.0, -1.0, 5.960467319710006e-08, -4.1723259869286267e-07, 1.0, -1.0, 5.960467319710006e-08, -4.1723259869286267e-07, 1.0, -0.9999999403953552, 5.96046660916727e-08, -4.1723257027115324e-07, 1.0, -3.2782554626464844e-07, 1.0, 2.384185791015625e-07, 1.0, -3.2782554626464844e-07, 1.0, 2.384185791015625e-07, 1.0, -3.2782554626464844e-07, 1.0, 2.384185791015625e-07, 1.0, -1.1920927533992653e-07, 1.0, -1.192093321833454e-07, 1.0, -1.1920927533992653e-07, 1.0, -1.192093321833454e-07, 1.0, -1.1920926823449918e-07, 1.0, -1.192093321833454e-07, 1.0, -1.1920928955078125e-07, 1.0, -8.94069742685133e-08, 1.0, -1.1920928955078125e-07, 1.0, -8.940696716308594e-08, 1.0, -1.1920928955078125e-07, 1.0, -8.940696716308594e-08, 1.0, 1.7881390590446244e-07, -1.0, -8.94069742685133e-08, 1.0, 1.7881390590446244e-07, -0.9999999403953552, -8.94069742685133e-08, 1.0, 1.7881392011531716e-07, -1.0, -8.940698137394065e-08, 1.0),
+		Vector3Array(1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 0.999999, 1.0, 1.0, 1.0, 1.0, -0.999999, 1.0, 1.0, -0.999999, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 0.999999, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -0.999999, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 0.999999, 1.0, 1.0, 1.0, 1.0, -0.999999, 0.999999, 1.0, 1.0, 1.0, -1.0, 1.0, 0.999999, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0),
+		Vector3Array(2.98023e-08, -1.0, 0.0, 2.98023e-08, -1.0, 0.0, 2.98023e-08, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, -2.38419e-07, 0.0, 1.0, -2.38419e-07, 0.0, 1.0, -2.38419e-07, 0.0, -8.9407e-08, -4.76837e-07, 1.0, -8.9407e-08, -4.76837e-07, 1.0, -8.9407e-08, -4.76837e-07, 1.0, -1.0, -1.49012e-07, -2.38419e-07, -1.0, -1.49012e-07, -2.38419e-07, -1.0, -1.49012e-07, -2.38419e-07, 2.68221e-07, 2.38419e-07, -1.0, 2.68221e-07, 2.38419e-07, -1.0, 2.68221e-07, 2.38419e-07, -1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 5.96047e-08, 1.0, 0.0, 5.96047e-08, 1.0, 0.0, 5.96047e-08, 1.0, 0.0, 1.0, 3.27825e-07, 5.96046e-07, 1.0, 3.27825e-07, 5.96046e-07, 1.0, 3.27825e-07, 5.96046e-07, -4.76837e-07, 1.19209e-07, 1.0, -4.76837e-07, 1.19209e-07, 1.0, -4.76837e-07, 1.19209e-07, 1.0, -1.0, -1.19209e-07, -2.38419e-07, -1.0, -1.19209e-07, -2.38419e-07, -1.0, -1.19209e-07, -2.38419e-07, 2.08616e-07, 8.9407e-08, -1.0, 2.08616e-07, 8.9407e-08, -1.0, 2.08616e-07, 8.9407e-08, -1.0),
+		FloatArray(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, -1.0, 0.0, -2.68221e-07, 1.0, -1.0, 0.0, -2.68221e-07, 1.0, -1.0, 0.0, -2.68221e-07, 1.0, 2.38419e-07, 1.0, 2.38419e-07, 1.0, 2.38419e-07, 1.0, 2.38419e-07, 1.0, 2.38419e-07, 1.0, 2.38419e-07, 1.0, -3.27826e-07, 1.0, 4.76837e-07, 1.0, -3.27826e-07, 1.0, 4.76837e-07, 1.0, -3.27826e-07, 1.0, 4.76837e-07, 1.0, -1.49012e-07, 1.0, 2.38419e-07, 1.0, -1.49012e-07, 1.0, 2.38419e-07, 1.0, -1.49012e-07, 1.0, 2.38419e-07, 1.0, -2.38419e-07, -1.0, -2.38419e-07, 1.0, -2.38419e-07, -1.0, -2.38419e-07, 1.0, -2.38419e-07, -1.0, -2.38419e-07, 1.0, -1.78814e-07, 0.0, 1.0, 1.0, -1.78814e-07, 0.0, 1.0, 1.0, -1.78814e-07, 0.0, 1.0, 1.0, -1.0, 5.96047e-08, -4.17233e-07, 1.0, -1.0, 5.96047e-08, -4.17233e-07, 1.0, -1.0, 5.96047e-08, -4.17233e-07, 1.0, -3.27826e-07, 1.0, 2.38419e-07, 1.0, -3.27826e-07, 1.0, 2.38419e-07, 1.0, -3.27826e-07, 1.0, 2.38419e-07, 1.0, -1.19209e-07, 1.0, -1.19209e-07, 1.0, -1.19209e-07, 1.0, -1.19209e-07, 1.0, -1.19209e-07, 1.0, -1.19209e-07, 1.0, -1.19209e-07, 1.0, -8.9407e-08, 1.0, -1.19209e-07, 1.0, -8.9407e-08, 1.0, -1.19209e-07, 1.0, -8.9407e-08, 1.0, 1.78814e-07, -1.0, -8.9407e-08, 1.0, 1.78814e-07, -1.0, -8.9407e-08, 1.0, 1.78814e-07, -1.0, -8.9407e-08, 1.0),
 		null, ; no Vertex Colors,
 		Vector2Array(1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0),
 		null, ; No UV2,
@@ -27,14 +27,14 @@ surfaces/0 = {
 
 mesh = SubResource(1)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 
 [node name="Lamp" type="OmniLight" parent="."]
 
-omni_range = 29.999982833862305
+omni_range = 30.0
 shadow_enabled = true
-light_color = Color( 1.0, 1.0, 1.0, 1.0 )
-transform = Transform(  -0.29086464643478394, -0.7711008191108704, 0.5663931369781494, -0.05518905818462372, 0.6045246720314026, 0.7946722507476807, -0.9551711678504944, 0.199883371591568, -0.21839118003845215, 4.076245307922363, 5.903861999511719, -1.0054539442062378 )
+light_color = Color(1.0, 1.0, 1.0, 1.0)
+transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -42,7 +42,7 @@ light_energy = 1.0
 [node name="Camera" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 49.13434207760448
-transform = Transform(  0.6859206557273865, -0.32401350140571594, 0.6515582203865051, 0.0, 0.8953956365585327, 0.44527143239974976, -0.7276763319969177, -0.3054208755493164, 0.6141703724861145, 7.481131553649902, 5.34366512298584, 6.5076398849487305 )
+fov = 49.1343
+transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.48113, 5.34367, 6.50764)

文件差異過大導致無法顯示
+ 0 - 0
tests/reference-exports/parented_meshes.escn


文件差異過大導致無法顯示
+ 0 - 0
tests/reference-exports/physics.escn


+ 13 - 13
tests/reference-exports/simple_materials.escn

@@ -6,7 +6,7 @@ flags_unshaded = false
 flags_vertex_lighting = false
 flags_transparent = false
 vertex_color_use_as_albedo = false
-albedo_color = Color( 0.013005342334508896, 0.8000000715255737, 0.0, 1.0 )
+albedo_color = Color(0.0130053, 0.8, 0.0, 1.0)
 subsurf_scatter_enabled = false
 
 [sub_resource id=2 type="SpatialMaterial"]
@@ -15,7 +15,7 @@ flags_unshaded = false
 flags_vertex_lighting = false
 flags_transparent = false
 vertex_color_use_as_albedo = false
-albedo_color = Color( 0.800000011920929, 0.800000011920929, 0.800000011920929, 1.0 )
+albedo_color = Color(0.8, 0.8, 0.8, 1.0)
 subsurf_scatter_enabled = false
 
 [sub_resource id=3 type="ArrayMesh"]
@@ -24,8 +24,8 @@ surfaces/0 = {
 	"material":SubResource(1),
 	"primitive":4,
 	"arrays":[
-		Vector3Array(1.0, -1.0, 1.0, -0.9999996423721313, -1.0, -1.0000003576278687, 1.0, -1.0, -0.9999999403953552, -0.9999999403953552, 1.0, -1.0, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0000004768371582, 1.0, -0.999999463558197, 0.9999993443489075, 1.0, 1.0000005960464478, -1.0000001192092896, -1.0, 0.9999998211860657, 1.0, -1.0, 1.0, -1.0000001192092896, -1.0, 0.9999998211860657, -0.9999999403953552, 1.0, -1.0, -0.9999996423721313, -1.0, -1.0000003576278687, 1.0, -1.0, -0.9999999403953552, -0.9999999403953552, 1.0, -1.0, 1.0000004768371582, 1.0, -0.999999463558197, 1.0, -1.0, 1.0, -1.0000001192092896, -1.0, 0.9999998211860657, -0.9999996423721313, -1.0, -1.0000003576278687, -0.9999999403953552, 1.0, -1.0, -1.0000003576278687, 1.0, 0.9999996423721313, 0.9999993443489075, 1.0, 1.0000005960464478, 0.9999993443489075, 1.0, 1.0000005960464478, -1.0000003576278687, 1.0, 0.9999996423721313, -1.0000001192092896, -1.0, 0.9999998211860657, -1.0000001192092896, -1.0, 0.9999998211860657, -1.0000003576278687, 1.0, 0.9999996423721313, -0.9999999403953552, 1.0, -1.0, 1.0, -1.0, -0.9999999403953552, -0.9999996423721313, -1.0, -1.0000003576278687, -0.9999999403953552, 1.0, -1.0),
-		Vector3Array(2.980232949312267e-08, -1.0, -0.0, 2.980232949312267e-08, -1.0, -0.0, 2.980232949312267e-08, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -8.940696716308594e-08, -4.76837158203125e-07, 1.0, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, -1.0, -1.4901156930591242e-07, -2.3841855067985307e-07, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 2.6822084464583895e-07, 2.3841852225814364e-07, -1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, 5.96046660916727e-08, 1.0, -0.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -4.768372150465439e-07, 1.1920927533992653e-07, 1.0, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, -1.0, -1.1920931797249068e-07, -2.3841863594498136e-07, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0, 2.0861631355728605e-07, 8.940701690107744e-08, -1.0),
+		Vector3Array(1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 0.999999, 1.0, 1.0, 1.0, 1.0, -0.999999, 0.999999, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -0.999999, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 0.999999, 1.0, 1.0, 0.999999, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0),
+		Vector3Array(2.98023e-08, -1.0, 0.0, 2.98023e-08, -1.0, 0.0, 2.98023e-08, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -8.9407e-08, -4.76837e-07, 1.0, -8.9407e-08, -4.76837e-07, 1.0, -8.9407e-08, -4.76837e-07, 1.0, -1.0, -1.49012e-07, -2.38419e-07, -1.0, -1.49012e-07, -2.38419e-07, -1.0, -1.49012e-07, -2.38419e-07, 2.68221e-07, 2.38419e-07, -1.0, 2.68221e-07, 2.38419e-07, -1.0, 2.68221e-07, 2.38419e-07, -1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 5.96047e-08, 1.0, 0.0, 5.96047e-08, 1.0, 0.0, 5.96047e-08, 1.0, 0.0, -4.76837e-07, 1.19209e-07, 1.0, -4.76837e-07, 1.19209e-07, 1.0, -4.76837e-07, 1.19209e-07, 1.0, -1.0, -1.19209e-07, -2.38419e-07, -1.0, -1.19209e-07, -2.38419e-07, -1.0, -1.19209e-07, -2.38419e-07, 2.08616e-07, 8.9407e-08, -1.0, 2.08616e-07, 8.9407e-08, -1.0, 2.08616e-07, 8.9407e-08, -1.0),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -41,8 +41,8 @@ surfaces/1 = {
 	"material":SubResource(2),
 	"primitive":4,
 	"arrays":[
-		Vector3Array(1.0000004768371582, 1.0, -0.999999463558197, 1.0, -1.0, 1.0, 1.0, -1.0, -0.9999999403953552, 1.0000004768371582, 1.0, -0.999999463558197, 0.9999993443489075, 1.0, 1.0000005960464478, 1.0, -1.0, 1.0),
-		Vector3Array(1.0, -2.384185791015625e-07, -0.0, 1.0, -2.384185791015625e-07, -0.0, 1.0, -2.384185791015625e-07, -0.0, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07, 1.0, 3.2782537573439186e-07, 5.960464477539062e-07),
+		Vector3Array(1.0, 1.0, -0.999999, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -0.999999, 0.999999, 1.0, 1.0, 1.0, -1.0, 1.0),
+		Vector3Array(1.0, -2.38419e-07, 0.0, 1.0, -2.38419e-07, 0.0, 1.0, -2.38419e-07, 0.0, 1.0, 3.27825e-07, 5.96046e-07, 1.0, 3.27825e-07, 5.96046e-07, 1.0, 3.27825e-07, 5.96046e-07),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
@@ -61,14 +61,14 @@ surfaces/1 = {
 
 mesh = SubResource(3)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
 
 [node name="Lamp" type="OmniLight" parent="."]
 
-omni_range = 29.999982833862305
+omni_range = 30.0
 shadow_enabled = true
-light_color = Color( 1.0, 1.0, 1.0, 1.0 )
-transform = Transform(  -0.29086464643478394, -0.7711008191108704, 0.5663931369781494, -0.05518905818462372, 0.6045246720314026, 0.7946722507476807, -0.9551711678504944, 0.199883371591568, -0.21839118003845215, 4.076245307922363, 5.903861999511719, -1.0054539442062378 )
+light_color = Color(1.0, 1.0, 1.0, 1.0)
+transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
 light_negative = false
 light_specular = 1.0
 light_energy = 1.0
@@ -76,7 +76,7 @@ light_energy = 1.0
 [node name="Camera" type="Camera" parent="."]
 
 far = 100.0
-near = 0.10000000149011612
+near = 0.1
 projection = 0
-fov = 49.13434207760448
-transform = Transform(  0.6859206557273865, -0.32401350140571594, 0.6515582203865051, 0.0, 0.8953956365585327, 0.44527143239974976, -0.7276763319969177, -0.3054208755493164, 0.6141703724861145, 7.481131553649902, 5.34366512298584, 6.5076398849487305 )
+fov = 49.1343
+transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.48113, 5.34367, 6.50764)

+ 5 - 5
tests/reference-exports/tangent_test.escn

@@ -5,11 +5,11 @@
 surfaces/0 = {
 	"primitive":4,
 	"arrays":[
-		Vector3Array(1.0, 0.8924096822738647, -1.75, -1.0, 1.0, -2.0, -1.0, 0.8924096822738647, -1.75, -1.0, 0.8924096822738647, 1.75, 1.0, 1.0, 2.0, 1.0, 0.8924096822738647, 1.75, -1.0, 0.0, -0.0, 1.0, 0.14240968227386475, 0.25, 1.0, 0.0, -0.0, -1.0, 0.14240968227386475, 0.25, 1.0, 0.37984538078308105, 0.5, -1.0, 0.37984538078308105, 0.5, 1.0, 0.7216095328330994, 0.75, -1.0, 0.7216095328330994, 0.75, 1.0, 1.167702078819275, 1.0, -1.0, 1.167702078819275, 1.0, 1.0, 0.9716095328330994, 1.25, 1.0, 1.167702078819275, 1.0, -1.0, 0.9716095328330994, 1.25, 1.0, 0.879845380783081, 1.5, -1.0, 0.879845380783081, 1.5, 1.0, 0.0, -0.0, -1.0, 0.14240968227386475, -0.25, -1.0, 0.0, -0.0, 1.0, 0.14240968227386475, -0.25, -1.0, 0.37984538078308105, -0.5, 1.0, 0.37984538078308105, -0.5, -1.0, 0.7216095328330994, -0.75, 1.0, 0.7216095328330994, -0.75, -1.0, 1.167702078819275, -1.0, 1.0, 1.167702078819275, -1.0, -1.0, 0.9716095328330994, -1.25, -1.0, 1.167702078819275, -1.0, 1.0, 0.9716095328330994, -1.25, -1.0, 0.879845380783081, -1.5, 1.0, 0.879845380783081, -1.5, 1.0, 1.0, -2.0, -1.0, 1.0, 2.0, -1.0, 1.167702078819275, 1.0, 1.0, 1.167702078819275, -1.0),
-		Vector3Array(0.0, 0.9740505218505859, 0.2263306975364685, 0.0, 0.9185487627983093, 0.39530783891677856, 0.0, 0.9740505218505859, 0.22633066773414612, 0.0, 0.9740505218505859, -0.2263306975364685, 0.0, 0.9185487627983093, -0.39530783891677856, 0.0, 0.9740505218505859, -0.22633066773414612, 0.0, 0.8689122796058655, -0.4949660897254944, 0.0, 0.8028644919395447, -0.5961616039276123, 0.0, 0.8689122796058655, -0.4949660897254944, 0.0, 0.8028644323348999, -0.5961614847183228, 0.0, 0.6604078412055969, -0.7509071826934814, 0.0, 0.6604078412055969, -0.7509071230888367, 0.0, 0.5406267642974854, -0.8412624597549438, 0.0, 0.5406267642974854, -0.8412624597549438, 0.0, 0.48888346552848816, -0.8723491430282593, 0.0, 0.7868317365646362, 0.6171674132347107, 0.0, 0.8734937906265259, 0.4868352711200714, 0.0, 0.7868318557739258, 0.6171674728393555, 0.0, 0.8734937906265259, 0.48683539032936096, 0.0, 0.9886532425880432, 0.1502160131931305, 0.0, 0.9886532425880432, 0.1502160280942917, 0.0, 0.8689122796058655, 0.4949660897254944, 0.0, 0.8028644919395447, 0.5961616039276123, 0.0, 0.8689122796058655, 0.4949660897254944, 0.0, 0.8028644323348999, 0.5961614847183228, 0.0, 0.6604078412055969, 0.7509071826934814, 0.0, 0.6604078412055969, 0.7509071230888367, 0.0, 0.5406267642974854, 0.8412624597549438, 0.0, 0.5406267642974854, 0.8412624597549438, 0.0, 0.48888346552848816, 0.8723491430282593, 0.0, 0.7868317365646362, -0.6171674132347107, 0.0, 0.8734937906265259, -0.4868352711200714, 0.0, 0.7868318557739258, -0.6171674728393555, 0.0, 0.8734937906265259, -0.48683539032936096, 0.0, 0.9886532425880432, -0.1502160131931305, 0.0, 0.9886532425880432, -0.1502160280942917, 0.0, 0.9185487627983093, 0.3953078091144562, 0.0, 0.9185487627983093, -0.3953078091144562, 0.0, 0.48888349533081055, -0.8723491430282593, 0.0, 0.48888349533081055, 0.8723491430282593),
-		FloatArray(1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 0.9999999403953552, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 0.9999999403953552, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0),
+		Vector3Array(1.0, 0.89241, -1.75, -1.0, 1.0, -2.0, -1.0, 0.89241, -1.75, -1.0, 0.89241, 1.75, 1.0, 1.0, 2.0, 1.0, 0.89241, 1.75, -1.0, 0.0, 0.0, 1.0, 0.14241, 0.25, 1.0, 0.0, 0.0, -1.0, 0.14241, 0.25, 1.0, 0.379845, 0.5, -1.0, 0.379845, 0.5, 1.0, 0.72161, 0.75, -1.0, 0.72161, 0.75, 1.0, 1.1677, 1.0, -1.0, 1.1677, 1.0, 1.0, 0.97161, 1.25, 1.0, 1.1677, 1.0, -1.0, 0.97161, 1.25, 1.0, 0.879845, 1.5, -1.0, 0.879845, 1.5, 1.0, 0.0, 0.0, -1.0, 0.14241, -0.25, -1.0, 0.0, 0.0, 1.0, 0.14241, -0.25, -1.0, 0.379845, -0.5, 1.0, 0.379845, -0.5, -1.0, 0.72161, -0.75, 1.0, 0.72161, -0.75, -1.0, 1.1677, -1.0, 1.0, 1.1677, -1.0, -1.0, 0.97161, -1.25, -1.0, 1.1677, -1.0, 1.0, 0.97161, -1.25, -1.0, 0.879845, -1.5, 1.0, 0.879845, -1.5, 1.0, 1.0, -2.0, -1.0, 1.0, 2.0, -1.0, 1.1677, 1.0, 1.0, 1.1677, -1.0),
+		Vector3Array(0.0, 0.974051, 0.226331, 0.0, 0.918549, 0.395308, 0.0, 0.974051, 0.226331, 0.0, 0.974051, -0.226331, 0.0, 0.918549, -0.395308, 0.0, 0.974051, -0.226331, 0.0, 0.868912, -0.494966, 0.0, 0.802864, -0.596162, 0.0, 0.868912, -0.494966, 0.0, 0.802864, -0.596161, 0.0, 0.660408, -0.750907, 0.0, 0.660408, -0.750907, 0.0, 0.540627, -0.841262, 0.0, 0.540627, -0.841262, 0.0, 0.488883, -0.872349, 0.0, 0.786832, 0.617167, 0.0, 0.873494, 0.486835, 0.0, 0.786832, 0.617167, 0.0, 0.873494, 0.486835, 0.0, 0.988653, 0.150216, 0.0, 0.988653, 0.150216, 0.0, 0.868912, 0.494966, 0.0, 0.802864, 0.596162, 0.0, 0.868912, 0.494966, 0.0, 0.802864, 0.596161, 0.0, 0.660408, 0.750907, 0.0, 0.660408, 0.750907, 0.0, 0.540627, 0.841262, 0.0, 0.540627, 0.841262, 0.0, 0.488883, 0.872349, 0.0, 0.786832, -0.617167, 0.0, 0.873494, -0.486835, 0.0, 0.786832, -0.617167, 0.0, 0.873494, -0.486835, 0.0, 0.988653, -0.150216, 0.0, 0.988653, -0.150216, 0.0, 0.918549, 0.395308, 0.0, 0.918549, -0.395308, 0.0, 0.488883, -0.872349, 0.0, 0.488883, 0.872349),
+		FloatArray(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0),
 		null, ; no Vertex Colors,
-		Vector2Array(1.0, 0.12500011920928955, 0.0, 0.0, 0.0, 0.12500011920928955, 0.0, 0.8750001788139343, 1.0, 1.0, 1.0, 0.8750001788139343, 0.0, 0.0, 1.0, 0.12500011920928955, 1.0, 0.0, 0.0, 0.12500011920928955, 1.0, 0.25000011920928955, 0.0, 0.25000011920928955, 1.0, 0.3749999403953552, 0.0, 0.3749999403953552, 1.0, 0.5000000596046448, 0.0, 0.5000000596046448, 1.0, 0.6250000596046448, 1.0, 0.5000000596046448, 0.0, 0.6250000596046448, 1.0, 0.7500000298023224, 0.0, 0.7500000298023224, 1.0, 1.0, 0.0, 0.8749998807907104, 0.0, 1.0, 1.0, 0.8749998807907104, 0.0, 0.750000074505806, 1.0, 0.750000074505806, 0.0, 0.6249999701976776, 1.0, 0.6249999701976776, 0.0, 0.4999998211860657, 1.0, 0.4999998211860657, 0.0, 0.3750000596046448, 0.0, 0.4999998211860657, 1.0, 0.3750000596046448, 0.0, 0.2500002384185791, 1.0, 0.2500002384185791, 1.0, 0.0, 0.0, 1.0, 0.0, 0.5000000596046448, 1.0, 0.4999998211860657),
+		Vector2Array(1.0, 0.125, 0.0, 0.0, 0.0, 0.125, 0.0, 0.875, 1.0, 1.0, 1.0, 0.875, 0.0, 0.0, 1.0, 0.125, 1.0, 0.0, 0.0, 0.125, 1.0, 0.25, 0.0, 0.25, 1.0, 0.375, 0.0, 0.375, 1.0, 0.5, 0.0, 0.5, 1.0, 0.625, 1.0, 0.5, 0.0, 0.625, 1.0, 0.75, 0.0, 0.75, 1.0, 1.0, 0.0, 0.875, 0.0, 1.0, 1.0, 0.875, 0.0, 0.75, 1.0, 0.75, 0.0, 0.625, 1.0, 0.625, 0.0, 0.5, 1.0, 0.5, 0.0, 0.375, 0.0, 0.5, 1.0, 0.375, 0.0, 0.25, 1.0, 0.25, 1.0, 0.0, 0.0, 1.0, 0.0, 0.5, 1.0, 0.5),
 		null, ; No UV2,
 		null, ; No Bones,
 		null, ; No Weights,
@@ -25,4 +25,4 @@ surfaces/0 = {
 
 mesh = SubResource(1)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)

+ 18 - 18
tests/reference-exports/uv_testing.escn

@@ -6,11 +6,11 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
-		FloatArray(0.0, -1.0, 4.4703494239684005e-08, 1.0, 0.0, -1.0, 4.4703494239684005e-08, 1.0, 0.0, -1.0, -0.0, 1.0, -1.788139627478813e-07, -1.0, -0.0, 1.0, -1.788139627478813e-07, -1.0, -0.0, 1.0, -1.788139627478813e-07, -1.0, -0.0, 1.0, 0.0, -1.0, -2.6822095833267667e-07, 1.0, 0.0, -1.0, -2.6822095833267667e-07, 1.0, 0.0, -1.0, -2.6822095833267667e-07, 1.0, -1.0, -1.4901161193847656e-07, -0.0, 1.0, -1.0, -1.4901161193847656e-07, -0.0, 1.0, -1.0, -1.788139627478813e-07, -0.0, 1.0, -1.0, 0.0, -4.470350134511136e-08, 1.0, -1.0, 0.0, -4.470350134511136e-08, 1.0, -1.0, 0.0, -0.0, 1.0, -8.940698847936801e-08, 0.0, -1.0, 1.0, -8.940698847936801e-08, 0.0, -1.0, 1.0, -1.7881397695873602e-07, 0.0, -1.0, 1.0, 0.0, -1.0, 8.940698847936801e-08, 1.0, -1.788139627478813e-07, -1.0, -0.0, 1.0, 0.0, -1.0, -2.6822095833267667e-07, 1.0, -1.0, -1.1920926823449918e-07, -0.0, 1.0, -1.0, 0.0, -8.940700269022273e-08, 1.0, 0.0, 0.0, -1.0, 1.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
+		FloatArray(0.0, -1.0, 4.47035e-08, 1.0, 0.0, -1.0, 4.47035e-08, 1.0, 0.0, -1.0, 0.0, 1.0, -1.78814e-07, -1.0, 0.0, 1.0, -1.78814e-07, -1.0, 0.0, 1.0, -1.78814e-07, -1.0, 0.0, 1.0, 0.0, -1.0, -2.68221e-07, 1.0, 0.0, -1.0, -2.68221e-07, 1.0, 0.0, -1.0, -2.68221e-07, 1.0, -1.0, -1.49012e-07, 0.0, 1.0, -1.0, -1.49012e-07, 0.0, 1.0, -1.0, -1.78814e-07, 0.0, 1.0, -1.0, 0.0, -4.47035e-08, 1.0, -1.0, 0.0, -4.47035e-08, 1.0, -1.0, 0.0, 0.0, 1.0, -8.9407e-08, 0.0, -1.0, 1.0, -8.9407e-08, 0.0, -1.0, 1.0, -1.78814e-07, 0.0, -1.0, 1.0, 0.0, -1.0, 8.9407e-08, 1.0, -1.78814e-07, -1.0, 0.0, 1.0, 0.0, -1.0, -2.68221e-07, 1.0, -1.0, -1.19209e-07, 0.0, 1.0, -1.0, 0.0, -8.9407e-08, 1.0, 0.0, 0.0, -1.0, 1.0),
 		null, ; no Vertex Colors,
-		Vector2Array(1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0000000596046448, 1.0, 0.0, -5.960464477539063e-08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0),
-		Vector2Array(0.33333346247673035, 0.3333333730697632, 0.6666666865348816, 0.6666666567325592, 0.6666667461395264, 0.3333333730697632, 3.973642037635727e-08, 0.3333333134651184, 0.333333283662796, 0.6666666567325592, 0.3333333432674408, 0.3333333730697632, 1.291433733285885e-07, 0.6666666567325592, 0.3333333134651184, 1.0, 0.33333340287208557, 0.6666667461395264, 0.33333340287208557, 0.9999999602635832, 0.6666667461395264, 0.6666667461395264, 0.33333346247673035, 0.6666666865348816, 0.6666667461395264, 0.6666667759418488, 1.0, 1.0, 1.0, 0.6666667759418488, 0.333333283662796, 5.960464477539063e-08, 0.0, 0.33333325386047363, 0.33333325386047363, 0.3333333134651184, 0.33333340287208557, 0.6666666269302368, 0.0, 0.6666665971279144, 0.0, 0.9999999105930613, 0.6666666865348816, 1.0, 0.6666667461395264, 0.9999999701976865, 4.967052547044659e-08, 5.960464477539063e-08),
+		Vector2Array(1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, -5.96046e-08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0),
+		Vector2Array(0.333333, 0.333333, 0.666667, 0.666667, 0.666667, 0.333333, 3.97364e-08, 0.333333, 0.333333, 0.666667, 0.333333, 0.333333, 1.29143e-07, 0.666667, 0.333333, 1.0, 0.333333, 0.666667, 0.333333, 1.0, 0.666667, 0.666667, 0.333333, 0.666667, 0.666667, 0.666667, 1.0, 1.0, 1.0, 0.666667, 0.333333, 5.96046e-08, 0.0, 0.333333, 0.333333, 0.333333, 0.333333, 0.666667, 0.0, 0.666667, 0.0, 1.0, 0.666667, 1.0, 0.666667, 1.0, 4.96705e-08, 5.96046e-08),
 		null, ; No Bones,
 		null, ; No Weights,
 		IntArray(0, 2, 1, 3, 5, 4, 6, 8, 7, 9, 11, 10, 12, 14, 13, 15, 17, 16, 0, 1, 18, 3, 4, 19, 6, 7, 20, 9, 10, 21, 12, 13, 22, 15, 16, 23)
@@ -25,11 +25,11 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(1.0, 0.0, 1.0, -1.0, 0.0, -1.0, -1.0, 0.0, 1.0, 1.0, 0.0, -1.0),
-		Vector3Array(0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0),
-		FloatArray(1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0),
+		Vector3Array(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0),
+		FloatArray(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0),
 		null, ; no Vertex Colors,
-		Vector2Array(0.27497005462646484, 0.27496999502182007, -0.02496999502182007, -0.024970054626464844, -0.02496999502182007, 0.27496999502182007, 0.27497005462646484, -0.024970054626464844),
-		Vector2Array(1.0249700546264648, 0.27496999502182007, 0.7250300049781799, -0.024970054626464844, 0.7250300049781799, 0.27496999502182007, 1.0249700546264648, -0.024970054626464844),
+		Vector2Array(0.27497, 0.27497, -0.02497, -0.0249701, -0.02497, 0.27497, 0.27497, -0.0249701),
+		Vector2Array(1.02497, 0.27497, 0.72503, -0.0249701, 0.72503, 0.27497, 1.02497, -0.0249701),
 		null, ; No Bones,
 		null, ; No Weights,
 		IntArray(0, 2, 1, 0, 1, 3)
@@ -44,10 +44,10 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(-1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0),
-		Vector3Array(-1.0, 0.0, -0.0, -1.0, 0.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, -1.0, 0.0, -0.0, 0.0, 0.0, -1.0, 1.0, 0.0, -0.0, 0.0, 0.0, 1.0, 0.0, -1.0, -0.0, 0.0, 1.0, -0.0),
-		FloatArray(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, -1.0, 0.0, -0.0, 1.0, -1.0, 0.0, -0.0, 1.0, -1.0, 0.0, -0.0, 1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, -1.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, -2.980232594040899e-08, 0.0, 1.0, 1.0, -2.980232594040899e-08, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, -1.0, 0.0, -0.0, 1.0, 0.0, 0.0, -1.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, -5.960465188081798e-08, 0.0, 1.0, 1.0),
+		Vector3Array(-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0),
+		FloatArray(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, -1.0, 1.0, 0.0, 0.0, -1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, -2.98023e-08, 0.0, 1.0, 1.0, -2.98023e-08, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, -1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, -5.96047e-08, 0.0, 1.0, 1.0),
 		null, ; no Vertex Colors,
-		Vector2Array(1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 0.0, 2.9802322387695312e-08, 1.0, 1.0, 0.9999999701976776, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0000000596046448, 1.0, 0.0, -5.960464477539063e-08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0),
+		Vector2Array(1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 0.0, 2.98023e-08, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, -5.96046e-08, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0),
 		null, ; No UV2,
 		null, ; No Bones,
 		null, ; No Weights,
@@ -63,10 +63,10 @@ surfaces/0 = {
 	"primitive":4,
 	"arrays":[
 		Vector3Array(2.0, 0.0, 1.0, -2.0, 0.0, -2.0, -2.0, 0.0, 1.0, 1.0, 0.0, 2.0, 2.0, 0.0, 2.0, 2.0, 0.0, -2.0, -1.0, 0.0, 2.0),
-		Vector3Array(0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0, 0.0, 1.0, -0.0),
-		FloatArray(1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0, 1.0, 0.0, -0.0, 1.0),
+		Vector3Array(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0),
+		FloatArray(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0),
 		null, ; no Vertex Colors,
-		Vector2Array(1.0, 0.7500000596046448, 0.0, 0.0, 0.0, 0.7500000596046448, 0.7500000596046448, 1.0, 1.0, 1.0, 1.0, 0.0, 0.25, 1.0),
+		Vector2Array(1.0, 0.75, 0.0, 0.0, 0.0, 0.75, 0.75, 1.0, 1.0, 1.0, 1.0, 0.0, 0.25, 1.0),
 		null, ; No UV2,
 		null, ; No Bones,
 		null, ; No Weights,
@@ -82,22 +82,22 @@ surfaces/0 = {
 
 mesh = SubResource(1)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 4.0, 0.0, 4.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 4.0, 0.0, 4.0)
 
 [node name="MultiUV" type="MeshInstance" parent="."]
 
 mesh = SubResource(2)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, 4.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 4.0)
 
 [node name="Cube" type="MeshInstance" parent="."]
 
 mesh = SubResource(3)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 4.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 4.0, 0.0, 0.0)
 
 [node name="Plane" type="MeshInstance" parent="."]
 
 mesh = SubResource(4)
 visible = true
-transform = Transform(  1.0, 0.0, -0.0, 0.0, 1.0, -0.0, -0.0, -0.0, 1.0, 0.0, 0.0, -0.0 )
+transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)

文件差異過大導致無法顯示
+ 0 - 0
tests/reference-exports/vertex_color.escn


部分文件因文件數量過多而無法顯示