Reset node animatable properties for two frames after removing the frame callback
[platform/core/uifw/dali-core.git] / dali / internal / update / common / animatable-property.h
index d1f97d6..ebc2c82 100644 (file)
@@ -52,6 +52,7 @@ namespace SceneGraph
 static const uint32_t CLEAN_FLAG = 0x00; ///< Indicates that the value did not change in this, or the previous frame
 static const uint32_t BAKED_FLAG = 0x01; ///< Indicates that the value was Baked during the previous frame
 static const uint32_t SET_FLAG   = 0x02; ///< Indicates that the value was Set during the previous frame
+static const uint32_t RESET_FLAG = 0x02; ///< Indicates that the value should be reset to the base value in the next two frames
 
 template<class T>
 class AnimatableProperty;
@@ -93,6 +94,16 @@ protected: // for derived classes
     mDirtyFlags = BAKED_FLAG;
   }
 
+public:
+
+  /**
+   * Mark the property as dirty so that it will be reset to the base value in the next two frames.
+   */
+  void MarkAsDirty()
+  {
+    mDirtyFlags = RESET_FLAG;
+  }
+
 public: // From PropertyBase
   /**
    * @copydoc Dali::Internal::SceneGraph::PropertyBase::IsClean()