- add extra check whether the keyframes are well-ordered.
parent
5ff8c90a35
commit
29057096fd
|
@ -73,6 +73,10 @@ AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::s
|
||||||
DOMError("the number of key times does not match the number of keyframe values",&KeyTime);
|
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"];
|
const Element* KeyAttrDataFloat = sc["KeyAttrDataFloat"];
|
||||||
if(KeyAttrDataFloat) {
|
if(KeyAttrDataFloat) {
|
||||||
|
|
|
@ -1052,7 +1052,6 @@ private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
KeyFrameListList GetKeyframeList(const std::vector<const AnimationCurveNode*>& nodes)
|
KeyFrameListList GetKeyframeList(const std::vector<const AnimationCurveNode*>& nodes)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue