Commit Graph

1077 Commits

Author SHA1 Message Date
Rémi Verschelde 0cc321b144
Merge pull request #92639 from AThousandShips/confirmed_sname
[Scene] Add `SceneStringNames::confirmed`
2024-06-19 10:09:56 +02:00
Rémi Verschelde 1609b275b0
Merge pull request #92638 from AThousandShips/item_selected_sname
[Scene] Add `SceneStringNames::item_selected`
2024-06-19 10:09:53 +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
A Thousand Ships d9e2fc74c7
[Scene] Add `SceneStringNames::item_selected` 2024-06-19 09:39:05 +02:00
bruvzg 049cf70fbf
Remove `monospace/fixed-width` from the `ResourceImporterImageFont` name and description. 2024-06-19 08:42:13 +03: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
A Thousand Ships d519715d94
[Scene] Add `SceneStringNames::font(_size/_color)` 2024-06-18 17:24:27 +02:00
rune-scape b303e73877 avoid crashing when scene import settings are empty 2024-06-17 18:13:09 -07:00
bruvzg db46eac24c
[Image Font Importer] Adds support for `\uXXXX` in the kerning config strings. 2024-06-13 09:20:04 +03:00
Rémi Verschelde 2fb296a5cd
Merge pull request #93074 from bruvzg/bmp_imp_adv
[Image Font Importer] Fix reading advance after hex/dec range.
2024-06-12 11:01:43 +02:00
bruvzg 26df66cbad
[Image Font Importer] Fix reading advance after hex/dec range. 2024-06-12 11:38:41 +03: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 926afccbd8
[Scene] Add `SceneStringNames::panel` 2024-05-30 22:54:50 +02:00
A Thousand Ships 755a0efbb6
[Scene] Add `SceneStringNames::id_pressed` 2024-05-30 22:54:04 +02:00
Rémi Verschelde ff242e2e94
Merge pull request #92539 from RandomShaper/no_crash_glsl_headless
Avoid crash when importing .glsl in headless
2024-05-30 15:41:59 +02:00
Pedro J. Estébanez c1d5a2c8c6 Avoid crash when importing .glsl in headless 2024-05-30 13:51:35 +02:00
A Thousand Ships 4ed62665a2
Replace `.bind(...).call_deferred()` with `.call_deferred(...)` 2024-05-27 13:29:57 +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
Rémi Verschelde 4c96dcf6e0
Merge pull request #92179 from aaronp64/image_import_memory
Improve memory usage for image import and `PortableCompressedTexture2D`
2024-05-22 09:26:53 +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
aaronp64 f81e0fcbf4 Improve memory usage for image import and PortableCompressedTexture2D
When importing images, we store a compressed version of the image to a .ctex file with ResourceImporterTexture::save_to_ctex_format.  When importing many large images at once, this can use a large amount of memory, especially when the .ctex file uses WebP format.

This change is for ResourceImporterTexture::save_to_ctex_format to use the original Image object instead of p_image->get_image_from_mipmap(0), to avoid creating a copy of the full uncompressed image when looping through the base Image and mipmaps.  This reduces the import memory usage for large images by around 10% when using WebP, and 35-40% when Project Settings/Rendering/Textures/Lossless Compression/Force PNG is enabled, may vary depending on the image and number of import threads running.  Same change applied to PortableCompressedTexture2D::create_from_image, which has similar logic.

This helps with #92084, but does not fully resolve the issue on its own, as compressing with WebP on many threads can still use a large amount of memory - this just lowers that amount, and makes it more likely that enabling "Force PNG" will reduce memory usage enough to import the files.
2024-05-20 19:40:39 -04:00
Rémi Verschelde e1f72c7ca6
Merge pull request #92012 from lyuma/rest_fixer_anim_scale
Skeleton rest fixer: Apply orthonormalized scale to anims
2024-05-17 11:14:11 +02:00
Rémi Verschelde 54b2e5dc78
Merge pull request #90647 from Gaktan/master
Fix decimal and hex ranges not working with image fonts
2024-05-17 11:13:39 +02: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
Gaktan 7b740124f0 Fixed decimal and hex ranges not working with image fonts 2024-05-13 21:18:13 +02:00
Alistair Leslie-Hughes b973a01216 Editor: Disallow font image rows/columns to be zero or less
Fixes #91812
2024-05-12 07:53:06 +10: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
A Thousand Ships 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
yds ca58715c06 Keep global rest of unmapped bones if no mapped bone descendants 2024-05-07 09:38:39 -03:00
Rémi Verschelde 4eb614568d
Merge pull request #91641 from TokageItLab/silhouette-visibility
Make silhouette fixer option visibility dependent on availability
2024-05-07 13:49:00 +02:00
Silc Lizard (Tokage) Renew c7cb65f159 Make silhouette fixer option visibility dependent on availability 2024-05-07 09:55:16 +09:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde 8efe58476d
Merge pull request #89461 from Calinou/3d-import-collision-default-trimesh
Default to trimesh for generated collision shapes in Advanced Import Settings
2024-05-04 11:52:11 +02:00
Rémi Verschelde 9cb3a16a8e
Merge pull request #91014 from DeeJayLSP/qoa-wav-playback
Add QOA (Quite OK Audio) as a WAV compression mode
2024-05-02 12:46:32 +02:00
DeeJayLSP b9cbf2c96f Add QOA (Quite OK Audio) as a WAV compression mode 2024-05-01 19:05:14 -03:00
Rémi Verschelde 4f1d4ace09
Merge pull request #91214 from DeeJayLSP/patch-1
ResourceImporterWAV: Remove unnecessary var declaration
2024-04-29 10:10:09 +02:00
Aaron Franke 1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
Douglas Leão 9c5bff1e87
ResourceImporterWAV: remove unnecessary var declaration 2024-04-26 12:39:18 -03:00
Rémi Verschelde 17d9c52ad9
Merge pull request #90894 from lyuma/animation_step_30
Set animation step from importers. Increase default step from 10 to 30FPS
2024-04-24 09:59:21 +02:00
Rémi Verschelde 61d146c89e
Merge pull request #90748 from aaronfranke/fix-basis-scale-global
Fix incorrect name of internal Basis global scale getter
2024-04-22 12:52:52 +02:00
A Thousand Ships 49ae632b7d
Fix import and saving related crashes
* Don't add empty mesh to result when importing obj files
* Check for null resources in `ResourceSaver`
2024-04-22 12:13:19 +02:00
Lyuma bb9674c1b1 Set animation step from importers. Increase default step from 10 to 30 FPS. 2024-04-19 03:02:20 -07:00
Jeronimo Schreyer c3bc768d64
Make Advanced Import lights more like the mesh and material editors
Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2024-04-16 10:15:25 -07:00
Aaron Franke e83807ef85
Fix incorrect name of Basis global scale getter 2024-04-16 04:26:52 -07:00
Hugo Locurcio 611d2591d6
Remove unused Make Streamable option from scene import dialog 2024-04-16 00:07:32 +02:00
Rémi Verschelde d5fd611591
Merge pull request #75787 from Calinou/advanced-import-settings-tweak-environment
Tweak environment in the Advanced Import Settings dialog
2024-04-13 11:30:06 +02:00
jsjtxietian 077e20cd51 Disable mesh compression if vertex position.z is always 0 2024-04-10 11:27:36 +08:00
Hugo Locurcio 72599858fc
Tweak environment in the Advanced Import Settings dialog
Use a gradient sky to improve visibility in shaded areas,
while also helping the user orient themselves. The bottom of the sky
is black, while the top of the sky is white.

This change also makes it so that the Default Clear Color project setting
no longer affects the Advanced Import Settings dialog.
2024-04-09 01:03:49 +02:00
Rémi Verschelde bfccd57769
Merge pull request #89573 from timothyqiu/hop
Fix crash when columns are skipped in CSV translation
2024-04-08 11:20:09 +02:00
Rémi Verschelde 046816e6b9
Merge pull request #90065 from lyuma/rest_fixer_scaled_position
Fix 2 bugs with scale of position tracks in rest fixer
2024-04-04 14:37:04 +02:00
Rémi Verschelde 96a75d99c4
Merge pull request #90064 from lyuma/remove_immutable_post
Apply "Remove Immutable Tracks" after post-import.
2024-04-04 14:37:01 +02:00
Lyuma 00cf862b54 Fix 2 bugs with scale of position tracks in rest fixer
Both bugs were related to how position animation tracks were adjusted in rest fixer.
First bug: motion scale is applied before subtracting the origin when applying bone roll
Second bug: armature scale was lost when converting basis to quaternion, leading an unscaled position offset to be added to the scaled origin.
2024-03-30 23:54:50 -07:00
Lyuma b0ce274a52 Apply "Remove Immutable Tracks" after post-import.
Reimplements "Remove Immutable" by comparing to the skeleton rest.
It is necessary to delay removing animation tracks until after the correct rest pose is calculated in rest-fixer.
Preserves the original implementation in the GLTFDocument / FBXDocument API for compatibility.
2024-03-30 23:45:22 -07:00
AlexOtsuka 4d3319eceb Fix Set Animation Save Paths breaking on Windows 2024-03-31 00:46:25 +01:00
Rémi Verschelde 05372773e1
Merge pull request #89599 from timothyqiu/vegetate
Fix unexpected auto translation of editor `Tree` content
2024-03-23 21:15:39 -07:00
Rémi Verschelde 9a8fb26d91
Merge pull request #88824 from V-Sekai/retarget_silhouette_template
Retargeting option to use a template for silhouette.
2024-03-23 21:13:38 -07:00
Lyuma 9db0860c2e Option to use Animation as skeleton rest silhouette.
Adds `rest_pose/external_animation_library` advanced option to replace bone rest with an exported Animation before retargeting.
Together this allows a purely importer based workflow to transfer a known good pose from one FBX to another.
2024-03-23 17:29:02 -07:00
Lyuma 34f284bcc2 Add option to import skeleton rest as RESET animation
Also creates an AnimationPlayer if one does not exist.
Designed to be used in conjunction with loading rest pose in another importer.
2024-03-19 02:27:34 -07:00
Haoyu Qiu 8cd1ebbd6d Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
Haoyu Qiu f98d552214 Fix crash when columns are skipped in csv translation 2024-03-16 23:26:06 +08:00
Rémi Verschelde 453485aede
Merge pull request #89270 from Repiteo/enforce-typename-in-templates
Enforce template syntax `typename` over `class`
2024-03-14 22:34:37 +01:00
Hugo Locurcio 51af186bb6
Default to trimesh for generated collision shapes in Advanced Import Settings
This avoids using convex decomposition every time collision is enabled
on a mesh, which can be extremely slow on complex meshes (such as entire
levels).
2024-03-14 00:06:54 +01:00
bruvzg fee14eb5e8
[Import] Add "skip file" import option to skip (and exclude from export) importable formats, auto set it for the images used by bitmap font. 2024-03-12 21:34:40 +02:00
bruvzg 911fa38d3a
[Font] Add option to disable embedded bitmaps loading. 2024-03-11 16:31:10 +02:00
Rémi Verschelde 5c1b926610
Merge pull request #88045 from Malcolmnixon/optimize-collider-regeneration
Optimize when colliders are regenerated for imported meshes
2024-03-09 22:19:34 +01:00
Thaddeus Crews 9903e6779b
Enforce template syntax `typename` over `class` 2024-03-07 22:39:09 -06:00
DeeJayLSP 7fa3431dca WAV importer: use cubic interpolation on resampler 2024-03-04 00:05:48 -03:00
Rémi Verschelde 21e3b2111e
Merge pull request #88862 from smix8/split_physics_classes
Split monolithic physics class files
2024-02-27 16:37:07 +01:00
smix8 35dafc9fa8 Split monolithic physics class files
Splits monolithic physics class files.
2024-02-27 11:18:16 +01:00
Rémi Verschelde 04e16a27cf
Merge pull request #88821 from lyuma/preserve_initial_pose
Allow preserving the initial bone pose in rest fixer
2024-02-27 10:18:04 +01:00
Rémi Verschelde 3780604d79
Merge pull request #88819 from lyuma/import_nodes_as_skeleton_bones
Add new scene import option to import as Skeleton
2024-02-27 10:18:00 +01:00
Rémi Verschelde 8f98ed65f7
Merge pull request #88738 from clayjohn/mesh_compression-tangents
Multiple fixes for compressed meshes
2024-02-27 10:17:43 +01:00
Muller-Castro 1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
Lyuma 6a6bd2307c Add rest fixer toggle to disable bone pose reset
Adds a "Reset All Bone Poses After Import" option to the Skeleton3D Rest Fixer settings.
Default value of true resets the bone poses to rest (usually a t-pose), matching previous behavior.
If disabled, keeps the bones posed as they would have been before silhouette adjustment.
2024-02-26 03:24:01 -08:00
Aaron Franke c399424db9
Move 3D-only resources to their own folder 2024-02-26 05:23:04 -06:00
Lyuma 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
clayjohn 781cd27fe4 Avoid singularity when generated tangents and validate that tangents are good enough when using compression 2024-02-23 16:25:26 -08:00
K. S. Ernest (iFire) Lee 04d43947bf
Add ufbx for FBX importing
This update introduces a new import method for FBX files using ufbx. If the fbx2gltf import fails, it will use the most recently cached scene from the ufbx import. The process is sped up by introducing threads to load the ufbx portion.

Key changes include:

- Support for importing geometry helper nodes in FBX files.
- Addition of cameras and lights with updated names.
- Removal of the fbx importer manager.
- Introduction of ModelDocument3D and updates to its methods.
- Changes to FBX import options and visibility.
- Updating the documentation and handling some errors.
- Store the original non-unique node, mesh and animation names in FBX and glTF.

Co-Authored-By: bqqbarbhg <bqqbarbhg@gmail.com>
2024-02-23 22:33:04 +01:00
Rémi Verschelde c187d6522b
Merge pull request #84569 from jsjtxietian/Add-ignorable-columns-to-translation-CSVs
Add support for comment (ignorable) column in translation csv
2024-02-20 11:12:03 +01:00
Rémi Verschelde 3252995b41
Merge pull request #88088 from bruvzg/img_font_more
[Font] Allow overriding advances, offsets and kerning in the ImageFont import settings.
2024-02-13 23:43:29 +01:00
bruvzg 42ec133dbe
[Font] Allow overriding advances, offsets and kerning in the ImageFont import settings. Fix bitmap font kerning override. 2024-02-13 18:49:47 +02:00
Rémi Verschelde e53e60e0fe
Merge pull request #83856 from BlueCube3310/animation-import-crash
Fix Scene Importer crashing when animation or mesh save paths are invalid
2024-02-13 17:23:03 +01:00
A Thousand Ships 8b3c12d8df
Allow configuring the maximum width for atlas import 2024-02-13 10:30:44 +01:00
A Thousand Ships 684752e75b
Replace error checks against `size` with `is_empty` 2024-02-09 12:50:15 +01:00
Malcolm Nixon 39e28da040 Optimize when colliders are regenerated for imported meshes to prevent unnecessary recalcuation. 2024-02-06 22:08:41 -05:00
Aaron Franke d1de00a2c8
Fix crash when previewing a scene with a mesh as the root node 2024-01-31 06:26:24 -06:00
Yuri Sizov 45eedba1fa Improve editor theme generation after the refactor 2024-01-17 15:16:53 +01:00
BlueCube3310 cd87916d98 Fix Scene Importer crashing when mesh or animation save paths are invalid 2024-01-16 17:42:11 +01:00
Yuri Sizov 95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
风青山 f932c6548e Set an appropriate minimum size for labels in windows that display incorrectly
When the label's `autowrap_mode` is `AUTOWRAP_WORD_SMART` and the initial `text`
is set at the same time, it may have a higher height.

Set an appropriate minimum size for labels in windows that display incorrectly
so that these controls display properly.
2024-01-12 23:08:38 +08:00
Rémi Verschelde cab27498bd
Merge pull request #86957 from RandomShaper/mt_mends
A couple of enhancements to user-visible threading semantics
2024-01-11 17:40:37 +01:00
Pedro J. Estébanez acac31ba5c Allow EditorImportPlugin to override can_import_threaded() 2024-01-09 17:30:24 +01:00
K. S. Ernest (iFire) Lee 1430f0b67d Add obj importer changes to use ImporterMesh. 2024-01-08 13:57:20 -08:00