summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-07-29 22:56:19 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-07-29 22:56:19 -0700
commit882f7d9bdf0e26cc6e09a7d7b0c699a318baa1c1 (patch)
treef41886cdda1c62cafd3986e80a6f2db73fcbf33b /modules
parentbdcc8741e4826ce27850bbffa5880c57451e3be5 (diff)
In glTF2 animations, log spam less when running.
Diffstat (limited to 'modules')
-rw-r--r--modules/gltf/gltf_document.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 30d023606f..24d43858b5 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -5531,7 +5531,10 @@ struct EditorSceneImporterGLTFInterpolate<Quaternion> {
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) {
ERR_FAIL_COND_V(!p_values.size(), T());
- ERR_FAIL_COND_V(p_times.size() != p_values.size(), p_values[0]);
+ if (p_times.size() != p_values.size()) {
+ ERR_PRINT_ONCE("The interpolated values are not corresponding to its times.");
+ return p_values[0];
+ }
//could use binary search, worth it?
int idx = -1;
for (int i = 0; i < p_times.size(); i++) {