+ Path ret;
+
+ PathLut::const_iterator iter( mPathLut.find( name ) );
+ if( iter != mPathLut.end() )
+ {
+ ret = iter->second;
+ }
+ else
+ {
+ if( OptionalChild paths = IsChild( *mParser.GetRoot(), "paths") )
+ {
+ if( OptionalChild path = IsChild( *paths, name ) )
+ {
+ //points property
+ if( OptionalChild pointsProperty = IsChild( *path, "points") )
+ {
+ Dali::Property::Value points(Property::ARRAY);
+ if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
+ {
+ ret = Path::New();
+ ret.SetProperty( Path::Property::Points, points);
+
+ //control-points property
+ if( OptionalChild pointsProperty = IsChild( *path, "control-points") )
+ {
+ Dali::Property::Value points(Property::ARRAY);
+ if( SetPropertyFromNode( *pointsProperty, Property::ARRAY, points ) )
+ {
+ ret.SetProperty( Path::Property::ControlPoints, points);
+ }
+ }
+ else
+ {
+ //Curvature
+ float curvature(0.25f);
+ if( OptionalFloat pointsProperty = IsFloat( *path, "curvature") )
+ {
+ curvature = *pointsProperty;
+ }
+ ret.GenerateControlPoints(curvature);
+ }
+
+ //Add the new path to the hash table for paths
+ mPathLut[ name ] = ret;
+ }
+ }
+ else
+ {
+ //Interpolation points not specified
+ DALI_SCRIPT_WARNING("Interpolation points not specified for path '%s'\n", name.c_str() );
+ }
+ }
+
+ }
+ }
+
+ return ret;