Merge pull request #79155 from Owl-A/bugfix-57779

Add 3.x compatibility for animation loop mode
This commit is contained in:
Rémi Verschelde 2023-07-10 13:17:37 +02:00
commit dbec337532
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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;
}