Commit Graph

921 Commits

Author SHA1 Message Date
A Thousand Ships a29416e332 [Scene,Main] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-12 12:53:06 +02:00
kobewi bf9d971215 Check if property exists before tweening 2023-09-11 12:59:43 +02:00
Hendrik Brucker 5afe78bd9c Clean up/refactor GraphNode and make it more flexible
Split GraphNode into GraphElement and GraphNode, add custom
titlebar, and adjust theming.
2023-09-07 17:29:06 +02:00
kobewi 598d9972c8 Prevent errors if Tween callback's object is freed 2023-08-29 14:50:53 +02:00
Rémi Verschelde 0511f9d9a7
Merge pull request #80708 from garychia/anim_seek
Ensure methods skipped by `AnimationPlayer::seek` are not called
2023-08-17 15:44:03 +02:00
Chia-Hsiang Cheng 125ae78a89 Ensure methods skipped by AnimationPlayer::seek are not called 2023-08-17 17:35:54 +08:00
Rémi Verschelde c5a7462a00
Merge pull request #80702 from KoBeWi/lagging_animation
Fix initial value with delay in PropertyTweener
2023-08-17 11:28:15 +02:00
kobewi 1660575bd8 Fix initial value with delay in PropertyTweener 2023-08-17 10:28:26 +02:00
Chia-Hsiang Cheng ef5d0b1c06 Avoid emitting signals if the animation is not ready to be processed 2023-08-07 18:21:28 +08:00
kobewi dbecf8bd1a Improve and clarify paused Tweens 2023-07-25 13:29:30 +02:00
Yuri Sizov 752b89dc36 Merge pull request #79403 from TokageItLab/fix-negative-timescale-transition
Fix `AnimationNodeTransition` with negative time scale
2023-07-24 19:32:37 +02:00
Yuri Sizov 6a30f64dc8 Merge pull request #79595 from TokageItLab/rbmap-animblendtree
Make `AnimationNodeBlendTree` use `RBMap` insteads `HashMap`
2023-07-21 17:15:42 +02:00
Silc Lizard (Tokage) Renew a3cdacdc4e Make AnimationNodeBlendTree use RBMap insteads HashMap 2023-07-18 17:57:53 +09:00
kobewi de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
Silc Lizard (Tokage) Renew 1ac2bdd97b Fix NodeTransition with negative time scale 2023-07-13 08:38:53 +09:00
Silc Lizard (Tokage) Renew fc40ba21cd Fix infinity loop state can't break 2023-07-07 16:12:37 +09:00
Ninni Pipping 0c16082e1e Use `get_node_or_null` when null checks are present
Avoids duplicate or unnecessary errors
2023-06-10 13:22:56 +02:00
Ninni Pipping dcd2b883eb Use NULL instead of COND checks when appropriate
Restricted to scene
2023-06-10 08:56:30 +02:00
lawnjelly b69c8b4791 Single Compilation Unit build.
Adds support for simple SCU build (DEV_ENABLED only).
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-06-06 15:36:51 +01:00
Silc Lizard (Tokage) Renew c9c8205644 Implement NodeSub2 to AnimationTree & improve mathematical Nodes 2023-05-27 13:19:54 +09:00
kobewi 87a6145135 Fix AnimationPlayer cumulative speed_scale 2023-05-26 07:11:29 +02:00
Rémi Verschelde 7a176459b1
Merge pull request #76899 from rakkarage/spring-tween
Add TRANS_SPRING to Tween
2023-05-22 13:48:47 +02:00
SaracenOne 18c792fe42 Allocate unique track_blends vector for animation states.
Quick fix for a bug which occurs when blending the result of multiple instanced state machines outputting the same animation, but using filter tracks.
2023-05-18 20:02:43 +01:00
Rakka Rage 780e21bcac Add TRANS_SPRING to Tween 2023-05-17 17:54:37 -04:00
Rémi Verschelde 437041a983
Merge pull request #77141 from TokageItLab/optimize-tween-division
Optimize Tween calculations by caching some divisions
2023-05-17 11:25:30 +02:00
Silc Lizard (Tokage) Renew e09c3d8126 Optimize Tween calculations by caching some divisions 2023-05-17 07:03:45 +09:00
Rémi Verschelde 88f5b8d687
Merge pull request #74190 from TokageItLab/respect-fade-abort-oneshot
Fix NodeOneShot doesn't respect fade-out when aborting and improvement
2023-05-15 13:43:20 +02:00
Silc Lizard (Tokage) Renew 238bc9fe1f Fix NodeOneShot doesn't respect fade-out when aborting and improvement 2023-05-15 18:51:45 +09:00
Rémi Verschelde 3e6a731904
Merge pull request #76418 from reduz/method-bind-validated-call
Add ValidatedCall to MethodBind
2023-05-08 13:52:42 +02:00
Juan Linietsky 1c93606e47 Add ValidatedCall to MethodBind
* This should optimize GDScript function calling _enormously_.
* It also should simplify the GDScript VM considerably.

NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
2023-04-30 20:01:26 +02:00
Yuri Sizov 0562decf34 Unexpose AnimationTrackEditPlugin as not implemented 2023-04-25 11:38:17 +02:00
Silc Renew fac8a918f9 Expose interpolation methods for 3D track in Animation class 2023-04-25 01:45:14 +09:00
Rémi Verschelde 13544fb508
Merge pull request #75759 from TokageItLab/reimplement-grouped-statemachine
Rework for nested `AnimationNodeStateMachine`
2023-04-24 16:44:21 +02:00
Silc Renew 991e6e90ba Rework StateMachine and nested StateMachine process
Breaking compatibility: If a StateMachineTransition is connected to a nested StateMachine prior to this, it is removed. Also, there was a feature to connect another StateMachine as the End of a StateMachine, which is also removed to avoid reference confusion. It was like a GoTo Statement, also further passing the same reference to the blending process, causing the blending calculation to break or causing some StateMachines to not work.
2023-04-18 19:06:51 +09:00
yedpodtrzitko c01d2902d9 optimize blend position search 2023-04-08 18:49:06 +07:00
kobewi 20f03884f2 Various Tween code improvements 2023-04-03 15:40:02 +02:00
John Pennycook 4cb2085543 Add get_loops_left() function to Tween
Implements godotengine/godot-proposals#5141.

Adds a new get_loops_left() function to Tween, allowing developers to
reason about how many times a tweening sequence will repeat and whether
to expect finished or loop_finished as the next signal.

Co-authored-by: Tomek <kobewi4e@gmail.com>
2023-03-20 20:49:31 -07:00
kobewi 45f4d59fa4 Check for type mismatch in PropertyTweener.from() 2023-02-28 17:16:56 +01:00
Silc Renew ae5dadc8d1 Refactor NodeTransition/OneShot to handle seek/filter correctly 2023-02-13 10:04:51 +09:00
kobewi 17fe5c2b23 Fix tween_method() type validation 2023-02-12 22:08:25 +01:00
Rémi Verschelde 9075d5e932
Merge pull request #73120 from TokageItLab/fix-transition-reset-fade
Fix remaining fade doesn't clear when reset in AnimationNodeTransition
2023-02-11 22:03:35 +01:00
Silc Renew 7bf83a8603 Fix NodeOneShot fade-out doesn't blend animations correctly 2023-02-12 04:32:40 +09:00
Silc Renew 2a0beb1ef3 Fix remaining fade doesn't clear when reset in AnimationNodeTransition 2023-02-12 04:12:15 +09:00
Rémi Verschelde cac4cda89b
Merge pull request #73024 from TokageItLab/fix-transtition-first-frame
Fix broken first frame of `NodeTransition`/`NodeOneShot` when xfade is 0
2023-02-10 15:08:34 +01:00
Haoyu Qiu 26581ca574 Add some missing translatable editor strings 2023-02-10 16:55:50 +08:00
Silc Renew 836d62f0c6 Fix broken first frame of NodeTransition/NodeOneShot when xfade is 0 2023-02-10 13:57:11 +09:00
Silc Renew 7b18ad7d98 Add root motion accumulator to fix broken RootMotionView 2023-02-10 01:22:00 +09:00
Markus Sauermann 826e54fa73 Some code simplifications
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
2023-02-07 14:30:16 +01:00
Rémi Verschelde 3f02cf7ced
Merge pull request #72722 from TokageItLab/animtree-map
Fix AnimationNodeTransition initialization and AnimationNode remapping method
2023-02-07 08:36:00 +01:00
Silc Renew fff3ae1d89 Fix NodeTransition initialization and AnimationNode remapping method 2023-02-05 06:24:14 +09:00
Silc Renew b9b8130432 Fixed animation audio to play considering time when seeking 2023-02-05 03:57:52 +09:00
Rémi Verschelde 1d61150f8f
Merge pull request #72509 from TokageItLab/seekcon
Consistent with NodeTimeSeek parameters OtherNodes
2023-02-02 16:27:19 +01:00
Silc Renew 2a39b5bcde Remove meaningless `rename_parameter` in AnimationTree 2023-02-01 23:14:36 +09:00
Silc Renew 6782edd5a4 Consistent with NodeTimeSeek parameters OtherNodes 2023-02-01 20:58:36 +09:00
Rémi Verschelde d8e71dc51a
Merge pull request #72450 from TokageItLab/optional-restart
Make restart in NodeStateMachine / NodeTransition optional
2023-02-01 07:24:05 +01:00
Silc Renew 4525181c2d Make restart in NodeStateMachine / NodeTransition optional 2023-02-01 03:57:11 +09:00
Rémi Verschelde 92a6586fb6
Merge pull request #72396 from TokageItLab/bs1dconsist
Consistent with NodeBlendSpace1D option NodeBlendSpace2D
2023-01-31 15:55:53 +01:00
SaracenOne eff3828896 Force update AnimationTree player cache when AnimationPlayer changes. 2023-01-31 11:32:05 +00:00
Rémi Verschelde 73c1fa9826
Merge pull request #72383 from MewPurPur/correct-tween-errors
Fix error messages for {}Tweener.new()
2023-01-30 20:27:06 +01:00
Silc Renew a0c4f849e0 Consistent with NodeBlendSpace1D option NodeBlendSpace2D
Co-authored-by: Skrapion <rick@firefang.com>
2023-01-31 02:14:55 +09:00
VolTer 5313bc90f6 Fix error messages of {}Tweener.new() 2023-01-30 17:58:20 +01:00
Rémi Verschelde 551f5191e5
Merge pull request #72388 from TokageItLab/transition-reset-each
Allow the Reset option of NodeTransition to be set for each Input
2023-01-30 17:35:00 +01:00
Silc Renew 2dd3abd0c5 Allow the Reset option of NodeTransition to be set for each Input 2023-01-31 00:40:45 +09:00
Silc Renew f8d529a232 Allow seek() without assigned animation in AnimationPlayer 2023-01-30 23:54:20 +09:00
Rémi Verschelde 38f8411ed8
Merge pull request #71964 from bruvzg/mat_key
Fix unsafe murmur3 hash use for the default material keys, expose alpha hash transparency mode for default materials and Label3D and Sprite3D.
2023-01-30 10:03:49 +01:00
Silc Renew d27005f80e Remove the max input limit & cleanup AnimationNodeTransition API 2023-01-30 03:52:55 +09:00
Silc Renew fa198c482e Fix AnimatedSprite play() don't redraw immediately 2023-01-29 08:00:42 +09:00
Silc Renew 75330887d7 Implement blending audio feature to AnimationTree 2023-01-28 20:08:29 +09:00
Rémi Verschelde 91c0ed5e33
Merge pull request #71907 from TokageItLab/change-animated-sprite-api
Make `AnimatedSprite`'s playback API consistent with `AnimationPlayer`
2023-01-27 10:32:23 +01:00
Silc Renew d33fdfcdad Fix AnimationTree MethodTrack discards all process 2023-01-27 17:44:25 +09:00
Silc Renew 9ef2fb3cd4 Make AnimTree/Player processes adopt to GDVIRTUAL 2023-01-26 23:22:57 +09:00
Silc Renew 4e56c2b0b0 Fix spamming audio preview and cleanup process in AnimationPlayer/Tree 2023-01-26 14:09:25 +09:00
Silc Renew 17bf6238fc Make AnimatedSprite's playback API consistent with AnimationPlayer 2023-01-26 12:40:19 +09:00
SaracenOne 02a82c9531 Add indicator for state machine transition fade progress and position of state transitioning from. 2023-01-25 10:17:55 +00:00
Aaron Franke 2bc0bcbd26
PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE" 2023-01-24 16:05:07 -06:00
bruvzg 1c774a6083
Fix unsafe murmur3 hash use for the default material keys, expose alpha hash transparency mode for default materials and Label3D and Sprite3D. 2023-01-24 12:24:53 +02:00
Rémi Verschelde 285e6ed9a5
Merge pull request #71840 from TokageItLab/fix-travel-reset
Fix weird behavior of teleporting to self-state when `reset_on_teleport` is `false` in StateMachine
2023-01-22 11:08:57 +01:00
Rémi Verschelde c0f35a8db1
Merge pull request #71839 from TokageItLab/expose-fading-from-statemachine
Expose `fading_from` from StateMachine
2023-01-22 11:08:34 +01:00
Rémi Verschelde 813d7c417b
Merge pull request #71823 from TokageItLab/fix-bezier-init
Fix wrong BezierTrack init value
2023-01-22 11:08:09 +01:00
Silc Renew a6d8afc90c Fix weird behavior of teleporting to self-state when reset is false 2023-01-22 16:16:48 +09:00
Silc Renew 8b04f58604 Expose fading_from_node from StateMachine 2023-01-22 15:50:53 +09:00
Silc Renew 451cb5577d Fix wrong BezierTrack init value 2023-01-22 06:52:40 +09:00
kobewi 615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Silc Renew 3bb298b78a Fix max limit of AnimationNodeTransition input count in the inspector 2023-01-21 14:57:36 +09:00
Rémi Verschelde d919d77367
Merge pull request #71418 from TokageItLab/restart-anim-tree
Allow AnimationStateMachine / AnimationNode to restart when transitioning to the same state
2023-01-19 21:52:35 +01:00
Rémi Verschelde a202f5104f
Merge pull request #71264 from TokageItLab/improve-statemachine
Add next/reset function to `AnimationStateMachine`
2023-01-19 21:52:05 +01:00
Silc Renew e480262c53 Allow AnimationNodes to restart when transitioning to the same state 2023-01-19 03:10:59 +09:00
Silc Renew 8bfaf098c7 Add next/reset function to AnimationStateMachine 2023-01-19 03:10:45 +09:00
Silc Renew d16004f297 Add p_keep_state to AnimationPlayer::stop() 2023-01-19 01:05:46 +09:00
kobewi 1260cb0bfb Improve empty Tween error message 2023-01-16 10:30:21 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
Tomasz Chabora 4668a186db Reset animation on playback stop 2023-01-13 13:41:37 +01:00
kobewi f64dd732b8 Improve some Tween internals 2023-01-11 14:08:14 +01:00
kobewi da9396881e Split pause() from AnimationPlayer's stop() 2023-01-11 14:03:31 +01:00
Yuri Sizov 82c00c21e6 Simplify some editor plugin logic and remove dead code 2023-01-05 21:04:54 +03:00
Rémi Verschelde d95794ec8a
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".
2023-01-05 13:25:55 +01:00
Rémi Verschelde d322c154a6
Merge pull request #70795 from KoBeWi/TweenCounted
Improve `RefCounted` support in `Tween`
2023-01-05 12:56:53 +01:00
kobewi a6e02f149f Improve RefCounted support in Tween 2023-01-01 18:45:17 +01:00
Silc Renew 74e0903bb8 Fix wrong AnimationStateMachine process for end of fading 2022-12-26 13:08:08 +09:00
Rémi Verschelde ecd895a860
Merge pull request #70278 from TokageItLab/add-animation-started-finished-signal-to-tree
Add `animation_started/finished` signals to `AnimationTree` and fix time accuracy in StateMachine
2022-12-23 09:08:17 +01:00
Rémi Verschelde 8eec9f7d3c
Merge pull request #69797 from TokageItLab/time-edit-inspector-plugin
Animation: Add inspector plugin for key time edit & Change `track_find_key()` argument to find key with approximate
2022-12-23 09:07:15 +01:00
Rémi Verschelde 9b4888b7c9
Merge pull request #65312 from SaracenOne/auto_advance_behaviour
Make auto-advance flag a requirement for conditional/expression evaluation
2022-12-23 09:05:49 +01:00
Rémi Verschelde d894fa8ba3
Merge pull request #37001 from jitspoe/master.anim_blend_fix
Fix for short animation blend taking too long when played during a long animation blend.
2022-12-22 08:51:06 +01:00
Silc Renew 060fb2d093 Add inspector plugin for key time edit & Change find key argument 2022-12-22 10:03:06 +09:00
jitspoe 7a7f5a2216 Fix animation blending bug where an animation with a short blend time played immediately after an animation with a long blend time would play with a long blend time or cause popping/incorrect animation positions. 2022-12-21 17:40:44 -05:00
Silc Renew 95abe32b76 Fix StateMachine cannot connect nodes bug 2022-12-21 06:30:33 +09:00
Silc Renew 4cd144d5fb Add animation_started/finished signals to AnimationTree 2022-12-21 01:20:22 +09:00
Silc Renew bd0541c25b Fixed a bug where negative Blend values were being discarded 2022-12-20 03:41:57 +09:00
SaracenOne 092dbe52a9 Change auto_advance flag to advance_mode enum and unify with disabled flag.
Expressions and conditions now require auto mode to be set to auto.
Adds a toggle button to the state machine editor for whether new transitions
advance settings should default to auto mode or not.
2022-12-16 07:42:59 +00:00
Silc Renew b0eb3b6ebd Add null checks to AnimationTreeEditors and _clear_editors() 2022-12-13 03:06:51 +09:00
Silc Renew af7595a9fb Fix seeking process order to retrieve key correctly for AnimationTrack 2022-12-12 06:27:26 +09:00
Silc Renew c87e9f0b7c Fix unmerged history in AnimationTrackEditor 2022-12-10 22:21:38 +09:00
Silc Renew bd8395882e Change init for cache_update_size & add pointer animation player 2022-12-07 22:34:41 +09:00
Rémi Verschelde c92e70e711
Merge pull request #69685 from TokageItLab/fix-immediate-method-anim
Fix AnimationPlayer method track call oneself with IMMEDIATE mode
2022-12-07 13:26:41 +01:00
Silc Renew d3b77d9cc3 Fix AnimationPlayer method track call oneself with IMMEDIATE mode 2022-12-07 19:48:06 +09:00
Medhat Riad 03474b0985 Avoid error spamming in animation_tree when path is not found 2022-12-07 10:36:12 +01:00
Silc Renew 8c540b1d71 Fix animation play backward doesn't process current key&animtrack seek 2022-12-05 15:59:08 +09:00
Silc Renew 83135aa122 Remove UPDATE_TRIGGER & Match behaviors between AnimationTree/Player
#69357
2022-12-02 20:28:10 +09:00
Rémi Verschelde 8c094207a0
Merge pull request #61958 from jtnicholl/animation_connections
Add `animation_changed` signal to `AnimationLibrary`, have `AnimationPlayer` connect to it instead of `Animation`'s `changed`
2022-12-02 12:24:32 +01:00
Rémi Verschelde 10e9a85607
Merge pull request #69336 from TokageItLab/get-anim-keys-more-exactly
Refactor process of animation to retrive keys more exactly
2022-12-02 12:24:24 +01:00
Silc Renew 962b6a3e8f Fix animation signal caches_cleared firing timing 2022-12-02 15:02:36 +09:00
Silc Renew 1fc3833617 Refactor process of animation to retrive keys more exactly 2022-12-01 22:07:47 +09:00
Silc Renew c1a29f5ef4 Remove unneeded calc in root motion 2022-12-01 11:11:21 +09:00
Silc Renew 9a3d9c6cae Emphasize the warning about special case blend for animation 2022-12-01 02:13:24 +09:00
Rémi Verschelde 12f0660518
Merge pull request #68992 from TokageItLab/animtree-trackend-process
Refactor process of AnimationTree for end of animation
2022-11-28 14:49:19 +01:00
Rémi Verschelde bb9cd4063e
Merge pull request #69199 from TokageItLab/fix-and-refactor-root-motion
Fix broken root motion scale & Refactor API & Add sample codes in documentation
2022-11-28 14:49:04 +01:00
Silc Renew 1193c2641b Fixed AnimationTree TrackCacheValue bug for special case blending 2022-11-27 13:29:38 +09:00
Silc Renew 09adf5f20e Fix broken root motion scale and refactor API 2022-11-26 17:26:10 +09:00
Rémi Verschelde a8a88194a5
Merge pull request #68993 from TokageItLab/fix-anim-blending-for-DISCRETE-mode
Fix animation blending for value track `UPDATE_DISCRETE` and `UPDATE_TRIGGER` mode
2022-11-23 10:25:19 +01:00
Mai Lavelle ac15f6a7e2 Fix blending with negative blend weights 2022-11-22 20:51:41 -05:00
Silc Renew c1ec99f0e1 Refactor process of AnimationTree for end of animation 2022-11-22 18:12:45 +09:00
Rémi Verschelde dff8a51c6c
Merge pull request #68593 from TokageItLab/optimize-blend-animation
Optimize animation blend tree process
2022-11-22 09:59:54 +01:00
Silc Renew dce3e07fb2 Fix animation blending for value track DISCRETE/TRIGGER mode 2022-11-22 17:39:29 +09:00
Jonathan Nicholl f8021dae9c Add animation_changed signal to AnimationLibrary
AnimationLibrary now listens for the animation_changed signal on its
animations and emits this new signal, with the animation name added
on. AnimationPlayer now connects to this signal rather than connecting
to each individual animation, which was poor practice due to bypassing
encapsulation.
2022-11-21 15:39:03 -05:00
Silc Renew b739bafd51 Fix connection of animation changed signal in AnimationTrackEditor 2022-11-20 06:38:51 +09:00
Silc Renew 17ce879a15 Optimize animation blend tree process 2022-11-16 02:52:04 +09:00
Rémi Verschelde be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Marc Gilleron 7543a5e014 Rename queue_delete => queue_free
# Conflicts:
#	editor/plugins/tiles/tiles_editor_plugin.cpp
2022-10-24 22:07:02 +01:00
kobewi d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
Juan Velandia 6e603f202f Connect signal animation_removed to its proper method 2022-10-10 18:39:49 -05:00
Rémi Verschelde 8c24b35b76 Merge pull request #65942 from SaracenOne/animation_change_callback_fix
Fix animation change callbacks
2022-10-10 13:53:53 +02:00
Rémi Verschelde 2b376437a2 Merge pull request #65983 from Mickeon/rename-audio-player-volume-db
Rename AudioStreamPlayer3D's `unit_db` to `volume_db`
2022-10-08 13:56:10 +02:00
Rémi Verschelde c723125dfc Merge pull request #67020 from GuilhermeGSousa/remove-transition-expression-node
Remove expression base node for transitions
2022-10-07 14:23:00 +02:00
Guilherme Sousa 12940e53c1 Remove expression base node for transitions 2022-10-07 11:13:43 +02:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde 7562932eb2 Merge pull request #66160 from dpalais/double_time
Use double instead of real_t type for time-related parameters and variables
2022-09-27 10:04:10 +02:00
Dave Palais 0c46068af0 Change time parameters and variables to double type
Addresses #65313
2022-09-26 13:52:54 -05:00
Rémi Verschelde fa85821199 Merge pull request #66301 from GuilhermeGSousa/fix-animation-transition-expressions
Fix expression base path on transitions
2022-09-26 15:50:32 +02:00
Rémi Verschelde 49fcf4ffad Style: Cleanup header guards for consistency
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-26 13:51:17 +02:00
Guilherme Sousa 5e5bb088de Fix expression base path on transitions 2022-09-25 09:00:03 +02:00
Marc Gilleron aed3822a93 Change return type of `get_configuration_warnings` to `PackedStringArray` 2022-09-19 16:43:15 +01:00
Micky eb0cc08a23 Rename AudioStreamPlayer3D's `unit_db` to `volume_db`
AudioStreamPlayer3D.`unit_db` -> `volume_db`

Now matches the same name AudioStreamPlayer and AudioStreamPlayer2D use.
2022-09-17 16:06:30 +02:00
SaracenOne 6a8fbf3d25 Fix animation change callbacks 2022-09-16 14:04:24 -07:00
kobewi 1a462bc84e Fix crash when playing Tween right after finishing 2022-09-16 14:20:12 +02:00
Rémi Verschelde a981a8061f Merge pull request #65325 from TokageItLab/refactor-variant-for-anim
Move some static methods to `Animation` from `Variant` for refactoring `Animation` and `Tween`
2022-09-16 09:20:50 +02:00
Rémi Verschelde 80802d2718 Merge pull request #65196 from TokageItLab/fix-redraw-anim-tree
Fix redraw timing in `AnimationBlendTreeEditor`
2022-09-15 20:11:36 +02:00
Silc Renew 9d47e079b7 Move some methods to Animation from Variant for refactoring 2022-09-15 04:52:43 +09:00
Silc Renew cff95e54e0 Fix redraw timing in AnimationBlendTreeEditor 2022-09-14 21:05:21 +09:00
Micky dd26ecdd31 Rename CONNECT_ONESHOT TO CONNECT_ONE_SHOT
For consistency. Every other exposed `one_shot` is spaced out like this.
2022-09-06 19:00:33 +02:00
Hugo Locurcio f7292dbeb3
Rename `or_lesser` range property hint to `or_less`
"less" should be used for quantity, rather than "lesser".

Existing scripts that use `or_lesser` in `_get_property_list()`
will need to be updated to account for this change.
2022-09-02 19:08:20 +02:00
Rémi Verschelde 736632ee7e
Merge pull request #63893 from guilhermefelipecgs/fix_state_machine_is_playing
Fix AnimationNodeStateMachinePlayback::is_playing
2022-08-31 17:41:17 +02:00
Rémi Verschelde fbf8632556
Merge pull request #64247 from guilhermefelipecgs/fix_end_node
Re-add AnimationNodeStateMachine::end_node for root state machine
2022-08-31 17:40:38 +02:00
Rémi Verschelde 7b63e5db1e
Merge pull request #59919 from piiertho/enhancement/rename-AnimationNodeTransition-input_count-to_enabled_inputs 2022-08-31 12:07:31 +02:00
Pierre-Thomas Meisels 9391316b8e enhancement: Rename declared property AnimationNodeTransition::input_count to AnimationNodeTransition::enabled_inputs 2022-08-31 10:34:03 +02:00
Hugo Locurcio ae18928748
Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`
"sampling" is a more accurate term than "interpolating" for what's
happening when using that function.
2022-08-30 22:08:38 +02:00
Micky 2b18a4002c Cast between float and ints in Tween.`tween_property()` 2022-08-30 10:53:31 +02:00
Haoyu Qiu 385a5b44aa Improve documentation for `get_animation()` 2022-08-29 14:54:57 +08:00
Silc Renew 931fb4dc11 Add linear/cubic angle interpolation to Animation interpolation type 2022-08-27 07:58:22 +09:00
Rémi Verschelde f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Micky 59e11934d8 Rename `str2var` to `str_to_var` and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde 0123752dc4
Merge pull request #54456 from rafallus/fix/anim_state_machine_start
Fix AnimationTree state machine start()
2022-08-26 07:47:11 +02:00
Rémi Verschelde b9919fd87d
Merge pull request #64678 from TokageItLab/implement-ease-baker
Fix Quaternion Tween and add Easing baker to AnimationTrackEditor
2022-08-23 09:19:21 +02:00
Rémi Verschelde b8a64313f0
Merge pull request #59564 from KoBeWi/FINALLY,_ULTIMATE_UNDO_REDO 2022-08-22 22:37:33 +02:00
Rémi Verschelde 9c567a0604
Merge pull request #63802 from TokageItLab/curve-transition 2022-08-22 22:30:09 +02:00
Rémi Verschelde 1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
kobewi ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Yuri Sizov 1a24c9e14b Make `_validate_property` a multilevel method 2022-08-22 18:35:11 +03:00
Silc Renew f7dd83ce60 Fix Quaternion Tween and implement ease baker 2022-08-22 19:04:58 +09:00
Aaron Franke 8893b2bdb4
Clean up mesh include code and comments 2022-08-20 13:24:40 -05:00
Silc Renew 2c2e1a7736 added Curve in animation node transition for better control over cros…
Co-authored-by: jeronimo-schreyer <jeronimo.schreyer@gmail.com>
2022-08-18 08:17:30 +09:00
Guilherme Felipe de C. G. da Silva 15b5bc88e2 Re-add AnimationNodeStateMachine::end_node for root state machine
Fix #63660
2022-08-10 19:29:53 -03:00
Yuri Sizov 1362bc22bd Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript 2022-08-08 16:36:01 +03:00
Guilherme Felipe de C. G. da Silva a2e63096c6 Fix AnimationNodeStateMachinePlayback::is_playing
Fix #24790
2022-08-03 14:38:57 -03:00
Guilherme Felipe de C. G. da Silva 0ad580a740 Fix AnimationNodeStateMachine::rename_node 2022-07-31 18:47:19 -03:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Hugo Locurcio aaeb60eafc
Add a Movie Quit On Finish property to AnimationPlayer
This quits the project when an animation is done playing in the
given AnimationPlayer, but only in Movie Maker mode.
When this happens, a message is printed with the absolute path of the
AnimationPlayer node that caused the engine to quit.

This can be used to create videos that stop at a specified time
without having to write any script.

A report is now also printed to the console when the video is done
recording (as long as the engine was exited properly).
This report is unfortunately not always visible in the editor's
Output panel, as it's printed too late.

A method was also added to get the path to the output file from the
scripting API.
2022-07-27 18:50:28 +02:00
Silc Renew dde235ad82 add position track normalization & post process key value for retarget 2022-07-26 18:48:08 +09:00
Silc Renew e27119a51f Fix initial value of TRS3DTrack cache in AnimationPlayer 2022-07-26 05:32:26 +09:00
Rémi Verschelde 90019676b0 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 11:17:40 +02:00
Rémi Verschelde 3084a48ace
Merge pull request #63219 from reduz/implement-vector4-projection 2022-07-25 11:13:27 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
João Pedro São Gregorio Silva 324b4884d6 Fix incorrect expression base in `AnimationNodeStateMachinePlayback::_check_advance_condition` 2022-07-21 16:36:52 +02:00
Silc Renew 9be288edf9 refactor sync in AnimationTree 2022-07-16 21:45:32 +09:00
Rémi Verschelde d631ee3307
Merge pull request #62510 from MinusKube/animation-reset-crash
Fix animation player crashing when caching disabled tracks
2022-06-29 10:19:33 +02:00
MinusKube a73882305c Fix animation player crashing when caching disabled tracks 2022-06-29 06:18:45 +02:00
Silc Renew 2201c281dd fixed Pingpong animation get snaging on the edge in AnimationTree 2022-06-29 08:39:41 +09:00
SaracenOne 75a8606b83 Add AnimationTree Advance Expressions
Allows specifying an expression as a condition for state machine transitions.

This gives much greater flexibility for creating complex state machines. By directly interfacing with the script code, it is possible to create complex animation advance condition for switching between states.

Ensure assigning AnimationTreeStateMachineTransition base expression node in editor is relative to current AnimationTree node.

Allow setting an expression base node on the AnimationTree itself.

Co-Authored-By: reduz <reduzio@gmail.com>
2022-06-28 09:26:13 -07:00
Rémi Verschelde 1a4a4856f6
Merge pull request #61885 from TokageItLab/fix-method-seek
Improved way of getting MethodTrack keys
2022-06-23 10:07:45 +02:00
Rémi Verschelde 21b51fdf7e
Merge pull request #61826 from guilhermefelipecgs/fix_leak
Fix ObjectDB instances leaked on state machine when editor closes
2022-06-23 09:58:51 +02:00
Rémi Verschelde 64918e4ae9
Merge pull request #62337 from reduz/respect-disabled-animation-tracks
Respect disabled animation tracks
2022-06-23 09:13:54 +02:00