From 8fcb0355631f64404e1eafa195d473ea533fb2fe Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Tue, 14 Mar 2023 17:30:32 +0900 Subject: [PATCH] Ignore non-exist property reanimated Change-Id: Ia3681f333e63f7c9f72cd910fb58a805e7be71ef Signed-off-by: Eunki, Hong --- .../public-api/loader/animated-property.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/dali-scene3d/public-api/loader/animated-property.cpp b/dali-scene3d/public-api/loader/animated-property.cpp index a3969ff..15110c7 100644 --- a/dali-scene3d/public-api/loader/animated-property.cpp +++ b/dali-scene3d/public-api/loader/animated-property.cpp @@ -25,19 +25,22 @@ void AnimatedProperty::Animate(Animation& anim, GetActor getActor) if(Actor actor = getActor(*this)) { Property prop = GetProperty(actor); - if(mKeyFrames) + if(prop.propertyIndex != Property::INVALID_INDEX) { - anim.AnimateBetween(prop, mKeyFrames, mAlphaFunction, mTimePeriod); - } - else if(mValue) - { - if(mValue->mIsRelative) + if(mKeyFrames) { - anim.AnimateBy(prop, mValue->mValue, mAlphaFunction, mTimePeriod); + anim.AnimateBetween(prop, mKeyFrames, mAlphaFunction, mTimePeriod); } - else + else if(mValue) { - anim.AnimateTo(prop, mValue->mValue, mAlphaFunction, mTimePeriod); + if(mValue->mIsRelative) + { + anim.AnimateBy(prop, mValue->mValue, mAlphaFunction, mTimePeriod); + } + else + { + anim.AnimateTo(prop, mValue->mValue, mAlphaFunction, mTimePeriod); + } } } } -- 2.7.4