Commit Graph

55 Commits

Author SHA1 Message Date
Silc Lizard (Tokage) Renew 7c4bc0a378 Fix processed_hashes type to Animation::TypeHash from int 2024-07-25 16:21:59 +09:00
Silc Lizard (Tokage) Renew 04ac6a74df Fix total weight calculation to separate track types 2024-07-25 11:23:15 +09:00
Silc Lizard (Tokage) Renew 88e590c9d3 Add approx comparing methods to Animation, use them on time comparison 2024-07-24 01:18:06 +09:00
Silc Lizard (Tokage) Renew e8c2edefd1 Fix Bezier track init value on caching 2024-07-01 01:20:43 +09:00
Silc Lizard (Tokage) Renew e82ec1a8ce Make AnimationTrackCaches invalid when animation is added 2024-06-23 23:33:55 +09:00
Adam Scott 52fa4f05f3
Add samples playback support 2024-06-18 11:06:31 -04:00
Silc Lizard (Tokage) Renew 049c1a5699 Fix force continuous un-interpolatable value is not applied correctly 2024-06-15 11:38:52 +09:00
Silc Lizard (Tokage) Renew bea47d877b Fix seeking Animation immediate after playback for Discrete track 2024-06-08 22:09:37 +09:00
Silc Lizard (Tokage) Renew 3fde32a67e Fix Deterministic blending with Dominant doesn't have init value 2024-05-21 05:23:53 +09:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
Silc Lizard (Tokage) Renew 36abb55dd2 Add auto_capture option to AnimationPlayer 2024-05-02 19:57:36 +09:00
Silc Lizard (Tokage) Renew b346e2a722 Make seeking animation playback track consider internal seeking 2024-05-01 06:39:17 +09:00
Silc Lizard (Tokage) Renew 9855ffd2e4 Separate value/bezier track caching process in AnimationMixer 2024-04-10 01:37:23 +09:00
Silc Lizard (Tokage) Renew 21082a6834 Make AnimationMixer consider Discrete for RESET track 2024-04-06 05:37:45 +09:00
Silc Lizard (Tokage) Renew 04dd299cba Skeleton3D: Add SkeletonModifier / Deprecate Override / Separate PB 2024-04-05 01:28:26 +09:00
Silc Lizard (Tokage) Renew c1741fe98e Fix AnimationPlaybackTrack seeking behavior overall
Co-authored-by: jsjtxietian <jsjtxietian@outlook.com>
Co-authored-by: Miguel0312 <miguel.vpereira14@gmail.com>
Co-authored-by: BruceLiCong <citb_li@163.com>
2024-03-23 18:48:29 +09:00
Aaron Franke 6aac3e4a16 Disable all 3D nodes, physics, and resources when compiling without 3D 2024-03-11 01:00:55 -07:00
Silc Lizard (Tokage) Renew 9ae3f79ecb Fix wrong line of making flag to discrete in AnimationMixer 2024-03-10 04:33:37 +09:00
Micky cd2032a90b Optimise Object's `get_argument_options` 2024-02-29 18:00:54 +01:00
Silc Lizard (Tokage) Renew 8423574a24 Force non-numeric ValueTrack use Discrete with Dominant 2024-02-22 21:43:35 +09:00
Travis Lange ae97cf2ff0
Fix AnimationMixer breaking animations with redundant check
Also change `Node::get_node_and_resource` to prevent it from printing an
error from `Node::get_node`, and just returns nullptr. This is what the
redundant check was trying to prevent.

Fixes #88428.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-19 16:50:19 +01:00
Silc Lizard (Tokage) Renew 772a753960 Fix some animation state corruptions on activate and reset on save 2024-02-19 13:04:22 +09:00
Silc Lizard (Tokage) Renew c9fc29ae86 Fix some condition for BezierTrack to distinguish between ValueTrack 2024-02-18 19:42:46 +09:00
Silc Lizard (Tokage) Renew 4659090543 Make consistent the retrieval of audio tracks 2024-02-18 00:15:33 +09:00
Silc Lizard (Tokage) Renew bc20fdf16f Add CallbackModeDiscrete to AnimationMixer 2024-02-17 18:25:56 +09:00
Silc Lizard (Tokage) Renew dc4b7bc364 Add option to silence some warnings in AnimationMixer caching 2024-02-14 14:48:02 +09:00
kobewi 154b4a51f2 Improve AnimationMixer warnings 2024-02-12 16:24:23 +01:00
Silc Lizard (Tokage) Renew 85d66cb4e8 Add capture() and play_with_capture() as substitute of update capture 2024-02-12 17:02:05 +09:00
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Silc Lizard (Tokage) Renew 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
Rémi Verschelde 6226388bac
Merge pull request #86874 from AThousandShips/no_3d_fix
Fix some build errors with `disable_3d=yes`
2024-01-08 11:59:31 +01:00
A Thousand Ships c6a1ae7875
Fix some build errors with `disable_3d=Yes`
* Some tests were incorrectly included
* SCU builds with animation
* Animation `switch`
2024-01-07 00:44:33 +01:00
Muller-Castro 96a95cb974 Add const lvalue ref to container parameters 2024-01-05 14:49:57 -03:00
Micky 787f61d70b Add autocompletion for AnimationLibrary's & AnimationMixer 2024-01-04 21:11:36 +01:00
Alistair Leslie-Hughes ea84effb84 Replace memory allocation point of ValueTrack correctly in AnimationMixer
When a animation track doesn't have an keys, it's possible that we leak memory due the ERR_CONTINUE_MSG macro usage.

By checking the error condition first, we avoid a allocation and thus the leak.
2023-12-12 07:33:35 +11:00
Rémi Verschelde 6b21a185e2
Merge pull request #85428 from jsjtxietian/prevent-nullptr-crash-in-AnimationMixer--restore
Prevent a crash when calling `AnimationMixer::restore` with an invalid resource
2023-12-04 23:14:29 +01:00
Rémi Verschelde a363269479
AnimationMixer: Validate ObjectID before blend in case the object was freed
Works around #85365, but it's likely only a partial fix.
The proper fix would be to remove the Object pointer from the TrackCache
and always go back to the ObjectID before doing operations like this.
2023-11-28 12:27:23 +01:00
jsjtxietian 937411e152 Prevent a crash when calling AnimationMixer::restore when an invalid reference 2023-11-28 12:54:06 +08:00
Silc Lizard (Tokage) Renew d3a429962f Make AnimationPlaybakTrack keep state when stopping 2023-11-27 12:14:25 +09:00
Yuri Sizov 671c04f89f Fix a crash when trying to restore uncopyable animation tracks 2023-11-24 14:20:30 +01:00
Pedro J. Estébanez fbb931df8c Perform safe copies in AnimatedValuesBackup::get_cache_copy() 2023-11-24 11:38:59 +01:00
kobewi 1c0a0f5fdd Fix TrackCache memory crash 2023-11-23 20:26:03 +01:00
Silc Lizard (Tokage) Renew f66224dd2d Bind `_reset`/`_restore` in AnimationMixer 2023-11-23 22:47:52 +09:00
Rémi Verschelde 6ae6cc0bf5
Merge pull request #84815 from TokageItLab/array-animation
Rework blending method in `Variant` animation for `Int`/`Array`/`String`
2023-11-16 14:52:00 +01:00
Silc Lizard (Tokage) Renew 80c9533810 Rework blending method in Variant animation for Int/Array/String 2023-11-16 21:37:18 +09:00
Alistair Leslie-Hughes 5b6f641e99 Fix sizeof usage for Variant pointers in alloca
Coverity report this as a non portable usage of sizeof
2023-11-16 07:13:14 +11:00
Silc Lizard (Tokage) Renew f853d675e8 Fix ValueTrack with Resource is leaking 2023-11-16 02:12:39 +09:00
kobewi 8d71095622 Fix RESET not effective when saving inactive scene 2023-11-03 12:58:56 +01:00
Silc Lizard (Tokage) Renew a33884943f Add PackedArray to the list of enforcing Discrete for AnimationMixer 2023-11-03 09:35:17 +09:00