public ShapeAnimationNode AddNode(string name)
    {
        var node  = new ShapeAnimationNode(name, Length);
        var nodes = Nodes != null ? new List <ShapeAnimationNode>(Nodes) : new List <ShapeAnimationNode>();

        nodes.Add(node);
        Nodes = nodes.ToArray();
        return(node);
    }
    public ShapeAnimation(ShapeAnimation source, Transform topNode)
    {
        Length = source.Length;
        Nodes  = new ShapeAnimationNode[source.Nodes.Length];

        // Nodes cannot be shared because of their m_transform member
        for (int k = 0; k < source.Nodes.Length; k++)
        {
            var sourceNode = source.Nodes[k];
            var node       = new ShapeAnimationNode(sourceNode.Name, Length);
            node.Controllers = new ShapeAnimationController[sourceNode.Controllers.Length];
            for (int l = 0; l < sourceNode.Controllers.Length; l++)
            {
                // Controllers can be shared
                node.Controllers[l] = sourceNode.Controllers[l];
            }
            Nodes[k] = node;
        }
        SetTransforms(topNode);
    }