160 Commits

Author SHA1 Message Date
Spartan322
4f08ff1a11 Merge commit godotengine/godot@a3b42d85d2 2025-08-13 19:56:49 -04:00
BlueCube3310
638c6a5659 Fix Image format RGB565 conversion 2025-08-03 16:28:13 +02:00
LuoZhihao
a32b59622f Fix Image nearest and cubic resizing bias 2025-07-30 23:54:12 +08:00
Spartan322
0a87a7b475 Merge commit godotengine/godot@e1b4101e34 2025-07-01 06:43:54 -04:00
BlueCube3310
e35c80b61c Image: Fix is_invisible detection for RGBAH and RGBAF 2025-06-23 18:21:04 +02:00
Spartan322
0e99b001ac Merge commit godotengine/godot@5dd76968d8 2025-06-05 23:07:30 -04:00
Aaron Franke
f6f1df7d73 Add 64-bit versions of core power of 2 functions 2025-06-01 23:11:12 -07:00
Spartan322
b666f4fc15 Merge commit godotengine/godot@de37627404 2025-05-29 05:22:55 -04:00
Thaddeus Crews
63dff62948 Merge pull request #100673 from RandomShaper/res_duplicate
Overhaul resource duplication
2025-05-27 09:39:25 -05:00
Pedro J. Estébanez
2a03b459b9 Overhaul Resource::duplicate()
Thanks to a refactor, `Resource::duplicate_for_local_scene()` and `Resource::duplicate()` are now both users of the same, parametrized, implementation.

`Resource::duplicate()` now honors deepness in a more consistent and predictable fashion. `Resource::duplicate_deep()` is added (instead of just adding a parameter to the former, for compatibility needs).

The behavior after this change is as follows:
  - Deep (`deep=true`, formerly `subresources=true`):
    - Previously, only resources found as direct property values of the one to copy would be, recursively, duplicated.
    - Now, in addition, arrays and dictionaries are walked so the copy is truly deep, and only local subresources found across are copied.
    - Previously, subresources would be duplicated as many times as being referenced throughout the main resource.
    - Now, each subresource is only duplicated once and from that point, a referenced to that single copy is used. That's the enhanced behavior that `duplicate_for_local_scene()` already featured.
    - The behavior with respect to packed arrays is still duplication.
    - Formerly, arrays and dictionaries were recursive duplicated, with resources ignored.
    - Now, arrays and dictionaries are recursive duplicated, with resources duplicated.
    - When doing it through `duplicate_deep()`, there's a` deep_subresources_mode` parameter, with various possibilites to control if no resources are duplicated (so arrays, etc. are, but keeping referencing the originals), if only the internal ones are (resources with no non-local path, the default), or if all of them are. The default is to copy every subresource, just like `duplicate(true)`.
  - Not deep (`deep=false`, formerly `subresources=false`): <a name="resource-shallow"></a>
    - Previously, the first level of resources found as direct property values would be duplicated unconditionally. Packed arrays, arrays and dictionaries were non-recursively duplicated.
    - Now, no subresource found at any level in any form will be duplicated, but the original reference kept instead. Packed arrays, arrays and dictionaries are referenced, not duplicated at all.
    - Now, resources found as values of always-duplicate properties are duplicated, recursively or not matching what was requested for the root call.

This commit also changes what's the virtual method to override to customize the duplication (now it's the protected `_duplicate()` instead of the public `duplicate()`).
2025-05-26 10:05:25 +02:00
George L. Albany
952ae4141d Merge pull request #821 from Spartan322/add/gif-importer
Add GIF import
2025-05-23 10:14:39 +00:00
Spartan322
614048d3ee Add GIF import
Add GIF file loading
Add `ResourceFormatLoader` for `SpriteFrames`
Add `ResourceFormatLoader` for `AnimatedTexture`
Add `ImageFrames` resource for handling image sequence
Add `ImageFramesLoader` for resource loading image sequences
Add `ResourceFormatLoader` for `ImageFrames`
Add GIF image load test assertions
Add ImageFrames test cases
2025-05-23 05:28:40 -04:00
Spartan322
38fb5272ad Merge commit godotengine/godot@7a0ab9d561 2025-05-22 14:03:25 -04:00
BlueCube3310
0f9986470a Image: Fix detecting color channels 2025-05-16 12:47:57 +02:00
Spartan322
63f2d58fcf Merge commit godotengine/godot@428a762e98 2025-05-14 14:16:55 -04:00
Spartan322
a30eb5a590 Merge commit godotengine/godot@6a6a1168a5 2025-05-07 10:35:16 -04:00
Thaddeus Crews
579feb387c Core: Add [[nodiscard]] to string-like classes 2025-05-06 12:23:41 -05:00
LuoZhihao
237597b01f BasisU: Use KTX2 format and add import options to configure encoder 2025-05-03 01:45:38 +08:00
Spartan322
8122592328 Merge commit godotengine/godot@80a3d205f1 2025-05-01 01:30:09 -04:00
kobewi
5af4bef46f Inline static variables (part 1) 2025-04-29 18:10:44 +02:00
Spartan322
2b59059dde Merge commit godotengine/godot@2d3bdcac35 2025-04-19 16:05:28 -04:00
Thaddeus Crews
ad40939b6f Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
A Thousand Ships
889410dcda Add String::replace_char(s) methods for performance and convenience 2025-04-10 13:08:45 +02:00
Yufeng Ying
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
BlueCube3310
647b99c6d0 Image: Fix typo at _set_color_at_ofs with FORMAT_RGB565 2025-03-29 17:51:31 +01:00
BlueCube3310
dd47d9173e Image: Improve is_invisible function 2025-03-28 22:42:37 +01:00
Rémi Verschelde
e3063f5675 Merge pull request #104590 from bruvzg/tex_decomp_load
Load decompressable texture format if no supported one is found.
2025-03-28 17:30:28 +01:00
BlueCube3310
649fa630a7 Image: Remove references to defunct FORMAT_CUSTOM 2025-03-26 21:37:26 +01:00
Pāvels Nadtočajevs
b384de9013 Load decompressable texture format is no supported one found. 2025-03-25 09:46:19 +02:00
Thaddeus Crews
f09ee0171a Style: Begin integrating simple .clangd fixes 2025-03-22 13:24:35 -05:00
kobewi
10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
K. S. Ernest (iFire) Lee
69b281295c Add DDS image load and save functionality
Save and load DDS from Image class.

Co-authored-by: BlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>
2025-03-14 19:31:43 -07:00
Spartan322
4805bc1eee Merge commit godotengine/godot9630d4e2fc1d0fdef6f46f24e236548549f31d49 2025-01-17 16:33:06 -05:00
Spartan322
e0126b63c2 Merge commit godotengine/godot@d33da79d3f 2025-01-16 18:50:47 -05:00
BlueCube3310
271067eb2b Fix certain channel masks for Texture previewer 2025-01-15 18:40:53 +01:00
Marc Gilleron
c7a9d64eaf Add color channel filter to editor texture previews 2025-01-11 23:27:48 +00:00
Spartan322
1609981ccf Merge commit godotengine/godot@75ce4266c4 2024-12-29 11:38:02 -05:00
Thaddeus Crews
3c304ab7cc Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers
[Core,Drivers] Improve use of `Ref.is_null/valid`
2024-12-23 11:14:58 -06:00
Spartan322
fa0b4af786 Merge commit godotengine/godot@a7a2a12bfd 2024-12-21 05:32:01 -05:00
Yufeng Ying
be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +08:00
Spartan322
9d47e1e39e Merge commit godotengine/godot@b9437c3938 2024-12-15 09:24:31 -05:00
BlueCube3310
335077a03f Image: More cleanup and reduced code duplication. 2024-12-12 11:52:59 +01:00
Spartan322
c3314b0ab0 Merge commit godotengine/godot@1f47e4c4e3 2024-12-04 20:11:58 -05:00
BlueCube3310
88ffe07de9 Betsy: Add BC3 and BC5 support 2024-11-27 12:27:05 +01:00
Spartan322
cfc378b251 Merge commit godotengine/godot@fd4c29a189 2024-11-19 11:39:37 -05:00
kobewi
3b6705a641 Support uid:// in more places 2024-11-16 21:43:18 +01:00
Spartan322
4a5836e546 Merge commit godotengine/godot@6c05ec3d67 2024-11-15 14:24:07 -05:00
kobewi
0dabcd9941 Resource UID fixes and improvements 2024-11-14 16:37:54 +01:00
Spartan322
3a73c6ebd1 Merge commit godotengine/godot@cb411fa960 2024-11-12 13:46:59 -05:00