summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorSilc Renew <tokage.it.lab@gmail.com>2022-12-08 21:38:01 +0900
committerSilc Renew <tokage.it.lab@gmail.com>2022-12-22 10:03:06 +0900
commit060fb2d093afbf72db495db79280c2386a2dc21d (patch)
tree7fd83b462d444c833f569eaf1c1be9d0836a20f2 /scene/animation
parent291add339f0228d58226def25c38ea4fdcea6fb5 (diff)
Add inspector plugin for key time edit & Change find key argument
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp8
-rw-r--r--scene/animation/animation_tree.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index cc6fadd9b2..2a32e3dd92 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -691,7 +691,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
}
} else {
if (p_started) {
- int first_key = a->track_find_key(i, p_prev_time, true);
+ int first_key = a->track_find_key(i, p_prev_time, Animation::FIND_MODE_EXACT);
if (first_key >= 0) {
indices.push_back(first_key);
}
@@ -761,7 +761,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
}
} else {
if (p_started) {
- int first_key = a->track_find_key(i, p_prev_time, true);
+ int first_key = a->track_find_key(i, p_prev_time, Animation::FIND_MODE_EXACT);
if (first_key >= 0) {
indices.push_back(first_key);
}
@@ -855,7 +855,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
//find stuff to play
List<int> to_play;
if (p_started) {
- int first_key = a->track_find_key(i, p_prev_time, true);
+ int first_key = a->track_find_key(i, p_prev_time, Animation::FIND_MODE_EXACT);
if (first_key >= 0) {
to_play.push_back(first_key);
}
@@ -968,7 +968,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double
//find stuff to play
List<int> to_play;
if (p_started) {
- int first_key = a->track_find_key(i, p_prev_time, true);
+ int first_key = a->track_find_key(i, p_prev_time, Animation::FIND_MODE_EXACT);
if (first_key >= 0) {
to_play.push_back(first_key);
}
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index b06a21dea9..426cad4de1 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -1383,7 +1383,7 @@ void AnimationTree::_process_graph(double p_delta) {
}
} else {
if (seeked) {
- int idx = a->track_find_key(i, time, !is_external_seeking);
+ int idx = a->track_find_key(i, time, is_external_seeking ? Animation::FIND_MODE_NEAREST : Animation::FIND_MODE_EXACT);
if (idx < 0) {
continue;
}
@@ -1406,7 +1406,7 @@ void AnimationTree::_process_graph(double p_delta) {
TrackCacheMethod *t = static_cast<TrackCacheMethod *>(track);
if (seeked) {
- int idx = a->track_find_key(i, time, !is_external_seeking);
+ int idx = a->track_find_key(i, time, is_external_seeking ? Animation::FIND_MODE_NEAREST : Animation::FIND_MODE_EXACT);
if (idx < 0) {
continue;
}
@@ -1440,7 +1440,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (seeked) {
//find whatever should be playing
- int idx = a->track_find_key(i, time, !is_external_seeking);
+ int idx = a->track_find_key(i, time, is_external_seeking ? Animation::FIND_MODE_NEAREST : Animation::FIND_MODE_EXACT);
if (idx < 0) {
continue;
}
@@ -1553,7 +1553,7 @@ void AnimationTree::_process_graph(double p_delta) {
if (seeked) {
//seek
- int idx = a->track_find_key(i, time, !is_external_seeking);
+ int idx = a->track_find_key(i, time, is_external_seeking ? Animation::FIND_MODE_NEAREST : Animation::FIND_MODE_EXACT);
if (idx < 0) {
continue;
}