summaryrefslogtreecommitdiffstats
path: root/scene/resources/animation.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-07-10 13:17:37 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-07-10 13:17:37 +0200
commitdbec337532be33135819e6df7f0074756a9f0242 (patch)
tree9f02adb7fe7fa8db586307cafdb3fcbd8f39d88a /scene/resources/animation.cpp
parent7e36223da02cb94a81a21b7d94dd73c15ad91a84 (diff)
parent1686a7a1a272021d8c3d0929c6a25923bebf889d (diff)
downloadredot-engine-dbec337532be33135819e6df7f0074756a9f0242.tar.gz
Merge pull request #79155 from Owl-A/bugfix-57779
Add 3.x compatibility for animation loop mode
Diffstat (limited to 'scene/resources/animation.cpp')
-rw-r--r--scene/resources/animation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 7078d60de5..1ab6e714a8 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -427,6 +427,11 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
} else {
return false;
}
+#ifndef DISABLE_DEPRECATED
+ } else if (prop_name == "loop" && p_value.operator bool()) { // Compatibility with Godot 3.x.
+ loop_mode = Animation::LoopMode::LOOP_LINEAR;
+ return true;
+#endif // DISABLE_DEPRECATED
} else {
return false;
}