- map[TOKEN_ANIMATOR] = Property::Map()
- .Add(TOKEN_ALPHA_FUNCTION, GetEnumerationName( animator->alphaFunction,
- ALPHA_FUNCTION_BUILTIN_TABLE,
- ALPHA_FUNCTION_BUILTIN_TABLE_COUNT ))
- .Add(TOKEN_TIME_PERIOD, Property::Map()
- .Add( TOKEN_DELAY, animator->timePeriodDelay )
- .Add( TOKEN_DURATION, animator->timePeriodDuration ));
+ Property::Map animateMap;
+
+ if( animator->alphaFunction.GetMode() == AlphaFunction::BUILTIN_FUNCTION )
+ {
+ animateMap.Add(TOKEN_ALPHA_FUNCTION, GetEnumerationName( animator->alphaFunction.GetBuiltinFunction(),
+ ALPHA_FUNCTION_BUILTIN_TABLE,
+ ALPHA_FUNCTION_BUILTIN_TABLE_COUNT ));
+ }
+ else if( animator->alphaFunction.GetMode() == AlphaFunction::BEZIER )
+ {
+ Vector4 controlPoints = animator->alphaFunction.GetBezierControlPoints();
+ animateMap.Add( TOKEN_ALPHA_FUNCTION, controlPoints );
+ }
+ animateMap.Add(TOKEN_TIME_PERIOD, Property::Map()
+ .Add( TOKEN_DELAY, animator->timePeriodDelay )
+ .Add( TOKEN_DURATION, animator->timePeriodDuration ));
+
+ map[TOKEN_ANIMATOR] = animateMap;