mirror of
https://github.com/godotengine/godot-blender-exporter.git
synced 2026-01-05 18:10:04 +03:00
---------------- Fixed pylint errors. Removed commented code. Formatted code. Update test scene Include Godot Resource Name in to MeshResourceKey Same mesh may be used both as CollisionShape and ArrayMesh Simplify MeshResourceKey construction The previously implementation is kind of risk because of the recursive calling, here introduce a simpler one with some fault allowance. Minor changes and fixes to last commit. - Added functionality to export all object types. - Replaced 'MESH' in object_types with more general 'GEOMETRY' option, allowing for all the following types to be converted: MESH, CURVE, SURFACE, META, FONT. These are all treated similarly using mesh.py. Beziers and Surfaces shapekeys tested and working. - Moved + rejigged Mesh/Skeleton path resolving to end of export_scene() in export_godot.py for better functionality. - Fixed bugs when attempting to export empty geometry. - Added MeshResourceKey to mesh.py, this produces an identifier key for meshes with modifiers. Now, if more than one object use the exact same object data and modifiers then the exporter refers to a single resource. - Reverted ArrayMeshResource resource_name values to object.data.name. - Fixed some newline spacing inconsistencies that happened during serialization, so it now matches the same spacing that Godot uses. Fully updated to work with latest Blender 2.8 build (March 31st 2019) - Fixed use_mesh_modifiers when converting meshes. - Added MeshConverter class to assist in all object to mesh conversions. - Implemented new mesh naming convention to prevent clashing resource names. - Commented out modifier disabling during ArrayMeshResourceExporter's export_morphs(), based on several tests that suggested it was not necessary. - Fixed default_settings in __init__.py. - Renamed MeshResourceExporter to ArrayMeshResourceExporter for consistency. Implemented property "use_mesh_modifiers" prior to which was no longer working and had no effect on the resulting mesh. Updated all props to use Python's type annotations, fixes start-up warning. Updated all references of Object.to_mesh() to work with latest changes to Blender 2.8 API.
192 lines
6.7 KiB
Plaintext
192 lines
6.7 KiB
Plaintext
[gd_scene load_steps=1 format=2]
|
|
|
|
[sub_resource id=1 type="ArrayMesh"]
|
|
|
|
resource_name = "Cube002"
|
|
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),
|
|
null, ; No Tangents,
|
|
null, ; no Vertex Colors,
|
|
null, ; No UV1,
|
|
null, ; No UV2,
|
|
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)
|
|
],
|
|
"morph_arrays":[]
|
|
}
|
|
|
|
[sub_resource id=2 type="ArrayMesh"]
|
|
|
|
resource_name = "Cube001"
|
|
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),
|
|
null, ; No Tangents,
|
|
null, ; no Vertex Colors,
|
|
null, ; No UV1,
|
|
null, ; No UV2,
|
|
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)
|
|
],
|
|
"morph_arrays":[]
|
|
}
|
|
|
|
[sub_resource id=3 type="ArrayMesh"]
|
|
|
|
resource_name = "Plane"
|
|
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),
|
|
null, ; No Tangents,
|
|
null, ; no Vertex Colors,
|
|
null, ; No UV1,
|
|
null, ; No UV2,
|
|
null, ; No Bones,
|
|
null, ; No Weights,
|
|
IntArray(0, 2, 1, 0, 1, 3)
|
|
],
|
|
"morph_arrays":[]
|
|
}
|
|
|
|
[node type="Spatial" name="Scene"]
|
|
|
|
[node name="Lamp007" type="SpotLight" parent="."]
|
|
|
|
light_specular = 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 = 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_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_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_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_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_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="."]
|
|
|
|
mesh = SubResource(1)
|
|
visible = true
|
|
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.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="."]
|
|
|
|
light_specular = 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_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="."]
|
|
|
|
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)
|
|
|
|
[node name="Camera" type="Camera" parent="."]
|
|
|
|
far = 100.0
|
|
near = 0.1
|
|
size = 7.31429
|
|
projection = 0
|
|
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)
|