Commit Graph

100 Commits

Author SHA1 Message Date
clayjohn 07546006e8 Fix crash when importing a surface with no UVs after another surface in the same OBJ file that had UVs 2024-09-20 19:29:11 -07:00
Aaron Franke b0f99099b4
Add "Use Node Type Suffixes" scene import option 2024-09-09 01:12:14 -07:00
Rémi Verschelde 82688e9e2e
Merge pull request #96094 from SaracenOne/add_3d_skeleton_to_advanced_importer
Add 3D Skeleton Preview to Advanced Importer
2024-09-08 23:21:28 +02:00
Saracen 6532eff7a7 Various improvements to advanced importer skeleton preview.
Better size calculation in advanced importer preview.
Uses the skeleton mesh to calculate the scene's bounding box.
This improves some situations where a mesh instances' scale
does not match its visual representation when a skeleton
is applied.

Advanced importer skeletal preview UX improvement.
Make the visibility of the skeletal preview in the advanced importer
when selecting an animation dependent on a new dedicated toggle button
rather than carrying over whether a skeletal node was or was not previously
selected before selecting the animation.

Advanced importer skeletal preview fix.
Fixes the preview on scaled skeletons in the advanced importer by applying the node's scale
to the preview and generating a skin for it.
2024-09-07 02:09:47 +01:00
Rémi Verschelde d15de6f264
Merge pull request #96292 from AThousandShips/null_check_ref_fix
Cleanup of raw `nullptr` checks with `Ref`
2024-09-03 16:13:55 +02:00
Saracen 107f2aea88 Enforce correct type for silhouette filter. 2024-08-31 20:35:09 +01:00
A Thousand Ships 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
Rémi Verschelde 7f86ca057a
Merge pull request #96308 from SaracenOne/attempt_to_reset_imported_scene
Attempt applying RESET pose during import.
2024-08-30 09:59:59 +02:00
Saracen 31253257b3 Attempt applying RESET pose during import. 2024-08-29 22:58:26 +01:00
demolke 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
Aaron Franke 9dd71c6414
ResourceImporterScene: Replace animation bool with an import type string enum 2024-08-27 14:58:18 -07:00
Jeronimo Schreyer 030fd71da2 add support for visualizing bones in Advanced Import Settings
When an imported model Skeleton3D type node is selected, the bones are drawn using lines or octahedrons to provide a clearer reference to their position.
Refactored Skeleton3DGizmoPlugin::redraw now uses a static function to generate bone meshes
2024-08-27 02:10:16 +01:00
Rémi Verschelde 7e8fffa008
Merge pull request #96122 from SaracenOne/fix_post_import_regression
Prevent empty post-import script paths throwing errors.
2024-08-26 22:46:14 +02:00
Saracen 2453911013
Revert "Fix importer preview for models with scaled armatures"
This reverts commit 06709e6865.
2024-08-26 22:25:25 +02:00
Saracen 064f471103 Prevent empty post-import script paths throwing errors. 2024-08-26 16:42:39 +01:00
Rémi Verschelde ac4410ce34
Merge pull request #96079 from adamscott/relative-import-script-path
Add import tab `import_script/path` relative path support
2024-08-25 22:24:28 +02:00
Adam Scott 7e580150f9
Add import tab "import_script/path" relative path support 2024-08-25 12:50:50 -04:00
Saracen 06709e6865 Fix importer preview for models with scaled armatures. 2024-08-25 13:15:26 +01:00
Arseny Kapoulkine 0fde03c0e0 Optimize base and shadow meshes for cache
Previously, vertex cache optimization was ran for the LOD meshes, but
was never ran for the base mesh or for the shadow meshes, including
shadow LOD chain (shadow LOD chain would sometimes get implicitly
optimized for vertex cache as a byproduct of base LOD optimization, but
not always). This could significantly affect the rendering performance
of geometry heavy scenes, especially for depth or shadow passes where
the fragment load is light.
2024-08-16 07:36:12 -07:00
Rémi Verschelde 5847d362de
Merge pull request #95505 from lyuma/import_null_external_animation_library
Avoid `[]` for `external_animation_library` import option
2024-08-16 14:35:20 +02:00
Rémi Verschelde e52cf86661
Merge pull request #94100 from Calinou/obj-import-remove-unused-optimize-mesh
Remove unused Optimize Mesh import option from OBJ mesh import
2024-08-16 10:34:16 +02:00
Rémi Verschelde e58a7530aa
Merge pull request #93727 from zeux/raycast-opt
Disable normal raycaster for LOD generation by default
2024-08-16 10:34:03 +02:00
Lyuma e7de6f8725 Avoid [] for external_animation_library import option
Some uses of operator[] were causing "rest_pose/external_animation_library": null to be added to the .import file.
2024-08-13 17:53:46 -07:00
Rémi Verschelde 39fc116c5f
Merge pull request #94968 from jsjtxietian/obj-import
Fix obj's name set in wrong order when importing
2024-08-12 18:24:27 +02:00
Rémi Verschelde 9fe4cb6a76
Merge pull request #93284 from rune-scape/missing-import-settings-crash
Avoid crashing when scene import settings are empty
2024-07-31 11:37:34 +02:00
jsjtxietian eab49cf256 Fix obj's name set in wrong order when importing 2024-07-31 14:50:02 +08:00
Rémi Verschelde 2380ed5e1b
Merge pull request #94058 from Hilderin/fix-scene-project-importation-settings
Fix missing options in Project Import Defaults
2024-07-17 11:42:59 +02:00
Hilderin 169e732518 Fix missing options in Project Import Defaults 2024-07-09 09:33:39 -04:00
Hugo Locurcio bbf68306c5
Fix error message being printed when importing an OBJ with no surfaces
An OBJ with no surfaces is valid, and typically happens when
you import an OBJ mesh with no associated MTL file.
2024-07-08 23:14:52 +02:00
Hugo Locurcio 5ee4100e4c
Remove unused Optimize Mesh import option from OBJ mesh import
This option was enabled by default, but it did nothing regardless
of whether it was enabled or not.
2024-07-08 22:58:51 +02:00
Arseny Kapoulkine a13a64eacd Disable normal raycaster for LOD generation by default
Normal raycaster makes LOD generation process >2x slower and often
generates normals that look significantly worse compared to what the
simplifier comes up with by default. This was likely different before
last meshoptimizer upgrade, as the attribute metric was not functioning
properly, but now it looks like it's doing more harm than good.

This change makes it disabled by default but keeps an easy option to
re-enable it per mesh using LOD parameters for now until we get more
confidence and can remove the code outright.

Because the long term plan would be to disable this feature entirely,
the scripting API isn't changed, and it's just off-by-default there with
no way to re-enable.
2024-07-02 10:18:15 -07:00
Bastiaan Olij ab0c974f28 Fix default collision shape on imported rigidbody 2024-06-24 10:16:58 +10:00
Rémi Verschelde 558054f707
Merge pull request #92640 from AThousandShips/text_value_changed_sname
[Scene] Add `SceneStringNames::text/value_changed`
2024-06-19 10:10:00 +02:00
Rémi Verschelde 0cc321b144
Merge pull request #92639 from AThousandShips/confirmed_sname
[Scene] Add `SceneStringNames::confirmed`
2024-06-19 10:09:56 +02:00
A Thousand Ships fbb879debd
[Scene] Add `SceneStringNames::text/value_changed` 2024-06-19 09:44:38 +02:00
A Thousand Ships ca18a06ecb
[Scene] Add `SceneStringNames::confirmed` 2024-06-19 09:40:54 +02:00
tamas e19f0042ca Retain meta data set on imported nodes
During the import process, many importer nodes are replaced with their
engine node counterparts. For example, ImporterMeshInstance3D is
replaced with a MeshInstance3D node. Any meta data set on these
importer nodes, i.e. through a GLTFDocumentExtension, are lost during
the conversion. This change copies over any meta data set on these
importer nodes to their engine counterparts.
2024-06-18 12:39:34 -05:00
rune-scape b303e73877 avoid crashing when scene import settings are empty 2024-06-17 18:13:09 -07:00
Yuri Rubinsky 29fa291317 Fix incorrect camera transform of animation view in the import window 2024-06-10 16:09:36 +03:00
Rémi Verschelde 9c87e8c7b4
Merge pull request #91953 from AThousandShips/use_normal_sname
Use `CoreStringNames::normal` in more places
2024-05-31 14:16:05 +02:00
A Thousand Ships cade5b88d9
Use `CoreStringNames::normal` in more places 2024-05-30 22:57:54 +02:00
A Thousand Ships 755a0efbb6
[Scene] Add `SceneStringNames::id_pressed` 2024-05-30 22:54:04 +02:00
Rémi Verschelde 782a0261cb
Merge pull request #92196 from lyuma/gltf_anim_library_import_as_bones
Support Import As Skeleton Bones on glTF and AnimationLibrary import
2024-05-23 08:59:13 +02:00
Lyuma c433754d34 fbx: change import option defaults
ufbx has special logic to handle animation/trimming, and most users expect trimming to be on.
For existing projects, we should upgrade files0 to FBX2glTF to preserve node compatibility.
2024-05-21 07:58:36 -07:00
Lyuma ef486db569 Support Import As Skeleton Bones on glTF and AnimationLibrary import 2024-05-21 03:19:35 -07:00
Lyuma 25ddb3dd7f rest fixer: Apply orthonormalized scale to anims
Adjust the logic for position and scale animation tracks in the Apply Node Transforms case
To match how we adjust bone pose/rest, use basis.orthonormalized() for parentless bones.
2024-05-16 02:45:42 -07:00
A Thousand Ships ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde a9a1d0a162
Merge pull request #91619 from AThousandShips/find_improve
Replace `find` with `contains/has` where applicable
2024-05-08 14:35:44 +02:00
A Thousand Ships b4c6cc7d82
[Core] Add case-insensitive `String::containsn` 2024-05-08 12:48:01 +02:00