private static void Smooth()
        {
            GameObject selected = Selection.activeObject as GameObject;
            Spline     spline   = selected.GetComponentInParent <Spline>();

            SplineBaseEditor.Smooth(spline);
        }
        private static void SetMode(GameObject selected, ControlPointMode mode)
        {
            Spline spline = selected.GetComponentInParent <Spline>();

            if (spline == null)
            {
                return;
            }

            SplineControlPoint selectedControlPoint = selected.GetComponent <SplineControlPoint>();

            if (selectedControlPoint != null)
            {
                SplineBaseEditor.SetMode(spline, mode, selectedControlPoint.Index);
            }
            else
            {
                SplineBaseEditor.SetMode(spline, mode);
            }
        }