Commit Graph

225 Commits

Author SHA1 Message Date
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
Ryan Roden-Corrent
088a64ecdf Change _loop suffix to -loop.
This is a breaking change.

For consistency with other exporters, we should use the suffix "-loop",
not "_loop", to indicate that an animation is looping. If we detect the
suffix "_loop" or any variation on the capitilization, we will print a
warning.

While we could be more flexible with the suffix and not break existing
exports, this would set the precedent for needing to support multiple
suffixes in other areas too. It seems safer to get strict as soon as we
can.

Fixes #310.
Relates to https://github.com/godotengine/godot/issues/32678.
2020-02-25 06:50:48 -05:00
Lu Jiacheng
81088123cb Merge pull request #309 from Ben1138/fix_node_tree_crash
Fix crash for potential non existent texture images.
2020-02-09 10:00:05 -08:00
Lu Jiacheng
a123e7a0cd Merge pull request #318 from mourning20s/fix-305
Bugfix for #305
2020-02-09 09:59:11 -08:00
mourning20s
c8c747733c Bugfix for #305 2020-01-21 19:17:24 -06:00
Lu Jiacheng
97244579a5 Merge pull request #283 from rcorre/geometry_shader
Implement some Geometry node shader outputs.
2020-01-11 11:00:57 -08:00
Ben1138
43d2578223 Fix crash for potential non existent texture images. 2020-01-04 19:31:00 +01:00
Lu Jiacheng
52dcb4aba3 Merge pull request #303 from Jason0214/regression-281-only
Travis: run regression tests only in 2.81 exporting
2019-12-15 17:38:37 -08:00
Jason0214
82ff6aad72 Fix material MappingNode exporting issue in 2.80
1. Fix version checking, change '<= (2, 80, 0)' to '< (2, 81, 0)'
2. Fix mathutil.Matrix() API misusage
2019-12-15 17:30:54 -08:00
Jason0214
465d8b20c1 Travis: run regression tests only in 2.81 exporting
This repo only has reference scenes exported from Blender 2.81.
Therefore, only run smoke test for 2.80 exports and run full
regression tests for 2.81 exports.
2019-12-15 16:56:30 -08:00
Lu Jiacheng
5c72113bb7 Merge pull request #291 from akien-mga/travis-blender-2.81
Travis: Add build job with Blender 2.81
2019-12-15 16:49:50 -08:00
Lu Jiacheng
2cfa12aad3 Merge pull request #299 from Jason0214/blender_281_conformance
Conformance with Blender2.81
2019-12-15 16:47:54 -08:00
Jason0214
04ab6cbcc5 Conformance with Blender2.81
1. ShaderNodeMapping socket and property change,
see https://wiki.blender.org/wiki/Reference/Release_Notes/2.81/Python_API
2. Exclude two unused input socket (dhdx, dhdy) in BumpNode
2019-12-15 14:34:29 -08:00
Ryan Roden-Corrent
7bf96d5b5e Use is_direction=True for Tangent and Normal. 2019-12-10 08:07:20 -05:00
Ryan Roden-Corrent
3775e4edc0 Merge remote-tracking branch 'upstream/master' into geometry_shader 2019-12-10 07:51:40 -05:00
Lu Jiacheng
e57d6b2298 Merge pull request #296 from Jason0214/fix_CI
Fix testing failing in CI
2019-12-08 21:59:22 -08:00
Jason0214
8ca6b07a86 Fix testing failing in CI
1. Last commit changes `spot_range` mapping from `distance` to
`cutoff_distance`, it breaks some light tests.
2. Fix a pylint line-too-long error
2019-12-08 21:50:05 -08:00
Lu Jiacheng
d2a726d2bf Merge pull request #294 from akien-mga/fix-MixRgbNodeConverter-clamp
Fix invalid substitution in MixRgbNodeConverter
2019-12-08 17:11:43 -08:00
Lu Jiacheng
11bc86ac44 Merge pull request #272 from Dentoid/lamp-distance-28-fix
Change attribute for light distance for 2.80
2019-12-08 17:10:20 -08:00
Lu Jiacheng
42e01e2e6a Merge pull request #284 from addixff/master
Fixes call to mesh.update in Blender 2.81+
2019-12-08 17:08:24 -08:00
Rémi Verschelde
acc2f38109 Fix invalid substitution in MixRgbNodeConverter 2019-11-22 14:27:16 +01:00
Rémi Verschelde
0ed31b2a0f Travis: Add build job with Blender 2.81 2019-11-22 12:30:22 +01:00
Rémi Verschelde
90973e31c2 Merge pull request #289 from akien-mga/fix-style
Fix style issues causing CI failure
2019-11-22 12:15:37 +01:00
Rémi Verschelde
63d3a2c15d Fix style issues causing CI failure
For the C code we disable the PEP8 check on the long lines.
An alternative would be to wrap before `out float result`, possibly
with a double indentation.

Fixes:
```
io_scene_godot/converters/material/script_shader/shader_functions.py:467:80: E501 line too long (80 > 79 characters)
io_scene_godot/converters/material/script_shader/shader_functions.py:485:80: E501 line too long (81 > 79 characters)
io_scene_godot/converters/material/script_shader/shader_functions.py:491:80: E501 line too long (84 > 79 characters)
io_scene_godot/converters/material/script_shader/shader_functions.py:554:80: E501 line too long (81 > 79 characters)
io_scene_godot/converters/material/script_shader/shader_functions.py:563:80: E501 line too long (82 > 79 characters)
io_scene_godot/converters/material/script_shader/shader_functions.py:647:80: E501 line too long (81 > 79 characters)
```
```
io_scene_godot/__init__.py:214:12: C0415: Import outside toplevel (%s) (import-outside-toplevel)
io_scene_godot/__init__.py:272:4: C0415: Import outside toplevel (%s) (import-outside-toplevel)
```
2019-11-22 12:11:24 +01:00
addixff
7b20b2fb4e Fix for Blender 2.81 2019-10-05 21:05:01 +02:00
Ryan Roden-Corrent
236ab0d482 Fix pylint errors on shader_functions. 2019-09-27 06:29:18 -04:00
Ryan Roden-Corrent
6b2decd37f Implement some Geometry node shader outputs.
Implements a subset of the geometry shader node outputs that trivially
map to godot shader inputs.

See #280.
2019-09-26 22:41:43 -04:00
Lu Jiacheng
8c7859792d Merge pull request #275 from fx21/feature/shader-math-nodes
Shader math nodes
2019-09-25 21:01:05 -07:00
Lu Jiacheng
2617236404 Merge pull request #276 from Jason0214/optional_mat
Add option to export Material as Spatial Material
2019-09-03 09:43:36 -07:00
Fredrik Holmar
3e6837fc0f Added shader math nodes 2019-09-03 16:29:14 +02:00
Jason0214
e7a4f3b963 Use Blender2.80 stable build for travis CI
Blender API is keep changing in Blender master branch, which makes it
hard to do regression tests. Here, switch back to Blender2.80 stable
for all the testing. Will consider testing with up-to-date API when
Blender2.81 releases.
2019-09-02 23:02:41 -07:00
Jason0214
a55346d137 Add option to export Material as Spatial Material 2019-09-02 11:11:37 -07:00
Anders Stenberg
549c03a0a3 Change attribute for light distance for 2.80 2019-08-24 22:15:23 +02:00
Lu Jiacheng
4390c63c9c Merge pull request #271 from Dentoid/fix-dodgy-parentheses
Fix dodgy parentheses
2019-08-24 13:58:57 -06:00
Anders Stenberg
b12820e310 Fix dodgy parentheses 2019-08-24 16:56:05 +02:00
Lu Jiacheng
1eb6c32f01 Merge pull request #263 from Jason0214/fix_default_uv
Use UV for image texture with no tex coord input
2019-08-18 22:54:17 -06:00
Lu Jiacheng
9395007d3e Merge pull request #262 from Jason0214/fix_crashing_in_hash
Convert iterable property to tuple in MeshKey hash
2019-08-18 22:37:16 -06:00
Lu Jiacheng
2cd4cb1cda Merge pull request #261 from Jason0214/fix_axis_angle
Support rotation mode 'AXIS_ANGLE'
2019-08-18 22:36:53 -06:00
Jason0214
48a4920bb3 Use UV for image texture with no tex coord input
Previously when no texture coordinate input for ImageTexture, always
defaults to Blender Generated Coordinates. However, it is not consistent
with Blender's behaviour, which defaults use UV.
2019-08-18 22:32:08 -06:00
Jason0214
a9ffdacc3e Support rotation mode 'AXIS_ANGLE' 2019-08-18 16:32:19 -06:00
Jason0214
4bc38ca0d6 Convert iterable property to tuple in MeshKey hash
Fix the issue that when hashing modifiers in constructing a MeshKey,
some iterable properties are not hashable and crash the exporter.
2019-08-18 16:29:12 -06:00
Lu Jiacheng
9c4d1874a3 Merge pull request #245 from Jason0214/fix_concave_collision
Generate concave shapes has godot does
2019-08-04 14:02:52 -06:00
Andrea Catania
89f07c64ab Generate concave shapes has godot does
Generate concave shapes with inverted faces as Godot does
2019-08-04 13:57:19 -06:00
Lu Jiacheng
27830975ae Merge pull request #243 from Jason0214/fix_physics_crash
Fix crash on sharing Concave/Convex collision mesh
2019-08-04 13:47:28 -06:00
Lu Jiacheng
33d549d5aa Merge pull request #244 from Jason0214/fix_material_crash
Fix export crash on RGB and Value const node
2019-08-04 13:43:43 -06:00
Jason0214
bae7431678 Refactor CollisionShape generating in physics
1. Remove triangulating in exporting any convex CollisionShape
2. Add utils to reuse mesh exporting related functions in CollisionShape
exporting
2019-08-04 13:42:46 -06:00
Jason0214
de3815fa51 Fix crash on sharing Concave/Convex collision mesh 2019-08-03 23:29:47 -06:00
Jason0214
e3d07ece80 Fix export crash on RGB and Value const node
1. Fix crash on RGB and Value const node by adding a new identifier
2. Add support for limited blend type of MixRGB shader node, including
blend type (MIX, ADD, SUB, MUL, DIV, DIFF, DARKEN, LIGHTEN)
2019-08-03 23:23:25 -06:00