* Added HueSaturation and Invert (only for color input) nodes
Fix normal mapping node to Godot shader
Fix albedo textures not receiving hint_albedo in Godot
* convert tabs into spaces
- This is done for the iteration during `generate_bones_mapping`.
- Adds a test export blend file and reference export escn file.
- Another reference export needed to be updated due to a new (correct)
bone order upon export, but does not affect the rest of that test.
This allows local users to test and generate reference exports without
installing a specific version of Blender locally.
Linting currently doesn't work due to a python version mismatch.
The existing script had some limitations:
- It expected a certain level of nesting, and failed for
tests/test_scenes/material_cycle/material_spatial/ due to the extra
level of nesting
- It only copied `.escn` files, but we actually need to make sure other
files (like `.png` textures) are produced
- It would not clean up files left behind from prior runs. For example,
if an update failed to produce a `.png`, but we had it left from the
prior run, we wouldn't notice.
The `rm`/`cp` approach is simpler and solves these problems.
* Export Curve objects as Godot Path nodes.
Fixes#330.
Relates to godotengine/godot-proposals#527.
Previously, curves in blender were exported to meshes in Godot.
Now, a bezier curve created in blender will be exported as a Path node
with a Curve3D resource matching the blender data. The curve will have a
child MeshInstance that renders the bevel.
Only bezier curves are exported to Godot Path nodes. Other curves, such
as Nurbs, export only as meshes as they did previously.
* Export all splines but only assign the active one.
* Remove curve test scenes for now.
They are generated with too recent of a blender version. We'll add them
again after bumping the blender CI version.
* Fix pylint warnings.
* 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
* Don't set friction/bounce on KinematicBody.
These are properties only of Rigid and Static bodies.
* Set physics properties on a PhysicsMaterial.
```
The method set_friction has been deprecated and will be removed in the future, use physics material instead.
The method set_bounce has been deprecated and will be removed in the future, use physics material instead.
```
Fixes#364.
* 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.