In glTF2 animations, log spam less when running.
(cherry picked from commit 882f7d9bdf
)
This commit is contained in:
parent
42ad091738
commit
6ba37005d1
1 changed files with 4 additions and 1 deletions
|
@ -5645,7 +5645,10 @@ struct EditorSceneImporterGLTFInterpolate<Quat> {
|
|||
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++) {
|
||||
|
|
Loading…
Reference in a new issue