Commit Graph

34 Commits

Author SHA1 Message Date
dcb6431c01 Use const ref parameters in the GLTF module 2025-11-13 18:19:26 -08:00
a5424c321e GLTF: Make handle binary image mode enum type-safe 2025-11-04 10:42:11 -08:00
e15210b466 Merge pull request #98268 from Calinou/import-export-bake-fps-add-range-hint
Add a property range hint to `bake_fps` in the scene glTF export dialog
2025-09-19 20:54:32 -05:00
02d8c6eefe GLTF: Add extract_path and extract_prefix settings
Only used by the Blender importer
2024-11-04 19:28:33 -08:00
54995d9850 Add a property range hint to bake_fps in the scene glTF export dialog
This clamps the value to a value greater than `0` (exclusive).
2024-10-17 17:00:20 +02:00
f82262eecb GLTF: Add append_gltf_node to GLTFState 2024-09-02 19:05:03 -07:00
24f56008ac Add bake_fps for FBXDocument, GLTFDocument and both import-export. 2024-05-23 09:09:36 -07:00
652ef966f9 Add new scene import option to import as Skeleton
Adds a bool import option `nodes/import_as_skeleton_bones`.
This is supported in all FBX or GLTF document based formats.
It is especially useful for retargeting and importing animations.
2024-02-26 03:06:07 -08:00
d36a34edb7 Misc changes to the GLTF module before audio PR 2024-01-11 20:33:51 -06:00
2413952a4c Fix "as" capitalization in editor strings 2023-10-23 16:10:05 +08:00
101442ced9 Expose filename in GLTFState 2023-08-03 16:38:10 -05:00
07400f2065 Add copyright to GLTFState 2023-07-10 00:24:10 -05:00
5e139c2ab9 Add a get_node_index method to GLTFState 2023-05-27 12:30:25 -05:00
9a031806bd GLTF: Delete unused skeleton_to_node 2023-02-26 15:16:31 -06:00
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
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
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
1bbbee384d GLTF: Clean up lots of includes 2022-11-29 23:11:08 -06:00
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
a70dce893f Add a way to store additional data in GLTFState and GLTFNode 2022-10-15 12:04:36 -05:00
c1a600545c GLTF imports & exports material texture filters 2022-10-03 16:20:08 -04:00
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
f7f4873ed0 Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
805ffdfbf6 Prevent AnimationPlayer from being added on GLTF import if the option is unchecked. Fixes #63954 2022-08-10 11:17:29 +02:00
00ec9321f6 GLTF: Move shared defines into a separate gltf_defines.h file
Also move GLTFDocument's template conversion functions into gltf_template_convert.h
2022-07-24 14:21:27 -05:00
d600e0bc00 Improve gltf extension GLTFDocument api. 2022-05-20 06:58:48 -07:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
44b6ee001e Discard images from gltf import for the animation library.
This is an optimization.
2022-04-23 17:41:34 -07:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
83b1acdc60 Merge pull request #45545 from abaire/relaxes_gltf_name_sanitization
Relaxes node name sanitization in gltf documents.
2021-03-09 14:54:33 +01:00
61cc1c8624 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-02-24 08:22:27 -08:00
0d1d719178 doc: Sync classref with current source
And fix various bogus bindings following previous PRs.
2021-02-19 14:39:14 +01:00
b5334d14f7 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
4b4efd2674 Add exporting glTF2.
* Support KHR_texture_transform.
* Support exporting glTF2
* Support exporting instanced scenes
* Extract into a gltf state and gltf document
* Add a tools menu for exporting gltf2
2020-12-22 16:56:28 -08:00