Commit graph

49 commits

Author SHA1 Message Date
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
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
Aaron Franke
208df30eeb
Improve the documentation of GLTFDocument's append methods 2023-01-15 14:27:08 -06:00
Aaron Franke
f83f13f3a2
Pass GLTFState to the export_preflight method 2022-12-11 13:22:25 -06: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
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
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
Aaron Franke
a70dce893f
Add a way to store additional data in GLTFState and GLTFNode 2022-10-15 12:04:36 -05:00
The Tophat Demon
c1a600545c GLTF imports & exports material texture filters 2022-10-03 16:20:08 -04:00
Aaron Franke
7097e8add7
Add a way to get the GLTF extensions supported by GLTFDocumentExtension 2022-09-19 19:40:06 -05:00
Aaron Franke
b72dc0de89
Make used extensions stored in GLTFState
This allows GLTFDocumentExtension classes to add to the used extensions array.
2022-09-19 19:39:49 -05:00
Aaron Franke
afe09ec914
Minor enhancements to the GLTF module (lights and docs) 2022-09-18 22:33:21 -05:00
kobewi
7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
Aaron Franke
03cd8097e1
Move GLTF camera conversion code into GLTFCamera 2022-08-28 11:18:32 -05:00
Aaron Franke
3d76b91229
Move GLTF light conversion code into GLTFLight 2022-08-28 11:18:22 -05:00
kobewi
f7f4873ed0 Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
Aaron Franke
be81b33e2b
GLTF: Fix orthographic cameras, internally store data in GLTF's format 2022-08-14 19:18:53 -05:00
Aaron Franke
3bbb50359d
Document GLTFLight and GLTFSpecGloss 2022-08-14 14:57:58 -05:00
Hakim
805ffdfbf6 Prevent AnimationPlayer from being added on GLTF import if the option is unchecked. Fixes #63954 2022-08-10 11:17:29 +02:00
Yuri Sizov
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
K. S. Ernest (iFire) Lee
d600e0bc00 Improve gltf extension GLTFDocument api. 2022-05-20 06:58:48 -07:00
reduz
e32215fbad Add Blender install autodetection and configuration.
This PR is a continuation to #54886

* Changed Blender path editor setting from binary to installation.
* Add a class to query whether the format is supported.
* This class allows to create proper editors to configure support.

**NOTE**: This PR only provides autodetection on Linux. Code needs to be added for Windows and MacOS to autodetect the Blender installation.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2022-04-01 11:01:12 +02:00
K. S. Ernest (iFire) Lee
0a6889d834 Add fbx2gltf support for importing .fbx files
Lets you drag or place .fbx files in the project folder and it will import the files.

An editor setting sets the location of the fbx2gltf binary.

Enables .fbx and .blend by default.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-03-30 15:22:46 +02:00
K. S. Ernest (iFire) Lee
9484ee7a9e Add support for importing .blend files
Lets you drag or place .blend files in the project folder and it will import the files.

Checks for Blender 3.0's gltf2 `export_keep_originals` option.

Add basepath support to GLTFDocument append_from_file.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-03-29 21:54:41 +02:00
Hugo Locurcio
b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
K. S. Ernest (iFire) Lee
d8923d8c74 Add import glb from buffer
Split functions from gltf document import and export into six functions.

Use base path to allow two code paths based on an empty base path or a full base path.

Add uri decode in _parse_buffers.
2022-01-04 06:06:03 -08:00
Lyuma
de93d48901 glTF: Fix override materials and non-empty arrays
Keep track of MeshInstance and GeometryInstance override materials in the GLTFMesh object.
Ensure all arrays are non-empty to conform with "minItems":1 in glTF spec.
2021-11-01 23:22:45 -07:00
reduz
b3bf90b3ce Add scene Post-Import Plugin support.
* New plugin system to control the whole import workflow
* Can add options and run code at every import step (general, per node, mesh, animation, material etc.)

This constitutes a first version of these plugins. The ability to interact with the import preview dialog will likely be added later on.
2021-10-15 09:12:04 -03:00
K. S. Ernest (iFire) Lee
fc1634806a Enable GLTFDocumentExtensionConvertImporterMesh only in games. 2021-10-04 09:47:34 -07:00
K. S. Ernest (iFire) Lee
1463fc889b GLTF for game templates.
Convert GLTF Document to use ImporterMeshInstance3D.

Add a GLTFDocument extension list and an extension for converting the importer mesh instance 3d to mesh instance 3d.

Use GLTF module when the editor tools are disabled.

Modified the render server to be less restrictive on matching blend arrays and have more logging.

Misc bugs with multimesh.

Always index the meshes.
2021-10-03 12:37:52 -07:00
Aaron Franke
f3e76a5397
Fix GLTF light import 2021-09-26 21:57:25 -05:00
Aaron Franke
d54f2ad7ca
Don't generate empty doc sections and reduce code duplication 2021-09-20 20:59:33 -05:00
Rémi Verschelde
13eff7de69
Merge pull request #52273 from aaronfranke/gltf-renames 2021-09-15 13:10:24 +02:00
K. S. Ernest (iFire) Lee
523b2d9199 Remove packed scene gltf
We determined through discussion that composing the packed scene from a node tree was a better design because it removed duplication of code.
2021-09-10 08:39:17 -07:00
Aaron Franke
33df50acdd
Fix missing renames in the GLTF module 2021-08-31 00:06:46 -05:00
Rémi Verschelde
7adf4cc9b5
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.
2021-07-30 15:29:52 +02:00
Michael Alexsander Silva Dias
0ff4095b36 Better format arguments in variant parser 2021-06-18 00:06:40 -03:00
Marcel Admiraal
8acd13a456 Rename Quat to Quaternion 2021-06-04 18:14:32 +01:00
Aaron Franke
0ac4051c00
Update documentation for Transform3D 2021-06-03 07:30:01 -04:00
Lyuma
e839a3291b gltf: Fix mesh nodes which are also bones.
Fix issue when two skeletons end up directly parented.
Prevent animating TRS for skinned Mesh node.
Fix animating weights on meshes with targets but no weights.
2021-05-27 19:33:01 -07:00
Rémi Verschelde
3a5929abf3
doc: Sync classref with current source 2021-03-25 12:19:51 +01:00
Rémi Verschelde
4ca1e73ff9
doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00