Changed Animation API enums to uppercase.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / builder / builder-animations.cpp
index 980fc90..c917d06 100644 (file)
@@ -17,7 +17,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/layer.h>
-#include <dali/public-api/actors/image-actor.h>
+#include <dali/devel-api/common/stage.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -176,15 +176,15 @@ Animation CreateAnimation( const TreeNode& child, const Replacement& constant, D
   {
     if("BAKE" == *endAction)
     {
-      animation.SetEndAction( Animation::Bake );
+      animation.SetEndAction( Animation::BAKE );
     }
     else if("DISCARD" == *endAction)
     {
-      animation.SetEndAction( Animation::Discard );
+      animation.SetEndAction( Animation::DISCARD );
     }
     else if("BAKE_FINAL" == *endAction)
     {
-      animation.SetEndAction( Animation::BakeFinal );
+      animation.SetEndAction( Animation::BAKE_FINAL );
     }
   }
 
@@ -192,15 +192,15 @@ Animation CreateAnimation( const TreeNode& child, const Replacement& constant, D
   {
     if("BAKE" == *endAction)
     {
-      animation.SetDisconnectAction( Animation::Bake );
+      animation.SetDisconnectAction( Animation::BAKE );
     }
     else if("DISCARD" == *endAction)
     {
-      animation.SetDisconnectAction( Animation::Discard );
+      animation.SetDisconnectAction( Animation::DISCARD );
     }
     else if("BAKE_FINAL" == *endAction)
     {
-      animation.SetDisconnectAction( Animation::BakeFinal );
+      animation.SetDisconnectAction( Animation::BAKE_FINAL );
     }
   }
 
@@ -229,37 +229,8 @@ Animation CreateAnimation( const TreeNode& child, const Replacement& constant, D
         // to allow animating shader uniforms
         if( propIndex == Property::INVALID_INDEX )
         {
-          ImageActor imageActor = ImageActor::DownCast( targetHandle );
-          if( imageActor )
-          {
-            // A limitation here is that its possible that between creation of animation
-            // and running it the ShaderEffect of the actor has been changed.
-            // However this is a unlikely use case especially when using scripts.
-            if( ShaderEffect effect = imageActor.GetShaderEffect() )
-            {
-              propIndex = effect.GetPropertyIndex( *property );
-              if(propIndex != Property::INVALID_INDEX)
-              {
-                targetHandle = effect;
-              }
-              else
-              {
-                DALI_SCRIPT_WARNING( "Cannot find property on object or ShaderEffect\n" );
-                continue;
-              }
-            }
-          }
-          else
-          {
-            DALI_SCRIPT_WARNING( "Cannot find property on object or ShaderEffect\n" );
+            DALI_SCRIPT_WARNING( "Cannot find property on object\n" );
             continue;
-          }
-        }
-
-        if( propIndex == Property::INVALID_INDEX)
-        {
-          DALI_ASSERT_ALWAYS( propIndex != Property::INVALID_INDEX && "Animation must specify a valid property" );
-          continue;
         }
       }