Explorar o código

Merge pull request #213 from Jason0214/fix_shape_key_exporting

Fix shape key exporting, update test scene
Lu Jiacheng %!s(int64=6) %!d(string=hai) anos
pai
achega
f0bf680190
Modificáronse 28 ficheiros con 160 adicións e 125 borrados
  1. 22 35
      io_scene_godot/converters/mesh.py
  2. 2 6
      io_scene_godot/converters/physics.py
  3. 12 17
      io_scene_godot/converters/simple_nodes.py
  4. 0 0
      tests/reference_exports/action_animation/animation_bone_transform.escn
  5. 0 0
      tests/reference_exports/action_with_constraint/constraint_external_IK.escn
  6. 0 0
      tests/reference_exports/action_with_constraint/constraint_internal_IK.escn
  7. 0 0
      tests/reference_exports/action_with_constraint/constraint_with_undeform_bone.escn
  8. 0 0
      tests/reference_exports/action_with_constraint/stashed_constraint.escn
  9. 5 5
      tests/reference_exports/armature/armature_illegal_bone_name.escn
  10. 0 0
      tests/reference_exports/armature/armature_with_mesh.escn
  11. 0 0
      tests/reference_exports/armature/armature_with_non_deform_bone.escn
  12. 0 0
      tests/reference_exports/armature/armature_with_other_vertex_groups.escn
  13. 0 0
      tests/reference_exports/armature/armature_with_physics.escn
  14. 0 0
      tests/reference_exports/armature/armature_with_pose.escn
  15. 2 1
      tests/reference_exports/light/animation_sun.escn
  16. 10 5
      tests/reference_exports/light/animation_various_lights.escn
  17. 19 9
      tests/reference_exports/light/cycles_lights.escn
  18. 8 4
      tests/reference_exports/light/just_point_lights.escn
  19. 16 8
      tests/reference_exports/light/just_spot_lights.escn
  20. 2 1
      tests/reference_exports/material/material_search.escn
  21. 2 1
      tests/reference_exports/material/simple_materials.escn
  22. 22 16
      tests/reference_exports/material_cycle/material_anistropy.escn
  23. 22 14
      tests/reference_exports/material_cycle/material_cycle.escn
  24. 4 2
      tests/reference_exports/material_cycle/material_normal.escn
  25. 2 1
      tests/reference_exports/mesh/physics.escn
  26. 0 0
      tests/reference_exports/misc/invisible_objects.escn
  27. 10 0
      tests/reference_exports/shape_key/shapekey_with_pose.escn
  28. BIN=BIN
      tests/test_scenes/shape_key/shapekey_with_pose.blend

+ 22 - 35
io_scene_godot/converters/mesh.py

@@ -178,9 +178,7 @@ class MeshResourceExporter:
         self.object.show_only_shape_key = True
         self.object.active_shape_key_index = 0
 
-        mesh = self.object.to_mesh(bpy.context.view_layer.depsgraph,
-                                   apply_modifiers=apply_modifiers,
-                                   calc_undeformed=True)
+        mesh = self.object.to_mesh()
 
         self.object.show_only_shape_key = False
 
@@ -220,18 +218,6 @@ class MeshResourceExporter:
 
         bpy.data.meshes.remove(mesh)
 
-    @staticmethod
-    def extract_shape_keys(blender_shape_keys):
-        """Return a list of (shape_key_index, shape_key_object) each of them
-        is a shape key needs exported"""
-        # base shape key needn't be exported
-        ret = list()
-        base_key = blender_shape_keys.reference_key
-        for index, shape_key in enumerate(blender_shape_keys.key_blocks):
-            if shape_key != base_key:
-                ret.append((index, shape_key))
-        return ret
-
     @staticmethod
     def validate_morph_mesh_modifiers(mesh_object):
         """Check whether a mesh has modifiers not
@@ -255,9 +241,15 @@ class MeshResourceExporter:
 
         return surfaces_morph_list
 
-    # pylint: disable-msg=R0914
+    # pylint: disable-msg=too-many-locals
     def export_morphs(self, export_settings, surfaces):
         """Export shape keys in mesh node and append them to surfaces"""
+        self.mesh_resource["blend_shape/names"] = Array(
+            prefix="PoolStringArray(", suffix=')'
+        )
+        self.mesh_resource["blend_shape/mode"] = 0
+
+        # toggle shapekey uncompatible modifiers to false
         modifier_config_cache = list()
         if export_settings['use_mesh_modifiers']:
             if not self.validate_morph_mesh_modifiers(
@@ -269,33 +261,25 @@ class MeshResourceExporter:
                 )
 
             for modifier in self.object.modifiers:
-                modifier_config_cache.append(modifier.show_render)
-                modifier.show_render = False
+                modifier_config_cache.append(modifier.show_viewport)
+                modifier.show_viewport = False
 
-        self.mesh_resource["blend_shape/names"] = Array(
-            prefix="PoolStringArray(", suffix=')'
-        )
-        self.mesh_resource["blend_shape/mode"] = 0
+        # turn on shape key mode
+        self.object.show_only_shape_key = True
+        blender_shape_keys = self.object.data.shape_keys
+        for index, shape_key in enumerate(blender_shape_keys.key_blocks):
+            if shape_key == blender_shape_keys.reference_key:
+                continue
 
-        shape_keys_to_export = self.extract_shape_keys(
-            self.object.data.shape_keys
-        )
-        for index, shape_key in shape_keys_to_export:
             self.mesh_resource["blend_shape/names"].append(
                 '"{}"'.format(shape_key.name)
             )
 
-            self.object.show_only_shape_key = True
             self.object.active_shape_key_index = index
-            shape_key.value = 1.0
-
-            shape_key_mesh = self.object.to_mesh(
-                bpy.context.view_layer.depsgraph,
-                apply_modifiers=True,
-                calc_undeformed=True
-            )
 
-            self.object.show_only_shape_key = False
+            bpy.context.view_layer.depsgraph.update()
+            shape_key_mesh = self.object.evaluated_get(
+                bpy.context.view_layer.depsgraph).to_mesh()
 
             triangulate_mesh(shape_key_mesh)
 
@@ -332,6 +316,9 @@ class MeshResourceExporter:
 
             bpy.data.meshes.remove(shape_key_mesh)
 
+        # turn off shape key mode
+        self.object.show_only_shape_key = False
+        # revert modifiers
         if export_settings['use_mesh_modifiers']:
             for index, modifier in enumerate(self.object.modifiers):
                 modifier.show_render = modifier_config_cache[index]

+ 2 - 6
io_scene_godot/converters/physics.py

@@ -121,9 +121,7 @@ def generate_convex_mesh_array(escn_file, export_settings, node):
 
     col_shape = InternalResource("ConvexPolygonShape", mesh.name)
 
-    mesh = node.to_mesh(bpy.context.view_layer.depsgraph,
-                        apply_modifiers=True,
-                        calc_undeformed=True)
+    mesh = node.to_mesh()
 
     # Triangulate
     triangulated_mesh = bmesh.new()
@@ -156,9 +154,7 @@ def generate_triangle_mesh_array(escn_file, export_settings, node):
 
     col_shape = InternalResource("ConcavePolygonShape", mesh.name)
 
-    mesh = node.to_mesh(bpy.context.view_layer.depsgraph,
-                        apply_modifiers=True,
-                        calc_undeformed=True)
+    mesh = node.to_mesh()
 
     # Triangulate
     triangulated_mesh = bmesh.new()

+ 12 - 17
io_scene_godot/converters/simple_nodes.py

@@ -91,14 +91,17 @@ class LightNode(NodeTemplate):
     _light_attr_conv = [
         AttributeConvertInfo(
             'specular_factor', 'light_specular', lambda x: x),
-        AttributeConvertInfo('energy', 'light_energy', lambda x: x),
         AttributeConvertInfo('color', 'light_color', gamma_correct),
         AttributeConvertInfo('shadow_color', 'shadow_color', gamma_correct),
     ]
     _omni_attr_conv = [
+        AttributeConvertInfo(
+            'energy', 'light_energy', lambda x: abs(x / 100.0)),
         AttributeConvertInfo('distance', 'omni_range', lambda x: x),
     ]
     _spot_attr_conv = [
+        AttributeConvertInfo(
+            'energy', 'light_energy', lambda x: abs(x / 100.0)),
         AttributeConvertInfo(
             'spot_size', 'spot_angle', lambda x: math.degrees(x/2)
         ),
@@ -107,6 +110,9 @@ class LightNode(NodeTemplate):
         ),
         AttributeConvertInfo('distance', 'spot_range', lambda x: x),
     ]
+    _directional_attr_conv = [
+        AttributeConvertInfo('energy', 'light_energy', abs),
+    ]
 
     @property
     def attribute_conversion(self):
@@ -116,6 +122,8 @@ class LightNode(NodeTemplate):
             return self._light_attr_conv + self._omni_attr_conv
         if self.get_type() == 'SpotLight':
             return self._light_attr_conv + self._spot_attr_conv
+        if self.get_type() == 'DirectionalLight':
+            return self._light_attr_conv + self._directional_attr_conv
         return self._light_attr_conv
 
 
@@ -147,22 +155,9 @@ def export_light_node(escn_file, export_settings, node, parent_gd_node):
         # These cannot be set via AttributeConvertInfo as it will not handle
         # animations correctly
         light_node['transform'] = fix_directional_transform(node.matrix_local)
-        if light.use_nodes:
-            emission = find_shader_node(light.node_tree, 'ShaderNodeEmission')
-            if emission:
-                strength = node_input(emission, 'Strength') or 100
-                color = node_input(emission, 'Color') or [1, 1, 1]
-                # we don't have an easy way to get these in cycles
-                # don't set them and let godot use its defaults
-                del light_node['light_specular']
-                del light_node['shadow_color']
-                # strength=100 in cycles is roughly equivalent to energy=1
-                light_node['light_energy'] = abs(strength / 100.0)
-                light_node['light_color'] = gamma_correct(color)
-                light_node['shadow_enabled'] = light.cycles.cast_shadow
-                light_node['light_negative'] = strength < 0
-        else:
-            light_node['shadow_enabled'] = light.use_shadow
+        light_node['light_negative'] = light.energy < 0
+        light_node['shadow_enabled'] = (
+            light.use_shadow and light.cycles.cast_shadow)
 
         escn_file.add_node(light_node)
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/action_animation/animation_bone_transform.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/action_with_constraint/constraint_external_IK.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/action_with_constraint/constraint_internal_IK.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/action_with_constraint/constraint_with_undeform_bone.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/action_with_constraint/stashed_constraint.escn


+ 5 - 5
tests/reference_exports/armature/armature_illegal_bone_name.escn

@@ -36,15 +36,15 @@ resource_name = "Cube001"
 surfaces/0 = {
 	"primitive":4,
 	"arrays":[
-		Vector3Array(-0.861623, 1.00707, 0.972223, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -0.852043, 1.00625, -1.02767, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.14764, 0.992919, -1.00687, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.13742, 0.993741, 0.993087, -1.0, -1.0, 1.0, 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.852043, 1.00625, -1.02767, 1.13742, 0.993741, 0.993087, 1.14764, 0.992919, -1.00687, -0.861623, 1.00707, 0.972223, -0.852043, 1.00625, -1.02767, -1.0, -1.0, -1.0, -0.852043, 1.00625, -1.02767, 1.14764, 0.992919, -1.00687, 1.0, -1.0, -1.0, 1.14764, 0.992919, -1.00687, 1.13742, 0.993741, 0.993087, 1.0, -1.0, 1.0, 1.13742, 0.993741, 0.993087, -0.861623, 1.00707, 0.972223, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -0.852043, 1.00625, -1.02767, -0.861623, 1.00707, 0.972223, 1.13742, 0.993741, 0.993087),
-		Vector3Array(-0.997632, 0.0687816, 0.0, -0.997632, 0.0687816, 0.0, -0.997632, 0.0687816, 0.0, 0.0, -0.0137889, -0.999905, 0.0, -0.0137889, -0.999905, 0.0, -0.0137889, -0.999905, 0.997267, -0.0738797, 0.0, 0.997267, -0.0738797, 0.0, 0.997267, -0.0738797, 0.0, 0.0, 0.00346724, 0.999994, 0.0, 0.00346724, 0.999994, 0.0, 0.00346724, 0.999994, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.00667129, 0.999978, -0.000377016, 0.00667129, 0.999978, -0.000377016, 0.00667129, 0.999978, -0.000377016, -0.997285, 0.0734815, -0.00480727, -0.997285, 0.0734815, -0.00480727, -0.997285, 0.0734815, -0.00480727, 0.0103709, -0.00421573, -0.999937, 0.0103709, -0.00421573, -0.999937, 0.0103709, -0.00421573, -0.999937, 0.997621, -0.0687459, 0.00512423, 0.997621, -0.0687459, 0.00512423, 0.997621, -0.0687459, 0.00512423, -0.0103384, 0.0145502, 0.999841, -0.0103384, 0.0145502, 0.999841, -0.0103384, 0.0145502, 0.999841, 0.0, -1.0, 0.0, 0.00667049, 0.999978, -0.000376529, 0.00667049, 0.999978, -0.000376529, 0.00667049, 0.999978, -0.000376529),
+		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),
 		null, ; No Tangents,
 		null, ; no Vertex Colors,
 		null, ; No UV1,
 		null, ; No UV2,
-		IntArray(2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0),
-		FloatArray(0.925511, 0.0744892, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923829, 0.076171, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 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.923829, 0.076171, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 0.925511, 0.0744892, 0.0, 0.0, 0.923829, 0.076171, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923829, 0.076171, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 0.925511, 0.0744892, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923829, 0.076171, 0.0, 0.0, 0.925511, 0.0744892, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0),
-		IntArray(0, 2, 1, 3, 5, 4, 6, 8, 7, 9, 11, 10, 12, 14, 13, 15, 17, 16, 18, 20, 19, 21, 23, 22, 24, 26, 25, 27, 29, 28, 12, 13, 30, 31, 33, 32)
+		IntArray(2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0),
+		FloatArray(0.925511, 0.0744892, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923829, 0.076171, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 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.923829, 0.076171, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 0.923829, 0.076171, 0.0, 0.0, 0.926358, 0.0736422, 0.0, 0.0, 0.923954, 0.0760457, 0.0, 0.0, 0.925511, 0.0744892, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.925511, 0.0744892, 0.0, 0.0),
+		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)
 	],
 	"morph_arrays":[]
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/armature/armature_with_mesh.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/armature/armature_with_non_deform_bone.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/armature/armature_with_other_vertex_groups.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/armature/armature_with_physics.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/armature/armature_with_pose.escn


+ 2 - 1
tests/reference_exports/light/animation_sun.escn

@@ -46,10 +46,11 @@ transform = Transform(7.26935, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 7.57504, 0.109
 [node name="Sun" type="DirectionalLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 transform = Transform(0.883713, -0.407974, 0.229367, -0.443707, -0.574356, 0.687924, -0.148916, -0.709699, -0.688587, 0.0, 5.2651, -7.49279)
+light_negative = false
 shadow_enabled = true
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="Sun"]

+ 10 - 5
tests/reference_exports/light/animation_various_lights.escn

@@ -146,13 +146,14 @@ surfaces/0 = {
 [node name="SpotDistanceChange" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 22.5
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 0.223751, 3.0266, 1.21379)
+light_negative = false
 shadow_enabled = true
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="SpotDistanceChange"]
@@ -163,13 +164,14 @@ anims/Spot.003Action.001 = SubResource(1)
 [node name="SpotTransformChange" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 22.5
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(0.477268, -3.84117e-08, 0.878758, -0.878758, -2.0862e-08, 0.477268, 0.0, -1.0, -4.37114e-08, -0.760565, 3.14704, 6.40839)
+light_negative = false
 shadow_enabled = true
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="SpotTransformChange"]
@@ -186,13 +188,14 @@ transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, -5.52819, 0.7
 [node name="ShadowColorChange" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 22.5
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(0.958848, -0.28392, -2.18837e-08, 0.178546, 0.602982, 0.777518, -0.220753, -0.745521, 0.628861, -4.64127, 6.11957, 1.29809)
+light_negative = false
 shadow_enabled = true
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="ShadowColorChange"]
@@ -209,13 +212,14 @@ transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, -4.22111, 1.2
 [node name="SpotRangeChange" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 22.5
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, 6.6415, 3.84213, -6.03583)
+light_negative = false
 shadow_enabled = true
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="SpotRangeChange"]
@@ -226,11 +230,12 @@ anims/SpotAction = SubResource(6)
 [node name="LightColorChange" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 0.266431, 0.248791, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 1.0
 transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 5.25185, 0.215087, 5.49347)
+light_negative = false
 shadow_enabled = true
 
 [node name="AnimationPlayer" type="AnimationPlayer" parent="LightColorChange"]

+ 19 - 9
tests/reference_exports/light/cycles_lights.escn

@@ -24,51 +24,61 @@ surfaces/0 = {
 [node name="MissingEmission" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 0.01
 omni_range = 25.0
 transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, -2.0088, 2.79876e-05, -1.983)
+light_negative = false
+shadow_enabled = true
 
 [node name="PointNegative" type="OmniLight" parent="."]
 
-light_energy = 0.1
+light_specular = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 0.1
 omni_range = 25.0
 transform = Transform(1.0, 0.0, 0.0, 0.0, -4.37114e-08, 1.0, 0.0, -1.0, -4.37114e-08, -2.24976, 0.0868509, 1.52357)
-shadow_enabled = true
 light_negative = true
+shadow_enabled = true
 
 [node name="SpotNarrow" type="SpotLight" parent="."]
 
-light_energy = 1.0
+light_specular = 1.0
 light_color = Color(0.37995, 0.623953, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 18.35
 spot_angle_attenuation = 0.19802
 spot_range = 25.0
 transform = Transform(0.961691, 0.273797, -0.0136299, 0.171724, -0.562921, 0.808474, 0.213685, -0.779843, -0.588373, 2.08892, 1.68058, 0.594427)
-shadow_enabled = true
 light_negative = false
+shadow_enabled = true
 
 [node name="SpotWideNoShadow" type="SpotLight" parent="."]
 
-light_energy = 1.0
+light_specular = 1.0
 light_color = Color(0.967385, 1.0, 0.49214, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 27.5
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(0.961691, 0.273797, -0.0136299, -0.180619, 0.670245, 0.719825, 0.206221, -0.689787, 0.694022, 2.08892, 1.68058, 0.0743143)
-shadow_enabled = false
 light_negative = false
+shadow_enabled = false
 
 [node name="Point" type="OmniLight" parent="."]
 
-light_energy = 0.3
+light_specular = 1.0
 light_color = Color(1.0, 0.429678, 0.88914, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 0.3
 omni_range = 25.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.0723696, 0.0)
-shadow_enabled = true
 light_negative = false
+shadow_enabled = true
 
 [node name="Plane" type="MeshInstance" parent="."]
 

+ 8 - 4
tests/reference_exports/light/just_point_lights.escn

@@ -62,11 +62,12 @@ surfaces/0 = {
 [node name="Lamp003" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.836064, 0.0264334, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 5.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
 shadow_enabled = true
 
 [node name="Cube001" type="MeshInstance" parent="."]
@@ -84,21 +85,23 @@ 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.
 [node name="Lamp002" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.0, 1.0, 0.064745, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 5.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
 shadow_enabled = false
 
 [node name="Lamp001" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 0.0, 0.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 2.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
 shadow_enabled = false
 
 [node name="Plane" type="MeshInstance" parent="."]
@@ -110,11 +113,12 @@ transform = Transform(10.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0, 10.0, 0.0, 0.0,
 [node name="Lamp" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 2.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
 shadow_enabled = false
 
 [node name="Camera" type="Camera" parent="."]

+ 16 - 8
tests/reference_exports/light/just_spot_lights.escn

@@ -62,73 +62,79 @@ surfaces/0 = {
 [node name="Lamp007" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 5.0
 light_color = Color(0.0, 1.0, 0.901999, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 5.0
 spot_angle = 10.0
 spot_angle_attenuation = 20.0
 spot_range = 3.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
 shadow_enabled = false
 
 [node name="Lamp006" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 5.0
 light_color = Color(0.0, 1.0, 0.901999, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 5.0
 spot_angle = 10.0
 spot_angle_attenuation = 0.19802
 spot_range = 3.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
 shadow_enabled = false
 
 [node name="Lamp005" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.0, 1.0, 0.901999, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 10.0
 spot_angle_attenuation = 0.19802
 spot_range = 3.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
 shadow_enabled = false
 
 [node name="Lamp002" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.0, 1.0, 0.901999, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 10.0
 spot_angle_attenuation = 20.0
 spot_range = 3.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
 shadow_enabled = false
 
 [node name="Lamp001" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.0, 1.0, 0.901999, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 60.0
 spot_angle_attenuation = 1.25
 spot_range = 3.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
 shadow_enabled = false
 
 [node name="Lamp000" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.122916, 1.0, 0.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 10.0
 spot_angle_attenuation = 1.25
 spot_range = 5.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
 shadow_enabled = false
 
 [node name="Cube001" type="MeshInstance" parent="."]
@@ -146,25 +152,27 @@ 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.
 [node name="Lamp004" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.995604, 0.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 37.5
 spot_angle_attenuation = 1.25
 spot_range = 5.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
 shadow_enabled = true
 
 [node name="Lamp003" type="SpotLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(0.0, 0.612489, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 37.5
 spot_angle_attenuation = 1.25
 spot_range = 5.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
 shadow_enabled = false
 
 [node name="Plane" type="MeshInstance" parent="."]

+ 2 - 1
tests/reference_exports/material/material_search.escn

@@ -32,11 +32,12 @@ 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="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 30.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
 shadow_enabled = true
 
 [node name="Camera" type="Camera" parent="."]

+ 2 - 1
tests/reference_exports/material/simple_materials.escn

@@ -57,11 +57,12 @@ 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="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 30.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
 shadow_enabled = true
 
 [node name="Camera" type="Camera" parent="."]

+ 22 - 16
tests/reference_exports/material_cycle/material_anistropy.escn

@@ -79,9 +79,11 @@ void fragment () {
 	float node1_in14_ior = float(1.4500000476837158);
 	float node1_in15_transmission = float(0.0);
 	float node1_in16_transmissionroughness = float(0.0);
-	vec3 node1_in17_normal = NORMAL;
-	vec3 node1_in18_clearcoatnormal = vec3(0.0, 0.0, 0.0);
-	vec3 node1_in19_tangent = node0_out0_tangent;
+	vec4 node1_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
+	float node1_in18_alpha = float(1.0);
+	vec3 node1_in19_normal = NORMAL;
+	vec3 node1_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
+	vec3 node1_in21_tangent = node0_out0_tangent;
 	// output sockets definitions
 	vec3 node1_bsdf_out0_albedo;
 	float node1_bsdf_out1_sss_strength;
@@ -102,8 +104,8 @@ void fragment () {
 		node1_bsdf_out3_specular, node1_bsdf_out4_roughness, node1_bsdf_out5_clearcoat,
 		node1_bsdf_out6_clearcoat_gloss, node1_bsdf_out7_anisotropy,
 		node1_bsdf_out8_transmission, node1_bsdf_out9_ior);
-	space_convert_zup_to_yup(node1_in19_tangent);
-	dir_space_convert_world_to_view(node1_in19_tangent, INV_CAMERA_MATRIX);
+	space_convert_zup_to_yup(node1_in21_tangent);
+	dir_space_convert_world_to_view(node1_in21_tangent, INV_CAMERA_MATRIX);
 	
 	
 	ALBEDO = node1_bsdf_out0_albedo;
@@ -113,10 +115,10 @@ void fragment () {
 	ROUGHNESS = node1_bsdf_out4_roughness;
 	CLEARCOAT = node1_bsdf_out5_clearcoat;
 	CLEARCOAT_GLOSS = node1_bsdf_out6_clearcoat_gloss;
-	NORMAL = node1_in17_normal;
+	NORMAL = node1_in19_normal;
 	// uncomment it when you need it
 	// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node1_bsdf_out8_transmission;
-	TANGENT = normalize(cross(cross(node1_in19_tangent, NORMAL), NORMAL));
+	TANGENT = normalize(cross(cross(node1_in21_tangent, NORMAL), NORMAL));
 	BINORMAL = cross(TANGENT, NORMAL);
 	ANISOTROPY = node1_bsdf_out7_anisotropy;
 }
@@ -242,9 +244,11 @@ void fragment () {
 	float node1_in14_ior = float(1.4500000476837158);
 	float node1_in15_transmission = float(0.0);
 	float node1_in16_transmissionroughness = float(0.0);
-	vec3 node1_in17_normal = NORMAL;
-	vec3 node1_in18_clearcoatnormal = vec3(0.0, 0.0, 0.0);
-	vec3 node1_in19_tangent = node0_out0_object;
+	vec4 node1_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
+	float node1_in18_alpha = float(1.0);
+	vec3 node1_in19_normal = NORMAL;
+	vec3 node1_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
+	vec3 node1_in21_tangent = node0_out0_object;
 	// output sockets definitions
 	vec3 node1_bsdf_out0_albedo;
 	float node1_bsdf_out1_sss_strength;
@@ -265,8 +269,8 @@ void fragment () {
 		node1_bsdf_out3_specular, node1_bsdf_out4_roughness, node1_bsdf_out5_clearcoat,
 		node1_bsdf_out6_clearcoat_gloss, node1_bsdf_out7_anisotropy,
 		node1_bsdf_out8_transmission, node1_bsdf_out9_ior);
-	space_convert_zup_to_yup(node1_in19_tangent);
-	dir_space_convert_world_to_view(node1_in19_tangent, INV_CAMERA_MATRIX);
+	space_convert_zup_to_yup(node1_in21_tangent);
+	dir_space_convert_world_to_view(node1_in21_tangent, INV_CAMERA_MATRIX);
 	
 	
 	ALBEDO = node1_bsdf_out0_albedo;
@@ -276,10 +280,10 @@ void fragment () {
 	ROUGHNESS = node1_bsdf_out4_roughness;
 	CLEARCOAT = node1_bsdf_out5_clearcoat;
 	CLEARCOAT_GLOSS = node1_bsdf_out6_clearcoat_gloss;
-	NORMAL = node1_in17_normal;
+	NORMAL = node1_in19_normal;
 	// uncomment it when you need it
 	// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node1_bsdf_out8_transmission;
-	TANGENT = normalize(cross(cross(node1_in19_tangent, NORMAL), NORMAL));
+	TANGENT = normalize(cross(cross(node1_in21_tangent, NORMAL), NORMAL));
 	BINORMAL = cross(TANGENT, NORMAL);
 	ANISOTROPY = node1_bsdf_out7_anisotropy;
 }
@@ -314,11 +318,13 @@ surfaces/0 = {
 
 [node name="Point" type="DirectionalLight" parent="."]
 
-light_energy = 1.0
+light_specular = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 100.0
 transform = Transform(0.701062, -0.562597, -0.438174, 0.452107, -0.124517, 0.88323, -0.551463, -0.8173, 0.16706, -2.09735, 4.28268, -0.137035)
-shadow_enabled = true
 light_negative = false
+shadow_enabled = true
 
 [node name="object_with_uv" type="MeshInstance" parent="."]
 

+ 22 - 14
tests/reference_exports/material_cycle/material_cycle.escn

@@ -616,9 +616,11 @@ void fragment () {
 	float node1_in14_ior = float(1.4500000476837158);
 	float node1_in15_transmission = float(0.0);
 	float node1_in16_transmissionroughness = float(0.0);
-	vec3 node1_in17_normal = NORMAL;
-	vec3 node1_in18_clearcoatnormal = vec3(0.0, 0.0, 0.0);
-	vec3 node1_in19_tangent = TANGENT;
+	vec4 node1_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
+	float node1_in18_alpha = float(1.0);
+	vec3 node1_in19_normal = NORMAL;
+	vec3 node1_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
+	vec3 node1_in21_tangent = TANGENT;
 	// output sockets definitions
 	vec3 node1_bsdf_out0_albedo;
 	float node1_bsdf_out1_sss_strength;
@@ -648,11 +650,11 @@ void fragment () {
 	ROUGHNESS = node1_bsdf_out4_roughness;
 	CLEARCOAT = node1_bsdf_out5_clearcoat;
 	CLEARCOAT_GLOSS = node1_bsdf_out6_clearcoat_gloss;
-	NORMAL = node1_in17_normal;
+	NORMAL = node1_in19_normal;
 	// uncomment it when you need it
 	// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node1_bsdf_out8_transmission;
 	// uncomment it when you are modifing TANGENT
-	// TANGENT = normalize(cross(cross(node1_in19_tangent, NORMAL), NORMAL));
+	// TANGENT = normalize(cross(cross(node1_in21_tangent, NORMAL), NORMAL));
 	// BINORMAL = cross(TANGENT, NORMAL);
 	// uncomment it when you have tangent(UV) set
 	// ANISOTROPY = node1_bsdf_out7_anisotropy;
@@ -1453,9 +1455,11 @@ void fragment () {
 	float node3_in14_ior = float(1.4500000476837158);
 	float node3_in15_transmission = float(0.0);
 	float node3_in16_transmissionroughness = float(0.0);
-	vec3 node3_in17_normal = NORMAL;
-	vec3 node3_in18_clearcoatnormal = vec3(0.0, 0.0, 0.0);
-	vec3 node3_in19_tangent = TANGENT;
+	vec4 node3_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
+	float node3_in18_alpha = float(1.0);
+	vec3 node3_in19_normal = NORMAL;
+	vec3 node3_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
+	vec3 node3_in21_tangent = TANGENT;
 	// output sockets definitions
 	vec3 node3_bsdf_out0_albedo;
 	float node3_bsdf_out1_sss_strength;
@@ -1485,11 +1489,11 @@ void fragment () {
 	ROUGHNESS = node3_bsdf_out4_roughness;
 	CLEARCOAT = node3_bsdf_out5_clearcoat;
 	CLEARCOAT_GLOSS = node3_bsdf_out6_clearcoat_gloss;
-	NORMAL = node3_in17_normal;
+	NORMAL = node3_in19_normal;
 	// uncomment it when you need it
 	// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node3_bsdf_out8_transmission;
 	// uncomment it when you are modifing TANGENT
-	// TANGENT = normalize(cross(cross(node3_in19_tangent, NORMAL), NORMAL));
+	// TANGENT = normalize(cross(cross(node3_in21_tangent, NORMAL), NORMAL));
 	// BINORMAL = cross(TANGENT, NORMAL);
 	// uncomment it when you have tangent(UV) set
 	// ANISOTROPY = node3_bsdf_out7_anisotropy;
@@ -2014,25 +2018,29 @@ material/0 = SubResource(39)
 
 [node name="Spot001" type="SpotLight" parent="."]
 
-light_energy = 1.0
+light_specular = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 17.4
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(0.629608, 0.0765798, 0.77313, -0.776913, 0.06206, 0.626542, 0.0, -0.99513, 0.0985693, 5.32508, 4.74617, 0.487329)
-shadow_enabled = true
 light_negative = false
+shadow_enabled = true
 
 [node name="Spot" type="SpotLight" parent="."]
 
-light_energy = 1.0
+light_specular = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 spot_angle = 24.3
 spot_angle_attenuation = 1.25
 spot_range = 25.0
 transform = Transform(0.633641, 0.273452, -0.723687, 0.117184, 0.890727, 0.439173, 0.764701, -0.363082, 0.532357, -4.6068, 2.54209, 4.80618)
-shadow_enabled = true
 light_negative = false
+shadow_enabled = true
 
 [node name="Plane" type="MeshInstance" parent="."]
 

+ 4 - 2
tests/reference_exports/material_cycle/material_normal.escn

@@ -1143,11 +1143,13 @@ material/0 = SubResource(12)
 
 [node name="Lamp" type="DirectionalLight" parent="."]
 
-light_energy = 0.04
+light_specular = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
+shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 4.0
 transform = Transform(-0.404791, -0.439839, 0.801677, 0.221124, 0.803611, 0.552553, -0.88727, 0.400938, -0.228035, 4.07625, 1.70784, -1.00545)
-shadow_enabled = true
 light_negative = false
+shadow_enabled = true
 
 [node name="test_displacement" type="MeshInstance" parent="."]
 

+ 2 - 1
tests/reference_exports/mesh/physics.escn

@@ -315,11 +315,12 @@ transform = Transform(1.0, 0.0, 0.0, 0.0, 7.54979e-08, -1.0, 0.0, 1.0, 7.54979e-
 [node name="Lamp" type="OmniLight" parent="."]
 
 light_specular = 1.0
-light_energy = 1.0
 light_color = Color(1.0, 1.0, 1.0, 1.0)
 shadow_color = Color(0.0, 0.0, 0.0, 1.0)
+light_energy = 1.0
 omni_range = 30.0
 transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 7.32356, -1.00545)
+light_negative = false
 shadow_enabled = true
 
 [node name="Camera" type="Camera" parent="."]

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
tests/reference_exports/misc/invisible_objects.escn


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 10 - 0
tests/reference_exports/shape_key/shapekey_with_pose.escn


BIN=BIN
tests/test_scenes/shape_key/shapekey_with_pose.blend


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio