Commit Graph

110 Commits

Author SHA1 Message Date
Silc Lizard (Tokage) Renew ed9c091a92 Fix infinity loop state can't break
(cherry picked from commit fc40ba21cd)
2023-07-10 17:26:14 +02: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 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 fff3ae1d89 Fix NodeTransition initialization and AnimationNode remapping method 2023-02-05 06:24:14 +09:00
Silc Renew 4525181c2d Make restart in NodeStateMachine / NodeTransition optional 2023-02-01 03:57:11 +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
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
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 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
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 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 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
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 1fc3833617 Refactor process of animation to retrive keys more exactly 2022-12-01 22:07:47 +09:00
Silc Renew c1ec99f0e1 Refactor process of AnimationTree for end of animation 2022-11-22 18:12:45 +09: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
Guilherme Sousa 5e5bb088de Fix expression base path on transitions 2022-09-25 09:00:03 +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
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
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
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
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
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
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 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
FireForge 4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
Guilherme Felipe de C. G. da Silva 7fc3aa43ce Fix ObjectDB instances leaked on state machine when editor closes 2022-06-08 17:08:48 -03:00
Rémi Verschelde 9923851370 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:32:19 +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
ScottVMariotte c526ee6683 Replaced loops_current with end_loop 2022-04-14 18:18:00 -04:00
Rémi Verschelde 0f5455230c
Use `switch` consistently in `_notification` (`scene` folder) 2022-02-15 18:44:55 +01:00