void RemoveBone(GroupAction actions, BoneProxyShape bone)
        {
            // attach to new parent
              if (bone.HasChildren())
            actions.Add(new SetShapesParentAction(bone.ChildCollection, bone.Parent));

              actions.Add(RemoveShapeAction.CreateRemoveShapeAction(bone));
        }
 public BoneProxyShape CreateBoneProxyShape(string name, bool bUndoable)
 {
     BoneProxyShape shape = FindBoneProxyShape(name);
       if (shape == null)
       {
     shape = new BoneProxyShape(name);
     IAction action = AddShapeAction.CreateAddShapeAction(shape, this, ParentLayer, false);
     if (bUndoable)
       EditorManager.Actions.Add(action);
     else
       action.Do();
       }
       return shape;
 }