Commit graph

12 commits

Author SHA1 Message Date
m4nu3lf cfa11777c0 AnimationTreePlayer filters improved
Now the AnimationTreePlayer filters for Blend2 and OneShot nodes
behave as expected, that is the main animation is not affected by
the secondary animation if the track is filterd out for arbitarily
complex trees.
2016-06-22 19:34:12 +01:00
Rémi Verschelde b7dbf9207a Drop empty files that are not used anywhere
Part of #5272
2016-06-18 19:46:30 +02:00
Josh Grams bd95e18ae4 AnimationTree: add filters to Animation nodes. 2016-04-26 06:49:06 -04:00
Josh Grams ee59b2053f AnimationTreePlayer: fix discrete value tracks.
Discrete value tracks don't update every frame (only when a new key is
reached).  So we can't use the actual property value as an accumulator:
it will end up being zero most of the time.
2016-04-12 11:54:17 -04:00
Josh Grams aabb0d9cbc AnimationTreePlayer: allow animating resource properties.
e.g. Particles2D config and param values.
2016-04-11 20:10:35 -04:00
Josh Grams 4f6b2152e2 AnimationTreePlayer (transition_node_set_current): fix by removing copy-paste duplication. 2016-04-06 15:09:00 -04:00
Josh Grams 8920ab0fbf * AnimationTreePlayer (_process_node): remove switched argument.
The _process_node function (which recurses through the blend tree
generating blend values and the active animation list) had an argument
named `switched` which would loop an animation back to the beginning if
it had reached the end (regardless of whether or not it was supposed to
be a looping animation).

This argument was only used in four places: two of them were overridden
by a seek-to-zero, and I believe the other two are bugs.

In OneShot, it was used to reset the oneshot animation to the beginning
when fired. But this would fail if the oneshot node was fired before it
had completed its previous run. While this *could* be a valid way for
oneshot to work (firing does nothing if it's already running), the code
currently resets the fade-in, so I believe that it is intended to reset.
I replaced this usage with seek-to-0.

In Transition, it was used on the previous (fading out) animation when
seeking the Transition node, which I believe is incorrect: why would you
want to loop a non-looping animation instead of simply fading out from
the end? Also it will never happen unless you seek the Transition node
twice during one cross-fade.

The other two uses are in Transition and _process_animation, where it is
used along with a seek-to-zero which overrides it.
2016-03-27 07:19:05 -04:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Sergey Lapin 8eff61ca87 This fixes long standing animation bug
When AnimationTreePlayer switches to new animation it never
seeks it to 0 which leads to problems with non-looping animations being
played just once.

This patch is direct approach fixing this problem.
It handles most common cases of occurance.

Closes #2199
2015-12-10 16:39:57 +03:00
Saracen e011bcf162 Experimental retooling of AnimationTreePlayer to allow manual advancement. 2015-11-02 17:06:28 +00:00
Juan Linietsky fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
Juan Linietsky 0b806ee0fc GODOT IS OPEN SOURCE 2014-02-09 22:10:30 -03:00