1
0
Fork 0
Commit Graph

1142 Commits

Author SHA1 Message Date
kobewi 06b2c9f23f Fix save path validation for imported scenes 2025-01-30 23:27:36 +01:00
Rémi Verschelde 21fcb56547 Remove unused `EditorSceneFormatImporter::_get_import_flags`
This has never been used since Godot was open sourced.

Import flags are used but directly through `_import_scene`.
2025-01-14 16:57:06 +01:00
Saracen 048788f07d Fix scrolling for advanced importer controls. 2025-01-14 11:36:48 +01:00
Lyuma e4de1f4583 Make `EditorSceneFormatImporter::_get_import_options` match EditorScenePostImportPlugin API 2025-01-13 21:45:53 +01:00
Aarni Koskela 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
Rémi Verschelde a7d84fa022 Merge pull request #100792 from lyuma/post_import_plugin_subresources
Allow post-import plugins to modify `_subresources`
2025-01-08 00:21:03 +01:00
Yufeng Ying 34d8255947 Force build editor with regex module, remove checking code.
Fix include.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-07 19:43:23 +08:00
Rémi Verschelde 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
Thaddeus Crews d8b1a5aac2
Merge pull request #92235 from paddy-exe/advanced-import-macbook-mouse-magnify
Add MagnifyGesture to Advanced Import dialog zooming
2024-12-30 08:58:50 -06:00
Patrick Exner f1b3f17ae3 Add MagnifyGesture to Advanced Import dialog zooming 2024-12-26 23:53:34 +01:00
Lyuma 637fe3ccdd Allow post-import plugins to modify _subresources
The old code fetched some data before the `EditorScenePostImportPlugin._pre_process` callback.
While the callback could modify existing keys, this prevented users from adding new data on a fresh import.

By fetching the keys after pre_process, this means users can consistently modify import options for nodes, meshes, materials and animations in a post-import plugin.
2024-12-24 07:34:24 -08:00
A Thousand Ships 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
Yufeng Ying f241c1fda0 Remove unused header in editor.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:38 +08:00
demolke 143d8c87bb Move reimport check to EditorImportPlugin
reimport_append is used by gltf_document, fbx_document and editor_import_plugin. The first two will never call it when importing == false. It's only the editor_import_plugin that should guard against that.
https://docs.godotengine.org/en/stable/classes/class_editorimportplugin.html#class-editorimportplugin-method-append-import-external-resource

The motivation of removing the check from gltf_document call path is to be able to test nested imports (texture embedded in gltf).
2024-12-18 21:24:18 +01:00
Haoyu Qiu bf4e5cca3f Make editor's shortcut names translated on-site 2024-12-18 13:00:30 +08:00
Thaddeus Crews 9ecdeb3723
Merge pull request #98747 from tetrapod00/standardize-renderer-strings
Standardize terms for renderers in error strings
2024-12-13 16:19:37 -06:00
Thaddeus Crews 31bc6afcad
Merge pull request #96802 from dsnopek/expose-resource-importer-get-format-version
Expose `ResourceImporter::get_format_version` via `EditorImportPlugin::_get_format_version()`
2024-12-12 16:13:26 -06:00
David Snopek af47df1005 Expose `ResourceImporter::get_format_version` via `EditorImportPlugin::_get_format_version()` 2024-12-12 08:15:28 -06:00
Rémi Verschelde abca8318c4
Merge pull request #98071 from BlueCube3310/res-import-tex-clean
Clean up ResourceImporterTexture
2024-12-12 14:09:45 +01:00
BlueCube3310 0400cbce1e Clean up ResourceImporterTexture 2024-12-12 11:38:40 +01:00
Chaosus 9a8d6628de [Scene] Add `SceneStringName::hover` 2024-12-11 11:11:25 +03:00
Lukas Tenbrink b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
Thaddeus Crews 42eb4fbc07
Merge pull request #93831 from what-is-a-git/wav-runtime
Add runtime file loading to `AudioStreamWAV`
2024-12-03 14:40:42 -06:00
what-is-a-git 707f1038c3 Add runtime file loading to AudioStreamWAV 2024-12-02 20:03:53 -05:00
Rémi Verschelde fa264115ce
Merge pull request #98664 from bruvzg/ts_reset_subpixel_shift
[TextServer] Reset subpixel shift on blank glyphs.
2024-12-02 17:20:07 +01:00
Thaddeus Crews 1c78b09815
Merge pull request #96544 from SaracenOne/import_thumbnails
Generate thumbnails on imported scenes.
2024-11-27 10:47:02 -06:00
Thaddeus Crews 04786f0ee8
Merge pull request #97824 from TokageItLab/retarget-modifier
Add RetargetModifier3D for realtime retarget to keep original rest
2024-11-26 13:04:47 -06:00
Saracen 74611a74d1 Generate editor thumbnails on imported scenes. 2024-11-24 10:23:56 -08:00
Thaddeus Crews 3d6e712177
Merge pull request #93714 from Calinou/normal-map-invert-y-preserve-alpha-channel
Preserve existing alpha channel when using Normal Map Invert Y import option
2024-11-18 09:23:31 -06:00
Silc Lizard (Tokage) Renew f5b49af99f Add RetargetModifier3D for realtime retarget to keep original rest 2024-11-18 22:44:55 +09:00
A Thousand Ships 68f638cf02
Use `(r)find_char` instead of `(r)find` for single characters 2024-11-17 10:02:18 +01:00
Thaddeus Crews 64ce03f261
Merge pull request #93440 from Calinou/import-size-limit-downsample-if-necessary
Downsample textures on import if necessary for technical reasons
2024-11-13 08:33:40 -06:00
Thaddeus Crews 2ed6d12652
Merge pull request #97363 from reduz/deterministic-gen-suberesources-id
Allow passing UID to importer
2024-11-11 14:18:30 -06:00
Thaddeus Crews 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
Thaddeus Crews 204f589213
Merge pull request #97551 from lalitshankarchowdhury/resize-audio-waveform
AudioStreamImport: Allow waveform resize
2024-11-11 14:18:00 -06:00
Juan fe34c45d2a
Allow passing UID to importer
This helps, for importers spitting out new resources to the res://
filesystem to actually hash them to generate deterministic UIDs.

This PR also fixes the determinism for translations.
2024-11-11 15:22:42 +01:00
tetrapod00 899f5151c3 Standardize terms for renderers in error strings
Use "Forward+", "Mobile", "Compatibility", and "renderer" or "rendering method".
2024-11-10 13:30:44 -08:00
Thaddeus Crews 925b690c98
Core: Integrate `Ref::instantiate` where possible 2024-11-10 12:41:26 -06:00
Logharaa b40e04d94f Remove unnecessary condition 2024-11-09 10:42:22 +09:00
Thaddeus Crews 3a7efc9edf
Merge pull request #98874 from aaronfranke/gltf-preserve-visibility
GLTF: Preserve node visibility on import
2024-11-07 12:36:35 -06:00
Thaddeus Crews 671d6e3230
Merge pull request #98150 from hunterloftis/fix-default-import-threaded
Fix freeze on non-thread-safe custom importers
2024-11-07 12:36:20 -06:00
Aaron Franke 924732772b
GLTF: Preserve node visibility on import 2024-11-05 19:06:08 -08:00
Arseny Kapoulkine 260287b3a1 Rewrite index optimization code for maximum efficiency
While all the previous fixes to optimizeVertexCache invocation fixed the
vertex transform efficiency, the import code still was missing two
crucial recommendations from meshoptimizer documentation:

- All meshes should be optimized for vertex cache (this reorders
  vertices for maximum fetch efficiency)
- When LODs are used with a shared vertex buffer, the vertex order
  should be generated by doing a vertex fetch optimization on the
  concatenated index buffer from coarse to fine LODs; this maximizes
  fetch efficiency for coarse LODs

The last point is especially crucial for Mali GPUs; unlike other GPUs
where vertex order affects fetch efficiency but not shading, these GPUs
have various shading quirks (depending on the GPU generation) that
really require consecutive index ranges for each LOD, which requires the
second optimization mentioned above. However all of these also help
desktop GPUs and other mobile GPUs as well.

Because this optimization is "global" in the sense that it affects all
LODs and all vertex arrays in concert, I've taken this opportunity to
isolate all optimization code in this function and pull it out of
generate_lods and create_shadow_mesh; this doesn't change the vertex
cache efficiency, but makes the code cleaner. Consequently,
optimize_indices should be called after other functions like
create_shadow_mesh / generate_lods.

This required exposing meshopt_optimizeVertexFetchRemap; as a drive-by,
meshopt_simplifySloppy was never used so it's not exposed anymore - this
will simplify future meshopt upgrades if they end up changing the
function's interface.
2024-11-04 06:58:06 -08:00
bruvzg e81a2afbc4
[TextServer] Reset subpixel shift on blank glyphs and import option to enable/disable it. 2024-11-01 10:18:57 +02:00
Clay John 7187c251da
Merge pull request #98620 from zeux/lodgen-cleanup
LOD: Remove "Raycast Normals" and associated "Normal Split Angle" settings
2024-10-30 17:13:57 -07:00
Thaddeus Crews 696ca9db3c
Merge pull request #98039 from aaronfranke/button-icon
Rename internal Button `*_icon` functions to `*_button_icon` to match exposed methods
2024-10-29 19:25:59 -05:00
Thaddeus Crews b7a0971ad2
Merge pull request #97934 from adamscott/give-AThousandShips-a-break
[Codestyle] Set clang-format `RemoveSemicolon` rule to `true`
2024-10-29 19:25:36 -05:00
Aaron Franke 562c666e3d
Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 -07:00
Arseny Kapoulkine 494fe2fe21 LOD: Remove "Raycast Normals" and associated "Normal Split Angle" settings
"Raycast Normals" was introduced in 4.4 dev and defaulted to "false".
The limited testing results at the time suggested that raycasting
generally reduces normal quality compared to native simplifier results,
at the same time increasing vertex memory and import time.

To play it safe, we introduced a setting that defaulted to false, with
the goal of removing it later in 4.4 development cycle if no regressions
are noticed. Since we already had three dev snapshots and no reports,
this change removes the setting and associated code.

"Normal Split Angle" was only used when raycast normals were enabled;
this change removes it from the settings, but keeps it in the script
binding for compatibility.

Existing meshes import exactly the same after this change (unless they
chose to override raycasting which would be surprising).

split_normals helper was only used in this code path and is also removed
for simplicity; it is unlikely that this code will be useful as is, as
it can only regenerate normals without fixing tangents or updating
positions.
2024-10-28 10:14:04 -07:00
Thaddeus Crews 851516eeec
Merge pull request #97711 from EAinsley/fix#94718
Fix freeze when data chunk size in WAV header is larger than the actual size
2024-10-25 13:03:57 -05:00