Ignore non-exist property reanimated 80/289780/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 14 Mar 2023 08:30:32 +0000 (17:30 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 14 Mar 2023 08:30:32 +0000 (17:30 +0900)
Change-Id: Ia3681f333e63f7c9f72cd910fb58a805e7be71ef
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-scene3d/public-api/loader/animated-property.cpp

index a3969ff..15110c7 100644 (file)
@@ -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);
+        }
       }
     }
   }