Ryan Roden-Corrent 274f668963 Improve our attempt at exporting SpatialMaterials. (#341)
* Attempt basic spatial material conversion.

This improves our attempt at converting several material types
(Principled, Diffuse, and Emission) to SpatialMaterials. It still leaves
a lot to be desired, but implements more than our current approach.

What works:

- Principled albedo, metallic, roughness, anisotropy, emission, and
  clearcoat. Principled does not have emission strength, so we just
  assume 1.
- Emission strength and color
- Diffuse color and roughness.

Fixes #332.

* Add alpha support for spatial materials.

Everywhere we currently export a color we use mathutils.Color, which
doesn't support alpha. This adds an RGBA type we can use to export
colors with alpha.

Maybe we could use this in other places, but I'm not sure the
implications right now.

* Null-check NodeTree in SpatialMaterial export

* Add config.json for spatial export test.

* Update tests for spatial material export.
2020-06-05 15:53:55 +08:00
2018-12-16 20:52:49 -08:00
2018-08-18 07:13:00 +08:00
2019-07-28 19:38:30 -06:00

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.

Installation

  1. Copy the io_scene_godot directory 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.
  2. Go to the Blender settings and enable the "Godot Exporter" plugin.
  3. 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.

Development Notes

This repository includes a Makefile to assist with development. Running make from the project root will:

  1. Export all of the blend files from the tests/scenes directory.
    If you add a feature, it is suggested that you add a new blend file to the tests/scenes directory that uses this feature.
  2. Runs diff on the output files compared to the reference exports. This acts as a regression test.
  3. 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.

Description
Addon for Blender to directly export to a Godot Scene
Readme 22 MiB
Languages
Python 98.7%
Shell 0.6%
Dockerfile 0.4%
Makefile 0.3%