Commit Graph

313 Commits

Author SHA1 Message Date
f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
e06cac212b Merge pull request #99893 from kiroxas/avoidUTF8ParsingWhenNotNecessary
Avoid duplicated `utf8()` calls
2025-01-06 22:47:12 +01:00
ba8a155551 Merge pull request #98909 from demolke/master
GLTF: Don't duplicate textures when importing blend files
2025-01-06 22:46:44 +01:00
ec7d7abde9 GLTF: Always read alphaCutoff property 2025-01-02 12:53:55 -08:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
06efe84bca Remove duplicate utf8() calls 2024-12-19 10:15:46 +01:00
e649e7e3c5 GLTF: Don't duplicate textures when importing blend files
Blender imports will always start within `.godot/imported`  folder because we first convert the .blend file to .gltf, store it in `.godot/imported` and run the import from there, so on-disk resources linked from .blend files end up with duplicate textures.
2024-12-18 21:24:18 +01:00
de87ca5084 GLTF: Fix bad pointer to ImporterMeshInstance3D root node at runtime 2024-12-15 18:05:57 -08:00
b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
68f638cf02 Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
9be806aef1 Merge pull request #92986 from Repiteo/core/ref-instantiate-integration
Core: Integrate Ref `instantiate` where possible
2024-11-11 14:18:15 -06:00
3c1570721f Merge pull request #94751 from RadiantUwU/patch-2
GLTF: Return the error file path when an import fails.
2024-11-11 14:18:05 -06:00
925b690c98 Core: Integrate Ref::instantiate where possible 2024-11-10 12:41:26 -06:00
cd6dad4090 Merge pull request #98703 from pgrit/master
Set flag for 8 bone weights in GLTFDocument
2024-11-10 12:12:18 -06:00
ef8aafc2df Merge pull request #94165 from aaronfranke/gltf-khr-anim-ptr
GLTF: Implement `KHR_animation_pointer` for animating custom properties
2024-11-04 21:52:03 -06:00
02d8c6eefe GLTF: Add extract_path and extract_prefix settings
Only used by the Blender importer
2024-11-04 19:28:33 -08:00
0b7354dfa9 GLTF: Don't give up loading image if import fails 2024-11-04 19:28:18 -08:00
0513943f70 GLTF: Implement KHR_animation_pointer for animating custom properties 2024-11-04 17:55:40 -08:00
d373d207c1 GLTF: Add functions to encode and decode Variants to/from accessors 2024-11-04 17:55:40 -08:00
4b66a25f52 GLTF: Implement the glTF Object Model to support JSON pointer properties 2024-11-04 17:55:39 -08:00
cd367b3da3 GLTF: Prerequisite cleanups before KHR_animation_pointer
Add get_scene_node_path and has_additional_data to GLTFNode, remove center of mass ignore warning in physics (it's supported now), rename `d` to `mesh_dict` in mesh import code.
2024-11-04 17:55:39 -08:00
834189a618 GLTF: Clean up animation code to make way for KHR_animation_pointer 2024-11-04 17:55:38 -08:00
c7391d2ee3 GLTF: Add more accessor component types 2024-11-04 17:55:38 -08:00
4b0085ac85 GLTF: Move the component type enum into GLTFAccessor 2024-11-04 17:55:37 -08:00
a59fb07e4a set flag for 8 bone weights 2024-10-31 17:04:31 +01:00
5b0bf9e2b0 Return the actual error when an import fails. 2024-10-30 23:42:10 +02:00
4113529535 Assign the correct bone rest transform to nodes with matrix in GLTF 2024-10-07 10:19:43 -07:00
5972907612 GLTF: Add import_pre_generate and export_post_convert extension steps 2024-09-17 04:00:07 -07:00
0468bea899 Add per-bone meta to Skeleton3D
Individual bones are not represented as `Node`s in Godot, in order to support meta functionality for them the skeleton has to carry the information similarly to how other per-bone properties are handled.
- Also adds support for GLTF import/export
2024-09-16 16:26:15 +02:00
a9364a9e75 Merge pull request #96468 from aaronfranke/gltf-append-node
GLTF: Add `append_gltf_node` to GLTFState
2024-09-16 13:34:46 +02:00
b9b07d619f Merge pull request #94783 from TokageItLab/validate-gltf-anim-name
Add validation to glTF importer for Blendshape and Animation
2024-09-12 09:25:10 +02:00
f82262eecb GLTF: Add append_gltf_node to GLTFState 2024-09-02 19:05:03 -07:00
194bdde947 Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
c409e6d722 Import/export GLTF extras to node->meta
This is useful for custom tagging of objects with properties (for example in Blender) and having this available in the editor for scripting.

- Adds import logic to propagate the parsed GLTF extras all the way to the resulting Node->meta
- Adds export logic to save Godot Object meta into GLTF extras
- Supports `nodes`, `meshes` and `materials` (in GLTF sense of the words)
2024-08-29 19:17:04 +02:00
ee5e97742a Add get_supported_gltf_extensions to GLTFDocument 2024-08-28 17:54:45 -07:00
3e1b61d808 Merge pull request #95121 from aaronfranke/gltf-root-prop-owner
GLTF: Propagate owner for root node children
2024-08-19 14:34:04 +02:00
3b1345c26e Change capitalization of glTF in errors and comments. 2024-08-15 18:07:30 -07:00
246cc7e86d GLTF: Propagate owner for root node children 2024-08-04 02:28:01 -07:00
0235086c14 Add validation to glTF importer for Blendshape and Animation 2024-07-26 18:05:34 +09:00
416e63ae35 Fix handling of missing bin file in gltf separate 2024-07-18 14:04:16 +03:00
923a8eb5d3 Move GLTFAccessorType into GLTFAccessor 2024-07-04 15:46:48 -07:00
e7f34aace3 Use Hermite instead of Bezier for glTF spline interpolation 2024-06-29 14:36:49 +02:00
e09443509a Unsetting the owner of ImporterMeshInstance3D before adding it to skeleton's child 2024-06-13 12:45:55 +08:00
5a24aec599 Fix GLTFDocument so it can export CSG Meshes correctly. 2024-05-29 07:10:45 -07:00
d3a58e57b8 Rename accessor GLTFType to GLTFAccessorType, fix verbose prints, doc 2024-05-24 03:21:13 -07:00
24f56008ac Add bake_fps for FBXDocument, GLTFDocument and both import-export. 2024-05-23 09:09:36 -07:00
522f035cb1 GLTF export improvements
- GLBs produced by godot don't pass validation when there's no data in the buffer segment. The segment is dropped but the size of the chunk_header is still reported in total length (incorrectly)

- Remove empty "extensions" JSON object being appended to all nodes (if it's still empty). This is just cutting down on unnecessary bloat and consistent with the rest of the file's attempts to not emit any keys that are equal to their default value.

- Allow the case where root_nodes is empty. This is permitted by the GLTF spec. Moreover it can happen fairly naturally when using the ROOT_NODE_MODE_MULTI_ROOT root node mode on a scene with only a root node (which is valid in godot).

- Don't create an initial buffer until we're ready to write data into it (buffers of byteLength=0 don't pass validation).
2024-05-11 21:42:05 -04:00
a0dbdcc3ab Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
bb9674c1b1 Set animation step from importers. Increase default step from 10 to 30 FPS. 2024-04-19 03:02:20 -07:00