* Export from mesh.loop_triangles instead of mesh.polygons This shouldn't change anything atm since the mesh is triangulated beforehand, but this will allow us a non-triangulated mesh in the future, which avoids problems where the mesh triangulation is wrong; loop_triangles is always the "true" triangulation. * Use mesh.loop_triangles for concave_shape No longer need to ask the mesh converter to triangulate. * Triangulate meshes if necessary for tangents This means it is no longer required to ask for triangulation if asking for tangents. * Remove triangulate argument; now only triangulate for tangents It is now as if it were always False. Triangulation will only occur if needed for calc_tangents. This was only True in mesh.py. Now that it is False there, triangulate_mesh will be skipped for any meshes without (>4)-gons, which solves issues of bad triangulation/damaged normals for these meshes. * Only triangulate n-gons when we can't calc_tangents This should confine damage caused by triangulation to n-gons only. * Warn when triangulating that exported n-gons may look wrong * Test: make update-examples
Godot Engine's native Blender exporter add-on.
Native Godot scene format exporter for Blender, making the export process to Godot Engine as straightforward as possible.
Warning: This exporter is experimental, and still lacks many features. If you need a full-featured import-export pipeline, consider using glTF 2.0 instead. (The glTF 2.0 exporter is built into Blender.)
Installation
- Copy the
io_scene_godotdirectory the location where Blender stores the scripts/addons folder on your system (you should see other io_scene_* folders there from other addons). Copy the entire dir and not just its contents. - Go to the Blender settings and enable the "Godot Exporter" plugin.
- Export your file with
File->Export->Godot Engine (.escn)
If you find bugs or want to suggest improvements, please open an issue on the upstream GitHub repository.
Usage
See the documentation included in the official Godot documentation.
Development Notes
This repository includes a Makefile to assist with development. Running
make from the project root will:
- Export all of the blend files from the
tests/scenesdirectory. If you add a feature, it is suggested that you add a new blend file to thetests/scenesdirectory that uses this feature. - Runs
diffon the output files compared to the reference exports. This acts as a regression test. - Runs pycodestyle and pylint style tests. Your code must pass these to be elegible to merge.
Current regression tests use the daily build of Blender 2.8 from Blender official site and runs on ubuntu 16.04. If you run the tests with different Blender version or on different platforms, the output may slightly differ.
License
This Godot exporter is distributed under the terms of the GNU General Public License, version 2 or later. See the LICENSE.txt file for details.