+ // get the cached animatable property value
+ value = animatableProperty->GetPropertyValue();
+ }
+ }
+ else if(mCustomProperties.Count() > 0)
+ {
+ CustomPropertyMetadata* custom = FindCustomProperty( index );
+ if(custom)
+ {
+ // get the cached custom property value
+ value = custom->GetPropertyValue();
+ }
+ else
+ {
+ DALI_LOG_ERROR("Invalid property index\n");
+ }
+ } // if custom
+
+ return value;
+}
+
+Property::Value Object::GetCurrentProperty( Property::Index index ) const
+{
+ DALI_ASSERT_ALWAYS( index > Property::INVALID_INDEX && "Property index is out of bounds" );
+
+ Property::Value value;
+
+ if ( index < DEFAULT_PROPERTY_MAX_COUNT )
+ {
+ value = GetDefaultPropertyCurrentValue( index );
+ }
+ else if ( ( index >= PROPERTY_REGISTRATION_START_INDEX ) && ( index <= PROPERTY_REGISTRATION_MAX_INDEX ) )
+ {
+ const TypeInfo* typeInfo( GetTypeInfo() );
+ if ( typeInfo )
+ {
+ value = typeInfo->GetProperty( this, index );
+ }
+ else
+ {
+ DALI_LOG_ERROR("Cannot find property index\n");
+ }
+ }
+ else if ( ( index >= ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX ) )
+ {
+ // check whether the animatable property is registered already, if not then register one.
+ AnimatablePropertyMetadata* animatableProperty = RegisterAnimatableProperty( index );
+ if(!animatableProperty)
+ {
+ DALI_LOG_ERROR("Cannot find property index\n");
+ }
+ else
+ {