273 Commits

Author SHA1 Message Date
Lu Jiacheng
2394c7a371 Merge pull request #421 from widiba03304/master
Fix use_inherit_scale deprecation, which is removed in 4.0
2024-01-06 16:06:50 +08:00
Minjae Kim
2db443a23a fix use_inherit_scale deprecation 2024-01-06 04:10:41 +09:00
Lu Jiacheng
b8b883df64 Merge pull request #411 from timjklein36/tk/blender-3
Rough update to work with Blender 3.0
2021-12-26 00:04:07 +08:00
Tim Klein
1e0d104df5 [-] Fix version check for mesh update to work with blender 3.0
- Also, add alternative property introspection for io_scene_godot.export
  that will work with Blender 3.0
2021-12-23 14:34:30 -05:00
Lu Jiacheng
c1136facd9 Merge pull request #406 from HenryWConklin/empty-draw-type
Store the draw type when exporting empty nodes to support -colonly
2021-08-28 20:43:26 +08:00
Henry Conklin
eaf80e476a Store the draw type when exporting empty nodes
Supports using empties as placeholders for collision shapes
2021-08-28 06:58:18 -04:00
Willian Galvani
0fc4d15915 add ShaderFunction for vector element-wise multiplication (#376) 2021-07-29 23:21:48 +08:00
Wagner
3b0870e7d4 Added 2 new blender nodes and fixed some Godot shader issues (#405)
* 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
2021-07-29 23:20:38 +08:00
Rodrigo Ceccato de Freitas
881e8da6dd Fix small typo in instructions (#402) 2021-07-02 21:35:29 +02:00
Lu Jiacheng
95fde85e03 Merge pull request #396 from timjklein36/tk/bugfix-docker-build
Fix Docker Build Upgrading Python to 3.6
2021-03-07 20:34:04 +08:00
Lu Jiacheng
fbc380b678 Merge pull request #397 from timjklein36/tk/bugfix-correct-bone-order
Ensure armature bones are exported in hierarchical order
2021-03-07 11:12:20 +08:00
Tim Klein
44a894f2ee [-] Add ordered_bones method to ensure bone order matches armature hierarchy
- 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.
2021-03-05 21:51:44 -05:00
Tim Klein
35b6da5f57 [-] Update default PYLINT command in entrypoint script
- Also, update README to include working docker command examples
2021-03-04 15:58:04 -05:00
Tim Klein
346d601515 [-] Upgrade Python for test Docker image to 3.6 2021-03-04 14:16:03 -05:00
Celpec
aba3cfaf3f fix 'struct rna of ExportGodot removed' error (#393)
* fix 'struct rna of ExportGodot removed' error if upexpected error occured while exporting

* Update __init__.py

* Update __init__.py

* Update __init__.py

Co-authored-by: U-TTE\celpec <celpecgame@gmail.com>
2021-02-11 10:47:35 +08:00
Lu Jiacheng
be76c4e7d1 Merge pull request #388 from rcorre/docker
Add a Dockerfile for local reference updates.
2021-01-05 21:44:59 +08:00
Lu Jiacheng
cc0478a931 Merge pull request #390 from rcorre/ngons-warning
Add mesh name to n-gon warning message.
2021-01-05 21:44:38 +08:00
Ryan Roden-Corrent
c0d5ac9df9 Add mesh name to n-gon warning message.
This makes it easier for the user to figure out which mesh was
troublesome.
2021-01-04 17:58:33 -05:00
Ryan Roden-Corrent
47cca0e758 Add a Dockerfile for local reference updates.
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.
2021-01-04 10:40:49 -05:00
Ryan Roden-Corrent
0a662248ad Fix make update-examples.
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.
2021-01-04 10:40:18 -05:00
William Tambellini
cffee6be46 Add installation details and Blender compatibility to README (#358)
- screenshot
- detail instructions
- warning on blender version
2021-01-03 22:52:40 +01:00
Ryan Roden-Corrent
3e66e12d7c Export Curve objects as Godot Path nodes. (#380)
* 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.
2020-12-16 22:01:53 +08:00
Lu Jiacheng
0619f241ee Add script to generate a scene diff for a failed regression test (#384) 2020-12-15 22:34:24 +08:00
Lu Jiacheng
1c6a3b8ff9 Filter out colon in node path, which is also invalid in latest Godot. (#383)
Also rewrite node name filtering using filter() to be concise.
2020-11-26 23:42:45 +08:00
scurest
a35395770c Only triangulate n-gons when necessary for calc_tangents (#379)
* 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
2020-11-26 00:30:36 +08:00
Ryan Roden-Corrent
27ffa28078 Set physics properties on a PhysicsMaterial. (#365)
* 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.
2020-11-22 14:30:02 +08:00
Ryan Roden-Corrent
70df7d8a1b Update make update-examples to handle nested directories (#382)
Since the tests were nested, `make update-examples` no longer worked.
This updates the make rule to handle the nested directories.
2020-11-18 14:29:30 +01:00
Ryan Roden-Corrent
80816c386b Normalize line endings in multimesh.py (#381)
multimesh.py was the only python file with CRLF line endings.
2020-11-15 18:16:37 +01:00
epth
a01b0e9ae3 add feature - export particle objects as multimeshinstance to godot (#354)
* add feature particle to multimeshinstance

* fix exporting single object particle will cause error

* fix wrong scale that will scale postion before

* fix for reveiwing

* fix for reveiwing

* pep8

* pep8 line length

* pep8 indent

* mat4 changes and change export particle from active to all

* fix active

* fix wrong

* fix pep8 error

* fix pep8 error ..

* fix pep8 error ...

* Simplify MultiMeshResource key.

* Wrap too-long lines.

Co-authored-by: U-APPLE\celpec <celpecgame@gmail.com>
Co-authored-by: Lu Jiacheng <lujc.me@gmail.com>
2020-11-13 21:51:18 +08:00
Lu Jiacheng
61e55f2905 Merge pull request #366 from xphlawlessx/master
Added export option for excluding objects hidden during rendering.
2020-11-01 10:59:11 +08:00
Lu Jiacheng
e6d1f49393 Merge pull request #362 from rcorre/better-light-warning
Clarify warning message for unsupported light.
2020-10-31 22:09:01 +08:00
Lu Jiacheng
5dc8099119 Merge pull request #359 from carrascomj/fix-build
update pylint dependency for build
2020-10-31 22:07:41 +08:00
Hugo Locurcio
959ac50666 Make the "experimental" signaling more prominent in the README (#370)
This also mentions glTF 2.0 which is the most full-featured alternative
currently available.
2020-10-21 14:13:21 +02:00
Hugo Locurcio
25923bb41f Merge pull request #377 from Williangalvani/fixci2
Fix CI
2020-10-20 14:22:43 +02:00
Willian Galvani
6083284095 Add missing material properties to contraint_with_underform_bone.escn 2020-10-19 22:00:07 -03:00
Hugo Locurcio
85ab76613a Merge pull request #369 from Williangalvani/parentisnone
Check if object has parent instead of checking if parent is None
2020-10-13 23:45:29 +02:00
Hugo Locurcio
83e64753b6 Merge pull request #368 from Williangalvani/fixci
Update pylint to 2.5.3
2020-10-13 13:44:43 +02:00
Willian Galvani
a14114c497 Check if object has parent instead of checking if parent is None 2020-10-12 22:59:16 -03:00
Willian Galvani
0ed69c1df4 Update pylint to 2.5.3
This should fix the "Cannot import name 'SortImports' from 'isort'"
issue caused by isort 5.0
2020-10-12 22:41:42 -03:00
xphlawlessx
d7a2d5fe6f Added export option for excluding objects hidden during rendering. Should fix Issue #314 2020-10-07 19:54:09 +01:00
Ryan Roden-Corrent
9a11f369a0 Clarify warning message for unsupported light.
Previously the warning read
"Unknown light type. Use Point, Spot or Sun: Area", which is vague it
looks like Area is part of the supported types.
2020-09-07 07:13:15 -04:00
carrascomj
4a33b85f8b update pylint dependency for build 2020-08-17 10:00:17 +02:00
Hugo Locurcio
564aa4f56c Fix trailing parenthesis in the README 2020-07-26 14:21:23 +02:00
Hugo Locurcio
be2a76a72a Merge pull request #350 from rcorre/patch-1
Link to docs from README.
2020-07-26 14:20:38 +02:00
Ryan Roden-Corrent
24789c2852 Link to docs from README.
Fixes #349, and other issues where users have been unaware of this doc.
2020-06-12 13:22:42 -04:00
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
sdfgeoff
73a57b3f3d Merge pull request #290 from akien-mga/authors
Add Jiacheng and Geoffrey as authors
2020-06-02 15:05:06 +12:00
Jason0214
61dfeb1b35 Fix import order in animation to make pylint happy
Also reorder style-test to the front of exporting diff test.
2020-02-26 20:48:48 -08:00
Jason0214
5b57e6981f Fix regression test looped animation exporting
Loop suffix is changed from '_loop' to '-loop', update reference scene
accordingly.
2020-02-25 23:14:46 -08:00
Lu Jiacheng
b7e9f75c1a Merge pull request #327 from rcorre/loop-suffix
Change _loop suffix to -loop.
2020-02-25 23:13:18 -08:00