Commit graph

268 commits

Author SHA1 Message Date
Aaron Franke
9a031806bd
GLTF: Delete unused skeleton_to_node 2023-02-26 15:16:31 -06:00
Rémi Verschelde
fe08570ac5
Merge pull request #73667 from aaronfranke/gltf-unused-joint-bool
Remove unused joint boolean in GLTFNode
2023-02-21 08:47:15 +01:00
Aaron Franke
84658b47ca
Remove unused joint boolean in GLTFNode 2023-02-21 00:48:02 -06:00
Lyuma
1c090d37b4 fbx: Set base_dir correctly in append_from_scene 2023-02-20 16:32:27 -08:00
Rémi Verschelde
1f6a5426e2
Merge pull request #73345 from TokageItLab/gltfimport
Fix gltf import generate_scene() option
2023-02-15 09:53:22 +01:00
Silc Renew
4970c27ff5 Fix gltf import generate_scene() option 2023-02-15 17:43:34 +09:00
K. S. Ernest (iFire) Lee
28a340bf3b For basisu avoid inserting to the image array twice.
Basisu images were getting referenced incorrectly like set black or set as not transparent.
2023-02-14 17:22:36 -08:00
K. S. Ernest (iFire) Lee
dbc1e94695 Fixes for gltf export.
* Fix null crashes.
* Bake tracks
* Add some error messages.
2023-02-07 11:57:25 -08:00
Rémi Verschelde
6e2b9b3bdc
Merge pull request #72802 from RedMser/blender-rpc-error-handling
Better error handling for Blender RPC import
2023-02-06 22:45:18 +01:00
RedMser
8f099c7de3 Better error handling for Blender RPC import
- If RPC import fails, then try a direct import as well. While it's
 slower, it may be better than failing the import completely.
- Connection errors will disable RPC automatically, to avoid having to
wait the full 30 seconds timeout each time.
  This should be properly fixed by allowing to override the timeout
per HTTPClient.
2023-02-06 18:23:20 +01:00
Lyuma
5fbcb80170 Use reimport_append api for importing embedded gltf images
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-02-06 07:11:45 -08:00
Rémi Verschelde
c40020513a
Merge pull request #72440 from V-Sekai/gltf_embed_as_uncompressed
gltf: Add GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_UNCOMPRESSED
2023-02-01 12:10:13 +01:00
Lyuma
bc24d01359 gltf: Add GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_UNCOMPRESSED
This option allows for a safe fallback for embedded gltf textures in cases where VRAM compression is not needed.
Add an is_editor_hint guard around GLTFHandleBinary::HANDLE_BINARY_EXTRACT_TEXTURES, to use EMBED_AS_UNCOMPRESSED by default at runtime.
This provides an option for pixel art to be stored losslessly.
Additionally, respect project importer defaults for texture import settings.
Avoid writing and reimporting extracted textures identical to version on disk.
2023-02-01 01:42:36 -08:00
Rémi Verschelde
9b0f194bbb
Fix blend runner copyright headers 2023-02-01 09:39:31 +01:00
Rémi Verschelde
d29036bcda
Merge pull request #69319 from RedMser/blender-import-rpc
Batch import Blend files using XML RPC
2023-02-01 08:21:16 +01:00
Raul Santos
9e9eac4676
Use enum instead of int in virtual methods return type 2023-01-31 19:06:49 +01:00
Rémi Verschelde
68cee1f02a
Merge pull request #72201 from fire/gltf-extract-img
Restore gltf embedded scenes due to problems with textures.
2023-01-31 13:18:37 +01:00
K. S. Ernest (iFire) Lee
39ef247721 gltf: Avoid using base64 hash as an image filename
Consistently use the images.name property with deduplication, or else the image index.
2023-01-31 02:30:16 -08:00
Silc Renew
8b3be51d17 Add remove immutable tracks option to glTF importer
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2023-01-30 08:57:27 +09:00
Rémi Verschelde
518b9e5801
Add missing classref changes after #62942 2023-01-27 12:07:53 +01:00
Rémi Verschelde
9d555f5c68
Merge pull request #62499 from fire/gltf-binary-img-compression
Handle gltf binary images
2023-01-27 11:35:55 +01:00
Rémi Verschelde
8b662c763e
Merge pull request #72162 from lyuma/skeleton_rename
Make BoneAttachment3D and Skeleton3D names consistent.
2023-01-27 11:24:34 +01:00
K. S. Ernest (iFire) Lee
39922d7167 Handle gltf binary
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ]

Enable compressed mip maps from Basis Universal for faster compressions.

Increase the quality of Basis to avoid corruption.

To keep compatibility use the first mip of the previous internal Godot format.

Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27 02:02:02 -08:00
Lyuma
3f4ea98b34 Make BoneAttachment3D and Skeleton3D names consistent.
BoneAttachment3D nodes are now named as their bone name.
Resolves cases where BoneAttachment3D nodes will have arbitrary names like BoneAttachment3D6
Reserve the name "Skeleton3D" and use this name for all generated Skeleton3D nodes.

This change will break existing imported scenes with more than one skeleton and/or bone attachments.
2023-01-26 23:25:33 -08:00
Lyuma
03bd1da32b Avoid nested skeletons, and handle skinned meshes with children.
Recursively adds child nodes into each skeleton. This should prevent nested skeletons and avoid bone attachments for leaf bones.

In cases where a skinned mesh has children, creates two scene nodes with the same name, which both will represent this single gltf node.
Because blend shape animations must target the mesh, adds a separate mapping for ImporterMeshInstance3D node references.

This change will break existing imported scenes with bone attachments and more than one skeleton.

Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-01-26 22:41:58 -08:00
SaracenOne
03523572b9 Adds missing method call to set blendshape tracks as 'imported' when importing from a GLTF. 2023-01-23 07:40:06 +00:00
K. S. Ernest (iFire) Lee
a103400871 Fixes cases where the runtime ResourceLoader cannot load gltf images. 2023-01-19 09:10:28 -08:00
Aaron Franke
208df30eeb
Improve the documentation of GLTFDocument's append methods 2023-01-15 14:27:08 -06:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
James Mintram
897de50d71 Update stale node ref after replace_by in GLTF importer 2023-01-01 20:14:33 +00:00
reduz
e93d991329
Add a dialog for customizing FBX import
* If FBX files are found, a dialog will pop up asking to configure FBX2glTF.
* Dialog can also be accessed by going Editor -> Configure FBX Import.
* The dialog also shows a link to click to download the converter, which
  should contain instructions.
2022-12-18 01:08:54 +01:00
Quentin Guidée
b14c87cb92
glTF: Fix export crash with a ShaderMaterial (fixes #70159) 2022-12-17 10:03:42 -05:00
RedMser
ba388d09b4 Batch import Blend files using XML RPC
This improves performance when importing many Blender files, as it
avoids waiting for Blender to startup every time.
Old logic is still available by setting the RPC port setting to 0.
2022-12-15 18:27:02 +01:00
Aaron Franke
f83f13f3a2
Pass GLTFState to the export_preflight method 2022-12-11 13:22:25 -06:00
Aaron Franke
5c48dfac48
Consistently use p_ for parameters in GLTFDocument 2022-12-10 16:07:17 -06:00
Rémi Verschelde
0c1273629d
Merge pull request #69372 from aaronfranke/gltf-cleanup
GLTF module: Clean up lots of includes
2022-12-10 10:48:14 +01:00
Eduard Zalyaev
627b9ca049 EditorSceneFormatImporterGLTF: check if "animation/trimming" parameter from import settings exists
Fixes godotengine#69625
2022-12-06 19:11:21 +03:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
Aaron Franke
1bbbee384d
GLTF: Clean up lots of includes 2022-11-29 23:11:08 -06:00
Rémi Verschelde
09e1db2148
Merge pull request #68665 from TokageItLab/cut-unkeyed-gltf-anim
Add "Trimming" option to cut un-keyed timeline before first key in glTF animation
2022-11-29 16:51:56 +01:00
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
Silc Renew
db7473672f Add trimming option to cut un-keyed timeline before first key in gltf 2022-11-29 13:53:33 +09:00
Rémi Verschelde
06bdc91afd
Merge pull request #69083 from fire/abstract_gltf_material
Cache materials in gltf as the abstract class of Material in GLTFDocument
2022-11-24 18:54:25 +01:00
K. S. Ernest (iFire) Lee
baab97302a Cache materials in gltf as the abstract class of Material
Use the abstract material class instead of BaseMaterial3D. This allows inserting ShaderMaterials into gltf. Like in VRM.
2022-11-24 09:00:09 -08:00
RedMser
9c50e99c5c Add unregister for GLTFDocumentExtension 2022-11-22 21:46:59 +01:00
Aaron Franke
98ef359240
Add three new methods to GLTFDocumentExtension 2022-11-21 14:38:46 -06:00
K. S. Ernest (iFire) Lee
5aafa3f54a Add GLTFDocument documentation.
Co-authored-by: Meow <mosesturner@protonmail.com>
Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2022-11-20 14:51:41 -08:00
Rémi Verschelde
d5d83eefd3
Merge pull request #66026 from aaronfranke/gltf-extension
Change the way GLTFDocumentExtension classes are registered
2022-11-20 11:44:05 +01:00
trollodel
ba9e619b51 Use forward-declarations in EditorPlugin where possible 2022-11-11 20:25:51 +01:00
Aaron Franke
73c673a614
Change the way GLTFDocumentExtension classes are registered
Also move GLTFDocumentExtension into the extensions folder
2022-11-09 20:58:48 -06:00