Commit graph

81 commits

Author SHA1 Message Date
Rémi Verschelde
f8bae10be6
Merge pull request #87171 from TokageItLab/retrieve-time-info-from-anim-tree
Rework AnimationNode process for retrieving the semantic time info
2024-03-24 01:12:42 +01:00
Silc Lizard (Tokage) Renew
6dd410854c Rework AnimationNode process for retrieving the semantic time info 2024-03-20 22:52:26 +09:00
Micky
3c371b989f Add autocompletion to AnimationNode 2024-03-01 17:07:02 +01:00
Rémi Verschelde
21f0529aa9
Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa4.
2024-02-17 19:03:21 +01:00
RedMser
d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +01:00
Silc Lizard (Tokage) Renew
5acf6b4ca6 Remove differences of the code between old AnimationTree and Mixer 2023-12-06 02:29:29 +09:00
Silc Lizard (Tokage) Renew
1b95827d3e Implement AnimationManager the base class of AnimationPlayer/Tree 2023-09-29 08:23:57 +09: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
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
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
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
Silc Renew
7b18ad7d98 Add root motion accumulator to fix broken RootMotionView 2023-02-10 01:22:00 +09:00
Silc Renew
fff3ae1d89 Fix NodeTransition initialization and AnimationNode remapping method 2023-02-05 06:24:14 +09:00
Silc Renew
2a39b5bcde Remove meaningless rename_parameter in AnimationTree 2023-02-01 23:14:36 +09: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
Silc Renew
9ef2fb3cd4 Make AnimTree/Player processes adopt to GDVIRTUAL 2023-01-26 23:22:57 +09:00
Silc Renew
e480262c53 Allow AnimationNodes to restart when transitioning to the same state 2023-01-19 03:10:59 +09: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
Silc Renew
1fc3833617 Refactor process of animation to retrive keys more exactly 2022-12-01 22:07:47 +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
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
Silc Renew
c1ec99f0e1 Refactor process of AnimationTree for end of animation 2022-11-22 18:12:45 +09:00
Silc Renew
dce3e07fb2 Fix animation blending for value track DISCRETE/TRIGGER mode 2022-11-22 17:39:29 +09:00
Silc Renew
17ce879a15 Optimize animation blend tree process 2022-11-16 02:52:04 +09:00
Dave Palais
0c46068af0 Change time parameters and variables to double type
Addresses #65313
2022-09-26 13:52:54 -05:00
Marc Gilleron
aed3822a93 Change return type of get_configuration_warnings to PackedStringArray 2022-09-19 16:43:15 +01:00
Silc Renew
cff95e54e0 Fix redraw timing in AnimationBlendTreeEditor 2022-09-14 21:05:21 +09:00
Silc Renew
931fb4dc11 Add linear/cubic angle interpolation to Animation interpolation type 2022-08-27 07:58:22 +09:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Silc Renew
dde235ad82 add position track normalization & post process key value for retarget 2022-07-26 18:48:08 +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
Silc Renew
9be288edf9 refactor sync in AnimationTree 2022-07-16 21:45:32 +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
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Rémi Verschelde
5b3d596285
Merge pull request #60774 from TokageItLab/root-seek-mode
Fixed broken root motion calculation in internal process of `AnimationBlendTree` such as `NodeOneShot`
2022-05-18 15:24:21 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Silc Renew
ba8398f270 Fixed delta & Implement selection of whether or not to seek root 2022-05-09 08:28:32 +09:00
Guilherme Felipe
e7056c195d Improvements of state machine
- Open the menu to add new animation nodes by dragging the transitions to
empty areas and automatically connecting them.
- Adds box selection to the state machine.
- Add feature to group/ungroup selected nodes in a "sub" state machine.
- Add start/end node by default. In addition, add new color to these
nodes to differentiate then.
- Add tooltip for transitions to show the connection "from -> to".
- Add new "type" of transition line when multiple transitions are
grouped.
- Add popup to connect nodes in sub state machine.
- Add dialog to select which nodes can be deleted when they are grouped.
- Add classes:
	AnimationNodeStartState
	AnimationNodeEndState
	EditorAnimationMultiTransitionEdit
- Implements disabled transition

API Changes:
- Now it's posible to add transitions between state machines,
`AnimationNodeStateMachine::add_transition` will works with relative path,
this means you can use it like this `add_transition("Idle", "Walk", tr)`
or `add_transition("Idle", "StateMachine/Shoot)`.
2022-05-02 13:06:36 -03:00
Silc 'Tokage' Renew
3ce843c128 Discontinue exp map in blending 2022-04-17 04:34:28 +09:00
Silc 'Tokage' Renew
860fac4e6f Make blend animation to use ResetTrack as default value 2022-04-10 13:00:00 +09:00
Silc 'Tokage' Renew
b06d253920 Fix blend animation to solve TRS track bug & blend order inconsistency 2022-03-16 05:11:55 +09:00
Silc 'Tokage' Renew
0650846248 Make AnimationTree delta argument force double in core 2022-01-29 05:07:30 +09:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Silc 'Tokage' Renew
953a7bce7e reimplement ping-pong 2021-11-03 13:39:33 +09:00
Marcel Admiraal
87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
reduz
ae1c016547 Implement Animation Blend Shape Tracks
* New track type BLEND_SHAPE
* Blend shapes are imported via this new track type
* Processing is more optimized (no longer relies on variants)
* Modified the Blend Shape API in MeshInstance3D to use indices rather than StringNames (more optimizes)
* Promo: Fixed a small bug in gizmo updating in Node3D that affected performance

Dedicated BlendShape tracks are required for both optimization and eventually implementing them in animation compression.
2021-10-16 08:36:05 -03:00
reduz
ec19ed3723 Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.

This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:

* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.

*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 20:08:42 -03:00