- add extra check whether the keyframes are well-ordered.
parent
5ff8c90a35
commit
29057096fd
|
@ -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<KeyTimeList::value_type>())) {
|
||||
DOMError("the keyframes are not in ascending order",&KeyTime);
|
||||
}
|
||||
|
||||
const Element* KeyAttrDataFloat = sc["KeyAttrDataFloat"];
|
||||
if(KeyAttrDataFloat) {
|
||||
|
|
|
@ -1052,7 +1052,6 @@ private:
|
|||
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
KeyFrameListList GetKeyframeList(const std::vector<const AnimationCurveNode*>& nodes)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue