Commit Graph

232 Commits

Author SHA1 Message Date
4f255fa7d7 Add interpolate_via_rest static func to Animation class 2025-11-22 07:52:32 +09:00
c765e6cbb6 Fix custom audio track blend flag on reimport 2025-11-09 00:01:29 +01:00
b72937587a Merge pull request #110400 from Ryan-000/Optimize-Animation_track_update_hash
Optimize Animation::_track_update_hash
2025-10-27 10:01:45 -05:00
44856c81af Optimize Animation::_track_update_hash
Co-Authored-By: Silc Lizard (Tokage) Renew <tokage.it.lab@gmail.com>
Co-Authored-By: Luo Zhihao <luo_zhihao@outlook.com>
Co-Authored-By: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-10-24 15:04:24 -04:00
1964918e46 Use LocalVector in Animation 2025-06-18 18:37:55 +03:00
e2931a5c19 Make conversions from NodePath to String explicit. 2025-06-11 16:50:27 +02:00
ed836df150 Make conversions from math types to String explicit, to avoid accidental conversions. 2025-06-09 01:58:18 +02:00
e5c8fb8f1d Merge pull request #107005 from TokageItLab/fix-anim-node-param-type
Fix ambiguous AnimationNode's parameter type in default value and make `validate_type_match()` static function
2025-06-05 13:12:43 +02:00
678fb63451 Fix ambiguous AnimationNode's parameter type in default value
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2025-06-05 10:02:22 +09:00
5934804335 Add option to auto tangent new bezier points in animation editor
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-06-03 11:04:35 +02:00
f6f1df7d73 Add 64-bit versions of core power of 2 functions 2025-06-01 23:11:12 -07:00
4cb8a0c77e Add resize_initialized and resize_uninitialized to Vector. These functions serve as replacements for resize, to make sure the caller understands whether elements need to be initialized 'by hand' after the call. 2025-05-26 18:35:41 +02:00
c317549587 Fix Heap buffer overflow in Animation::_find()
Fixes #106647
2025-05-20 17:26:58 -07:00
3947cbe3b2 Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
37a70edc11 Nearest and linear interpolation optimization
Nearest and linear interpolation optimization
2025-04-24 19:30:23 +03:00
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
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
33af291421 Remove error print in the Animation getter. 2025-04-09 09:34:26 +03:00
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
dcb4e5b22a Replace Animation::_clear() with explicit .clear() calls. 2025-01-09 16:43:57 +01:00
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
ed13a840fa Add markers to animation 2024-09-29 17:27:36 +09:00
8eab2b52ed Merge pull request #96835 from Malcolmnixon/animation-optimize
Expose the optimize method of the Animation class to gdscript.
2024-09-26 18:45:15 +02:00
4c5e879cc5 Merge pull request #97380 from TheSofox/handle_modes_default_fix
Ensure `handle_modes` is given default values rather than flagging error if undefined
2024-09-25 12:39:22 +02:00
633df0b29c Handle handle_modes being undefined by giving default values rather than flagging error 2024-09-23 20:22:26 +01:00
dd9525be04 Fix animation compression going the wrong way
When compressing animation key frame indices the truncation breaks the animation near the border of pages.

We use banker's rounding (FE_TONEAREST) as implemented by fast_ftoi to get the nearest integer frame.
2024-09-21 19:20:19 -07:00
3e93970ef5 Expose the optimize method of the Animation class to gdscript. 2024-09-11 01:18:30 -04:00
154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
415331f474 Make Animation::capture_included read-only
The `PROPERTY_USAGE_READ_ONLY` flag only makes the property read-only in the inspector, but the property also has the `PROPERTY_USAGE_NO_EDITOR` flag which means it won't show up in the inspector. So it does nothing, while still making it editable from scripting.

To make it read-only for scripting too, this PR removes the setter from the `PropertyInfo`. And since the `set_capture_included` method is now unused, it was also removed.
2024-08-10 18:53:45 +02:00
7c6f32ddbf Clamp bezier handle length to half the length of animation 2024-07-04 13:41:12 +01:00
bea47d877b Fix seeking Animation immediate after playback for Discrete track 2024-06-08 22:09:37 +09:00
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
6fd8b25d38 Add argument options to AnimationPlayer for auto capture 2024-05-03 07:06:37 +09:00
36abb55dd2 Add auto_capture option to AnimationPlayer 2024-05-02 19:57:36 +09:00
9903e6779b Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
4659090543 Make consistent the retrieval of audio tracks 2024-02-18 00:15:33 +09:00
bc20fdf16f Add CallbackModeDiscrete to AnimationMixer 2024-02-17 18:25:56 +09:00
27575c4d4b Merge pull request #87817 from Dheatly23/fix-87813
Fix quaternion keyframe optimization for collinear rotation over 180 degrees
2024-02-12 13:34:22 +01:00
684752e75b Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
9862056fa5 Fix Quaternion Keyframe Optimization 2024-02-03 16:16:21 +07:00
a5dffe7804 Fix cubic interpolation wrong argument for the time 2024-01-31 14:02:42 +09:00
a51958a2a0 Remove Object pointer/solve types conflict in AnimationTrackCache
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-01-08 21:48:19 +09:00
e538ce3851 Add cubic_interpolate_in_time_variant() to Animation 2023-12-30 13:30:14 +09:00
12ce2e33b2 Restored the ability for linear interpolation to work on a mix of integer and float keyframes. 2023-12-13 00:24:46 +01:00
80c9533810 Rework blending method in Variant animation for Int/Array/String 2023-11-16 21:37:18 +09:00
034c0f1624 Replace sanity with safety for checks 2023-10-08 16:22:24 +02:00
5c43e4c1ef Fix various typos with codespell
Using 2.2.6.dev180+ge3a2cfbd.
2023-09-12 08:54:18 +02:00
1a52c0c543 Fix animation keyframes being skipped sometimes when being played backwards. #57271 2023-09-08 14:13:53 +01:00