401 Commits

Author SHA1 Message Date
d240313513 [3.x] ResourceImporterWAV: Detect if data chunk size is larger than the actual size
(cherry picked from commit 57159bcb8c)
2025-06-23 19:03:33 +02:00
ae51d5ad33 Fix finding AnimationPlayer in scene import
The scene importer always assumed that the AnimationPlayer is called
"AnimationPlayer".

This is not always true: for example the GLTF importer just creates an
AnimationPlayer with the default name, which may be "animation_player",
depending on the project settings.

This fix instead chooses the first node that is an AnimationPlayer, and
warns if there is more than one.
2024-03-12 20:50:16 +01:00
b9cbffd957 add ORMSpatialMaterial 2024-02-08 20:34:11 +01:00
0aa22b8f13 Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
2024-02-07 09:35:50 +00:00
f3680a2412 Merge pull request #77428 from AThousandShips/atlas_mesh_fix_3_x
[3.x] Bounds fixes in `TextureAtlas` import
2023-06-13 14:37:13 +02:00
5cd47a1984 [3.x] Fix trim when importing WAV 2023-06-09 15:28:33 +02:00
e34619a605 [3.x] Bounds fixes in TextureAtlas import 2023-05-26 10:15:06 +02:00
ab8792cc7b Add vertex color support to OBJ importer 2023-05-02 12:03:01 +02:00
1426cd3b3a 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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
e771804e78 Fix some Clang -Wunused-but-set-variable warnings 2022-12-21 12:15:52 +01:00
cbc8ccbe20 Add more info to WAV import errors
Print mismatched header contents and file size, which can provide more clues to users when debugging.

(cherry picked from commit f5d256b118)
2022-12-04 20:19:50 +08:00
c15bb8147e Handle closed splines in Collada importer
(cherry picked from commit 8f7ab02bc6)
2022-11-30 15:34:26 +01:00
0dccbcd7ce Merge pull request #61878 from bruvzg/backport_locale_select
[3.x] Backport locale selection improvements.
2022-08-05 23:45:17 +02:00
818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
a8eb779ac3 Backport locale selection improvements. 2022-07-04 11:49:20 +03:00
5ccc941a4c [3.x] Remove hardcoded names in generated objects 2022-07-03 00:58:13 +02:00
bed3d2cbd5 Merge pull request #61169 from DeeJayLSP/wav_ieee_3.x 2022-07-02 22:03:14 +02:00
f702828c37 Print messages when textures are detected as used in 3D/normal map
This detection automatically changes some import options, so it's
important that users are aware of this.
2022-06-13 20:13:30 +02:00
80b82e4e66 i18n: Misc fixes translation strings
Adds some translator comments to solve some questions raised on Weblate.
2022-06-08 12:56:42 +02:00
f4228045f7 [3.x] ResourceImporterWAV: Add support for 64-bit IEEE float 2022-05-18 19:55:06 -03:00
5d150559a3 Make more import preset name translatable 2022-04-27 13:50:59 +08:00
6c778a19d1 Hide "Normal Map" import option when using lossless compression on Texture
This pull request resolves an issue where images being imported with lossless compression allowed you to select a normal map, but the normal map only applies if you're using VRAM compression. Thereby making it redundant to appear when using lossless compression. This pull request hides the normal map option when lossless compression is selected.

Resolves: #59435
(cherry picked from commit 01ca9d3eec)
2022-03-29 00:07:45 +02:00
113102aa51 ResourceImporterWAV: Allow configuring loop mode on import
The new `edit/loop_mode` import options lets user choose to either:
- Detect loop points from the WAV (default, same behavior as before)
- Set the loop mode and loop points manually like in AudioStreamSample

Fixes #46164.

(cherry picked from commit b389ce5ccd)
2022-03-28 23:46:29 +02:00
2c3646b37b Add missing i18n to various strings
(cherry picked from commit 25d93200c8)
2022-03-10 19:01:52 +01:00
177041b968 Allow disabling the alpha trim on texture atlas creation.
Default to true
2022-02-19 14:01:30 -06:00
742c54d0a7 Fix import hints breaking node paths in animations 2022-01-19 16:42:38 +01:00
a627cdafc5 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
e6cee71097 ResourceImporterScene: Add error when "default" is not defined to create clips
(cherry picked from commit 4b9e12b8c0)
2021-12-10 11:08:13 +01:00
88c1411051 Fix edge case where 1px cut off from right of image
Backward loop should remain -1
2021-11-23 11:03:00 -05:00
0093bda767 Fix texture atlas generation when source sprite is larger than generated atlas 2021-11-18 10:02:24 -05:00
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
930d28e6cb Prevent obj importer from printing misleading error
(cherry picked from commit bd0d15c5be)
2021-11-15 16:10:00 +01:00
44a532e99e Fix crash in ResourceImporterTexture::_save_stex if webp disabled
Fixes #51535.

(cherry picked from commit 79d4edfca7)
2021-11-02 09:28:46 +01:00
203295f17d Added Mesh Compression Import Options
Fleshed out the "Optimize Mesh" options found in the mesh import UI
Gave a checkbox to every vertex attribute that can be compressed

Surfaced option to enable/disable Octahedral compression for
normal/tangent vectors

Also surfaces the vertex position compression option which previously
inaccessible because the defaults did not compress vertex positions

Supports all current importers (obj, fbx, collada, gltf)
2021-11-01 12:54:28 -04:00
1b65550ec7 clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
42d385b312 clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
5fb9a2a54d Merge pull request #52652 from boruok/optional-crop-for-texture-atlas-importer 2021-10-05 19:21:49 +02:00
192ec963ae Create 'rendering/misc' project settings section
To prevent the project settings `rendering` section getting out of hand, this PR moves some of the smaller new settings into a `misc` category.
2021-10-05 11:47:03 +01:00
6f6102f22c Fixed TextureAtlas import wrong images size.
Fix #42057

(cherry picked from commit 395ab3441d)
2021-09-21 17:14:58 +02:00
9913af974f added optional cropping for texture atlas importer 2021-09-14 21:23:59 +09:00
6482ba8807 Fix to parsing some Collada with extra vertex semantics referenced only in the vertices section. 2021-08-19 08:45:52 +01:00
fb609b22e4 Add Anisotropic Filtering option for TextureArrays 2021-08-12 23:56:03 +08:00
9735f2803c Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
af3f83407f Expose an ImportOrder enum in ResourceImporter
This avoids using magic numbers in code.

(cherry picked from commit 7f83977f37)
2021-07-26 13:26:58 +02:00
7e03bd1671 Remove duplicate WARN_PRINTS macro 2021-06-18 12:57:59 +01:00
37fdd656c0 ERR_FAIL_NULL check file access
Null in ResourceImporterTexture::_save_stex

(cherry picked from commit b74bc42a43)
2021-06-17 12:47:55 +02:00
c45ce768b1 Merge pull request #47854 from mortarroad/3.x-lossless-webp
[3.x] Implement lossless WebP encoding
2021-06-11 19:35:47 +02:00
5de08ef1d6 Implement lossless WebP encoding 2021-06-11 18:48:04 +02:00
6580166f39 Merge pull request #48693 from Calinou/editor-import-invert-green-channel-3.x
Add "Normal Map Invert Y" import option for normal maps
2021-06-05 13:36:26 +02:00