diff --git a/code/FBXAnimation.cpp b/code/FBXAnimation.cpp index 6497279e4..678f4c59d 100644 --- a/code/FBXAnimation.cpp +++ b/code/FBXAnimation.cpp @@ -72,7 +72,11 @@ AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::s if(keys.size() != values.size()) { DOMError("the number of key times does not match the number of keyframe values",&KeyTime); } - + + // check if the key times are well-ordered + if(!std::equal(keys.begin(), keys.end() - 1, keys.begin() + 1, std::less())) { + DOMError("the keyframes are not in ascending order",&KeyTime); + } const Element* KeyAttrDataFloat = sc["KeyAttrDataFloat"]; if(KeyAttrDataFloat) { diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index d38583973..5b4da48ab 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -1052,7 +1052,6 @@ private: - // ------------------------------------------------------------------------------------------------ KeyFrameListList GetKeyframeList(const std::vector& nodes) {