You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Fix glTF cubic spline track interpolation incorrectly reporting times/values size mismatch (3.4 specific)
(cherry picked from commit 999bba6916)
This commit is contained in:
committed by
Rémi Verschelde
parent
1f35876fd5
commit
619c1e506e
@@ -5770,7 +5770,7 @@ struct EditorSceneImporterGLTFInterpolate<Quat> {
|
|||||||
template <class T>
|
template <class T>
|
||||||
T GLTFDocument::_interpolate_track(const Vector<float> &p_times, const Vector<T> &p_values, const float p_time, const GLTFAnimation::Interpolation p_interp) {
|
T GLTFDocument::_interpolate_track(const Vector<float> &p_times, const Vector<T> &p_values, const float p_time, const GLTFAnimation::Interpolation p_interp) {
|
||||||
ERR_FAIL_COND_V(!p_values.size(), T());
|
ERR_FAIL_COND_V(!p_values.size(), T());
|
||||||
if (p_times.size() != p_values.size()) {
|
if (p_times.size() != (p_values.size() / (p_interp == GLTFAnimation::INTERP_CUBIC_SPLINE ? 3 : 1))) {
|
||||||
ERR_PRINT_ONCE("The interpolated values are not corresponding to its times.");
|
ERR_PRINT_ONCE("The interpolated values are not corresponding to its times.");
|
||||||
return p_values[0];
|
return p_values[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user