Exemple #1
0
		public void connect(AXParametricObject po)
		{
			AXShape shp = getInputShape();

			if (po.is2D ()) {
				AXParameter out_p = po.generator.getPreferredOutputParameter ();
				if (out_p != null)
					shp.addInput().makeDependentOn(out_p);
				
				po.intValue ("Axis", parametricObject.intValue ("Axis"));

			}
		}
Exemple #2
0
    public static void display(float imagesize = 64, AXNodeGraphEditorWindow editor = null)
    {
        //Debug.Log("imagesise="+imagesize);
        // called from an OnGUI
        //imagesize = 64;
        scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, GUIStyle.none, GUIStyle.none);

        EditorGUILayout.BeginVertical();

        string[] itemStrings = null;

        // Select menu item list
        if (editor.OutputParameterBeingDragged == null)
        {
            if (editor.model != null && editor.model.selectedPOs.Count > 1)
            {
                //if (editor.model.selectedPOs[0].is2D())
                //	itemStrings = ArchimatixEngine.nodeStringsFrom2DMultiSelect;

                //else
                itemStrings = ArchimatixEngine.nodeStringsFromMultiSelect;
            }
            else
            {
                itemStrings = ArchimatixEngine.nodeStrings;
            }
        }
        else if (editor.OutputParameterBeingDragged.parametricObject.is2D())
        {
            itemStrings = ArchimatixEngine.nodeStringsFrom2DOutput;
        }

        else if (editor.OutputParameterBeingDragged.parametricObject.is3D())
        {
            if (editor.OutputParameterBeingDragged.Type == AXParameter.DataType.Spline)
            {
                itemStrings = ArchimatixEngine.nodeStringsFrom2DOutput;
            }
            else
            {
                itemStrings = ArchimatixEngine.nodeStringsFrom3DOutput;
            }
        }
        else if (editor.OutputParameterBeingDragged.parametricObject.generator is RepeaterTool)
        {
            itemStrings = ArchimatixEngine.nodeStringsFromRepeaterTool;
        }


        /*
         * if (Library.last2DItem != null)
         * {
         *      if (GUILayout.Button(new GUIContent(Library.last2DItem.icon, Library.last2DItem.po.Name), new GUILayoutOption[] {GUILayout.Width(imagesize), GUILayout.Height(imagesize)}))
         *      {
         *
         *      }
         * }
         */


        List <string> stringList = null;

        if (itemStrings != null)
        {
            stringList = itemStrings.ToList();
        }

        if (stringList != null)
        {
            stringList.AddRange(Archimatix.customNodeNames);
        }

        // Build Menu
        string poName;

        if (stringList != null)
        {
            for (int i = 0; i < stringList.Count; i++)
            {
                string nodeName = stringList[i];

                Texture2D nodeIcon = null;


                if (ArchimatixEngine.nodeIcons.ContainsKey(nodeName))
                {
                    nodeIcon = ArchimatixEngine.nodeIcons[nodeName];
                }
                else
                {
                    if (ArchimatixEngine.nodeIcons.ContainsKey("CustomNode"))
                    {
                        nodeIcon = ArchimatixEngine.nodeIcons["CustomNode"];
                    }
                    else
                    {
                        continue;
                    }
                }



                if (nodeIcon != null)
                {
                    if (GUILayout.Button(new GUIContent(nodeIcon, nodeName), new GUILayoutOption[] { GUILayout.Width(imagesize), GUILayout.Height(imagesize) }))
                    {
                        //if (editor.DraggingOutputParameter != null)
                        //{
                        AXModel model = AXEditorUtilities.getOrMakeSelectedModel();

                        Undo.RegisterCompleteObjectUndo(model, "Node Menu Selection");

                        AXParametricObject mostRecentPO = model.recentlySelectedPO;


                        int index = nodeName.IndexOf("_");

                        poName = (index > 0) ? nodeName.Substring(0, index) : nodeName;

                        // Support multi-select operation
                        List <AXParametricObject> selectedPOs = new List <AXParametricObject>();
                        if (model.selectedPOs.Count > 0)
                        {
                            selectedPOs.AddRange(model.selectedPOs);
                        }



                        // ADD NEW PO TO MODEL (only this new po is selected after this)
                        AXParametricObject po = AXEditorUtilities.addNodeToCurrentModel(poName, false);

                        if (po == null || po.generator == null)
                        {
                            return;
                        }


                        float max_x = -AXGeometryTools.Utilities.IntPointPrecision;


                        if (poName == "FreeCurve")
                        {
                            ArchimatixEngine.sceneViewState = ArchimatixEngine.SceneViewState.AddPoint;
                        }



                        // DRAGGING A PARAMETER? THEN RIG'R UP!
                        if (editor.OutputParameterBeingDragged != null)
                        {
                            AXParametricObject draggingPO  = editor.OutputParameterBeingDragged.parametricObject;
                            AXParameter        new_input_p = null;

                            switch (nodeName)
                            {
                            case "Instance2D":
                            case "ShapeOffsetter":
                                po.getParameter("Input Shape").makeDependentOn(editor.OutputParameterBeingDragged);
                                po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));

                                if (po.geometryControls != null)
                                {
                                    po.geometryControls.isOpen = true;
                                }
                                break;

                            case "ShapeDistributor":
                                List <AXParameter> deps = new List <AXParameter>();

                                for (int dd = 0; dd < editor.OutputParameterBeingDragged.Dependents.Count; dd++)
                                {
                                    deps.Add(editor.OutputParameterBeingDragged.Dependents[dd]);
                                }

                                for (int dd = 0; dd < deps.Count; dd++)
                                {
                                    deps[dd].makeDependentOn(po.getParameter("Output Shape"));
                                }

                                po.getParameter("Input Shape").makeDependentOn(editor.OutputParameterBeingDragged);
                                po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));

                                if (po.geometryControls != null)
                                {
                                    po.geometryControls.isOpen = true;
                                }
                                break;

                            case "ShapeMerger":
                                po.generator.getInputShape().addInput().makeDependentOn(editor.OutputParameterBeingDragged);
                                if (editor.OutputParameterBeingDragged.axis != Axis.NONE)
                                {
                                    po.intValue("Axis", (int)editor.OutputParameterBeingDragged.axis);
                                }
                                else
                                {
                                    po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));
                                }

                                break;

                            case "PlanRepeater2D":
                            case "PlanRepeater2D_Corner":
                                po.getParameter("Corner Shape").makeDependentOn(editor.OutputParameterBeingDragged);
                                po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));
                                break;

                            case "PlanRepeater_Corner":
                                po.getParameter("Corner Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;


                            case "PairRepeater2D":
                            case "RadialRepeater2D":
                            case "RadialRepeater2D_Node":
                            case "LinearRepeater2D":
                            case "LinearRepeater2D_Node":
                            case "GridRepeater2D":
                            case "GridRepeater2D_Node":
                                po.getParameter("Node Shape").makeDependentOn(editor.OutputParameterBeingDragged);
                                po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));
                                break;

                            case "RadialRepeater2D_Cell":
                            case "LinearRepeater2D_Cell":
                            case "GridRepeater2D_Cell":
                                po.getParameter("Cell Shape").makeDependentOn(editor.OutputParameterBeingDragged);
                                po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));
                                break;

                            case "Grouper":
                                //po.addInputMesh().makeDependentOn(editor.OutputParameterBeingDragged);


                                po.addGroupee(editor.OutputParameterBeingDragged.parametricObject);

                                break;

                            case "PlanRepeater2D_Plan":
                            case "Polygon_Plan":
                            case "Extrude_Plan":
                            case "PlanSweep_Plan":
                            case "PlanRepeater_Plan":
                            case "PlanDeformer_Plan":

                                // SYNC AXES
                                if (editor.OutputParameterBeingDragged.axis != Axis.NONE)
                                {
                                    po.intValue("Axis", (int)editor.OutputParameterBeingDragged.axis);
                                }
                                else
                                {
                                    po.intValue("Axis", editor.OutputParameterBeingDragged.parametricObject.intValue("Axis"));
                                }


                                if (nodeName == "Extrude_Plan" && po.intValue("Axis") != (int)Axis.Y)
                                {
                                    po.floatValue("Bevel", 0);
                                }



                                // INSERT SHAPE_DISTRIBUTOR?
                                new_input_p = po.getParameter("Plan", "Input Shape");
                                //if (draggingPO.is2D() && !(draggingPO.generator is ShapeDistributor) && editor.OutputParameterBeingDragged.Dependents != null && editor.OutputParameterBeingDragged.Dependents.Count > 0)
                                //	model.insertShapeDistributor(editor.OutputParameterBeingDragged, new_input_p);
                                //else
                                new_input_p.makeDependentOn(editor.OutputParameterBeingDragged);

                                // the output of the new node should match the shapestate of the input
                                if (po.generator.P_Output != null)
                                {
                                    po.generator.P_Output.shapeState = new_input_p.shapeState;
                                }

                                AXNodeGraphEditorWindow.repaintIfOpen();

                                break;

                            case "Lathe_Section":
                            case "PlanSweep_Section":
                            case "PlanRepeater_Section":

                                //po.getParameter("Section").makeDependentOn(editor.OutputParameterBeingDragged);

                                // INSERT SHAPE_DISTRIBUTOR?
                                new_input_p = po.getParameter("Section");
                                if (draggingPO.is2D() && !(draggingPO.generator is ShapeDistributor) && draggingPO.hasDependents())
                                {
                                    model.insertShapeDistributor(editor.OutputParameterBeingDragged, new_input_p);
                                }
                                else
                                {
                                    new_input_p.makeDependentOn(editor.OutputParameterBeingDragged);
                                }

                                // the output of the new node should match the shapestate of the input
                                //if (po.generator.P_Output != null)
                                //Debug.Log(new_input_p.Name+" "+new_input_p.shapeState + " :=: " +editor.OutputParameterBeingDragged.Name + " " + editor.OutputParameterBeingDragged.shapeState);



                                AXNodeGraphEditorWindow.repaintIfOpen();


                                break;


                            case "NoiseDeformer":
                            case "ShearDeformer":
                            case "TwistDeformer":
                            case "DomicalDeformer":
                            case "TaperDeformer":
                            case "InflateDeformer":
                            case "PlanDeformer":

                                po.getParameter("Input Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;

                            //case "PlanDeformer_Plan":



                            case "PairRepeater":
                            case "StepRepeater":
                            case "RadialStepRepeater":

                                po.getParameter("Node Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;


                            case "LinearRepeater_Node":
                                AXParameter nodeMesh_p = po.getParameter("Node Mesh");
                                nodeMesh_p.makeDependentOn(editor.OutputParameterBeingDragged);

                                // if the src is very long in x, assume you want to repeat in Z
                                if (editor.OutputParameterBeingDragged.parametricObject.bounds.size.x > (6 * editor.OutputParameterBeingDragged.parametricObject.bounds.size.z))
                                {
                                    po.initiateRipple_setBoolParameterValueByName("zAxis", true);
                                }

                                break;

                            case "LinearRepeater_Cell":
                            case "PlanRepeater_Cell":
                                po.getParameter("Cell Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;

                            case "LinearRepeater_Span":
                                po.getParameter("Bay SpanU").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;


                            case "LinearRepeater":
                                po.getParameter("RepeaterU").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;

                            case "FloorRepeater":
                                po.getParameter("Floor Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;

                            case "RadialRepeater":
                            case "RadialRepeater_Node":
                            case "GridRepeater_Node":
                            case "PlanRepeater_Node":
                                po.getParameter("Node Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;

                            case "RadialRepeater_Span":
                            case "GridRepeater_Span":
                                po.getParameter("Bay SpanU", "SpanU Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;

                            case "GridRepeater_Cell":
                                po.getParameter("Cell Mesh").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;


                            case "ShapeRepeater_Plan":
                                AXEditorUtilities.addNodeToCurrentModel("ShapeRepeater").getParameter("Plan").makeDependentOn(editor.OutputParameterBeingDragged);
                                break;


                            default:
                                AXEditorUtilities.addNodeToCurrentModel(nodeName);
                                break;
                            }


                            if (editor.OutputParameterBeingDragged.parametricObject != null)
                            {
                                mostRecentPO = editor.OutputParameterBeingDragged.parametricObject;
                                //po.rect = editor.OutputParameterBeingDragged.parametricObject.rect;
                                //po.rect.x += 325;
                            }

                            /*
                             * else
                             * {
                             *      po.rect.x = (model.focusPointInGraphEditor.x)+100;// + UnityEngine.Random.Range(-100, 300);
                             *      po.rect.y = (model.focusPointInGraphEditor.y - 250) + UnityEngine.Random.Range(-10, 0);
                             * }
                             */
                        }



                        // NO DRAGGING - CONNECT ALL MULTI_SELECTED
                        else if (selectedPOs != null && selectedPOs.Count > 0)
                        {
                            switch (nodeName)
                            {
                            case "ShapeMerger":
                                AXShape shp = po.generator.getInputShape();
                                for (int j = 0; j < selectedPOs.Count; j++)
                                {
                                    AXParametricObject poo = selectedPOs [j];
                                    if (j == 0)
                                    {
                                        po.intValue("Axis", selectedPOs [j].intValue("Axis"));
                                    }
                                    max_x = Mathf.Max(max_x, poo.rect.x);
                                    if (poo.is2D())
                                    {
                                        AXParameter out_p = poo.generator.getPreferredOutputParameter();
                                        if (out_p != null)
                                        {
                                            shp.addInput().makeDependentOn(out_p);
                                        }
                                    }
                                }

                                po.rect.x = max_x + 250;
                                break;

                            case "Grouper":
                                //Debug.Log("selectedPOs="+selectedPOs.Count);

                                //if (model.currentWorkingGroupPO != null && ! selectedPOs.Contains(model.currentWorkingGroupPO))
                                //{
                                po.addGroupees(selectedPOs);

                                Rect r = AXUtilities.getBoundaryRectFromPOs(selectedPOs);
                                po.rect.x = r.center.x - po.rect.width / 2;
                                po.rect.y = r.center.y - po.rect.height / 2;
                                //}
                                //po.rect.x = max_x+250;
                                break;

                            case "Channeler":
                                //Debug.Log("selectedPOs="+selectedPOs.Count);

                                //if (model.currentWorkingGroupPO != null && ! selectedPOs.Contains(model.currentWorkingGroupPO))
                                //{
                                foreach (AXParametricObject selpo in selectedPOs)
                                {
                                    AXParameter inputer = po.addInputMesh();

                                    inputer.makeDependentOn(selpo.generator.P_Output);
                                }


                                Rect cr = AXUtilities.getBoundaryRectFromPOs(selectedPOs);
                                po.rect.x = cr.center.x - po.rect.width / 2;
                                po.rect.y = cr.center.y - po.rect.height / 2;
                                //}
                                //po.rect.x = max_x+250;
                                break;
                            }
                        }

                        else
                        {
                            switch (nodeName)
                            {
                            case "ShapeMerger":
                                po.assertInputControls();
                                //po.generator.getInputShape().addInput();
                                break;
                            }
                        }



                        editor.OutputParameterBeingDragged = null;
                        model.autobuild();

                        po.generator.adjustWorldMatrices();

                        if (mostRecentPO != null)
                        {
                            po.rect    = mostRecentPO.rect;
                            po.rect.x += (mostRecentPO.rect.width + 50);
                        }
                        else
                        {
                            po.rect.x = (model.focusPointInGraphEditor.x) + 100;                          // + UnityEngine.Random.Range(-100, 300);
                            po.rect.y = (model.focusPointInGraphEditor.y - 250) + UnityEngine.Random.Range(-10, 0);
                        }

                        po.rect.height = 700;

                        //AXNodeGraphEditorWindow.zoomToRectIfOpen(po.rect);


                        //model.beginPanningToRect(po.rect);
                    }
                }
            }
        }
        //GUILayout.Label (GUI.tooltip);


        EditorGUILayout.Space();
        EditorGUILayout.EndVertical();

        EditorGUILayout.EndScrollView();

        /* Not sure why I was doing this - it took up a huge amount of CPU!
         *
         *
         * editor.Repaint();
         * SceneView sv = SceneView.lastActiveSceneView;
         * if (sv != null)
         *      sv.Repaint();
         *
         */
    }
Exemple #3
0
    public static int OnGUI(Rect pRect, AXNodeGraphEditorWindow editor, AXShape shp)
    {
        Color shapeColor = editor.getDataColor(AXParameter.DataType.Spline);

        Color origBG = GUI.backgroundColor;


        //Rect pRect = new Rect(x1+12, cur_y, width-20,lineHgt);
        float cur_x = ArchimatixUtils.cur_x;
        //float box_x = cur_x + ArchimatixUtils.indent;
        float box_w = ArchimatixUtils.paletteRect.width - cur_x - 3 * ArchimatixUtils.indent;



        int x1      = (int)pRect.x - ArchimatixUtils.indent;
        int cur_y   = (int)pRect.y;
        int width   = (int)pRect.width;
        int lineHgt = ArchimatixUtils.lineHgt;
        int gap     = 5;

        Rect boxRect = pRect;

        boxRect = new Rect(cur_x + ArchimatixUtils.indent, cur_y, box_w, ArchimatixUtils.lineHgt);

        Rect lRect = new Rect(x1 + 11, cur_y, 50, lineHgt);

        if (!shp.isOpen && shp.inputs != null)
        {
            foreach (AXParameter sp in  shp.inputs)
            {
                sp.inputPoint  = new Vector2(ArchimatixUtils.paletteRect.x, ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
                sp.outputPoint = new Vector2(ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width, ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
            }
        }



        // Header
        //EditorGUI.BeginChangeCheck();

        //GUI.Button(pRect, Name);
        GUI.color = Color.white;

        GUI.backgroundColor = shapeColor;



        //
        shp.isOpen = true;

        if (shp.isOpen)
        {
            /*  INPUTS
             */


            GUIStyle labelstyle = GUI.skin.GetStyle("Label");
            labelstyle.alignment  = TextAnchor.MiddleLeft;
            labelstyle.fixedWidth = 100;
            labelstyle.fontSize   = 12;

            //Rect boxRect = new Rect (x1 + 22, cur_y, width - 38, lineHgt);
            //Rect editRect = new Rect (x1 + 22, cur_y, width - 38, lineHgt);


            //Archimatix.cur_x += Archimatix.indent;
            // INPUT SHAPE PARAMETERS
            for (int i = 0; i < shp.inputs.Count; i++)
            {
                AXParameter sp = shp.inputs [i];

                sp.inputPoint  = new Vector2(ArchimatixUtils.paletteRect.x, ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
                sp.outputPoint = new Vector2(ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width, ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);

                cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width, lineHgt), editor, sp);
            }
            //Archimatix.cur_x -= Archimatix.indent;

            // Empty / New SHAPE PARAMETER

            if (editor.OutputParameterBeingDragged != null && editor.OutputParameterBeingDragged.Type != AXParameter.DataType.Spline)
            {
                GUI.enabled = false;
            }

            if (GUI.Button(new Rect(-3, cur_y, lineHgt, lineHgt), ""))
            {
                //Debug.Log ("make shape 2");
                AXParameter new_p = shp.addInput();
                editor.inputSocketClicked(new_p);
                editor.OutputParameterBeingDragged = null;
            }

            GUI.enabled = true;

            boxRect = new Rect(x1 + 11, cur_y, width - 38, lineHgt);
            GUI.Box(boxRect, " ");
            GUI.Box(boxRect, " ");
            //boxRect.x += 10;
            GUI.Label(boxRect, "Empty Shape");


            cur_y += lineHgt + gap;


            //cur_y += 2*gap;



            //Rect bRect = boxRect;

            lRect.y = cur_y;


            /*  SPECIFIC OUTPUT  PARAMETERS
             */
            //lRect.y = cur_y;
            //GUI.Label(lRect, "Output Combinations");
            cur_y += gap;

            //Archimatix.cur_x += Archimatix.indent;

            GUI.color           = Color.white;
            GUI.backgroundColor = Color.white;

            //Rect foldRect = new Rect(ArchimatixUtils.indent*2, cur_y, 30,lineHgt);


            //outputParametersOpen = EditorGUI.Foldout(foldRect, outputParametersOpen, "Merge Results");



            /*
             * if (false && shp.outputParametersOpen)
             * {
             *      cur_y += lineHgt;
             *      ArchimatixUtils.cur_x += ArchimatixUtils.indent;
             *
             *      bool tmp_boolval;
             *      bRect.x = ArchimatixUtils.indent*3+4;//width-lineHgt;
             *
             *
             *      // difference
             *      shp.difference.inputPoint   = new Vector2 (ArchimatixUtils.paletteRect.x,                                   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      shp.difference.outputPoint  = new Vector2 (ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width,   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      bRect.y = cur_y-2;
             *      lRect.y = cur_y;
             *
             *      cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width,lineHgt), editor, shp.difference);
             *
             *      tmp_boolval = (shp.combineType == AXShape.CombineType.Difference);
             *      EditorGUI.BeginChangeCheck ();
             *      tmp_boolval = EditorGUI.Toggle (bRect, "",  tmp_boolval);
             *      if (EditorGUI.EndChangeCheck ()) {
             *              Undo.RegisterCompleteObjectUndo (shp.Parent.model, "value change for combineType" );
             *              shp.combineType = AXShape.CombineType.Difference;
             *              shp.parametricObject.model.autobuild();
             *      }
             *
             *      // difference
             *      shp.differenceRail.inputPoint   = new Vector2 (ArchimatixUtils.paletteRect.x,                                   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      shp.differenceRail.outputPoint  = new Vector2 (ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width,   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *
             *      bRect.y = cur_y-2;
             *
             *      cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width, lineHgt), editor, shp.differenceRail);
             *
             *      tmp_boolval = (shp.combineType == AXShape.CombineType.DifferenceRail);
             *      EditorGUI.BeginChangeCheck ();
             *      tmp_boolval = EditorGUI.Toggle (bRect, "",  tmp_boolval);
             *      if (EditorGUI.EndChangeCheck ()) {
             *              Undo.RegisterCompleteObjectUndo (shp.Parent.model, "value change for combineType" );
             *              shp.combineType = AXShape.CombineType.DifferenceRail;
             *              shp.parametricObject.model.autobuild();
             *      }
             *
             *      cur_y += gap;
             *
             *
             *
             *      // INTERSECTION
             *      shp.intersection.inputPoint     = new Vector2 (ArchimatixUtils.paletteRect.x,                                   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      shp.intersection.outputPoint    = new Vector2 (ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width,   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      bRect.y = cur_y-2;
             *
             *      cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width, lineHgt), editor, shp.intersection);
             *
             *      tmp_boolval = (shp.combineType == AXShape.CombineType.Intersection);
             *      EditorGUI.BeginChangeCheck ();
             *      tmp_boolval = EditorGUI.Toggle (bRect, "",  tmp_boolval);
             *      if (EditorGUI.EndChangeCheck ()) {
             *              Undo.RegisterCompleteObjectUndo (shp.Parent.model, "value change for combineType" );
             *              Debug.Log("YA");
             *              shp.combineType = AXShape.CombineType.Intersection;
             *              shp.parametricObject.model.autobuild();
             *      }
             *
             *
             *      // INTERSECTION_RAIL
             *      shp.intersectionRail.inputPoint     = new Vector2 (ArchimatixUtils.paletteRect.x,                                   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      shp.intersectionRail.outputPoint    = new Vector2 (ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width,   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      bRect.y = cur_y-2;
             *
             *      cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width, lineHgt), editor, shp.intersectionRail);
             *
             *      tmp_boolval = (shp.combineType == AXShape.CombineType.IntersectionRail);
             *      EditorGUI.BeginChangeCheck ();
             *      tmp_boolval = EditorGUI.Toggle (bRect, "",  tmp_boolval);
             *      if (EditorGUI.EndChangeCheck ()) {
             *              Undo.RegisterCompleteObjectUndo (shp.Parent.model, "value change for combineType" );
             *              shp.combineType = AXShape.CombineType.IntersectionRail;
             *              shp.parametricObject.model.autobuild();
             *      }
             *
             *      cur_y += gap;
             *
             *
             *
             *      // union
             *      shp.union.inputPoint    = new Vector2 (ArchimatixUtils.paletteRect.x,                                   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      shp.union.outputPoint   = new Vector2 (ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width,   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      bRect.y = cur_y-2;
             *
             *      cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width, lineHgt), editor, shp.union);
             *
             *      tmp_boolval = (shp.combineType == AXShape.CombineType.Union);
             *      EditorGUI.BeginChangeCheck ();
             *      tmp_boolval = EditorGUI.Toggle (bRect, "",  tmp_boolval);
             *      if (EditorGUI.EndChangeCheck ()) {
             *              Undo.RegisterCompleteObjectUndo (shp.Parent.model, "value change for combineType" );
             *              shp.combineType = AXShape.CombineType.Union;
             *              shp.parametricObject.model.autobuild();
             *      }
             *
             *      cur_y += gap;
             *
             *
             *
             *      // grouped
             *      if (shp.grouped == null || shp.grouped.Type == AXParameter.DataType.Float)
             *              shp.grouped             = shp.createSplineParameter(AXParameter.ParameterType.Output, "Grouped");
             *
             *      shp.grouped.inputPoint  = new Vector2 (ArchimatixUtils.paletteRect.x,                                   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      shp.grouped.outputPoint     = new Vector2 (ArchimatixUtils.paletteRect.x + ArchimatixUtils.paletteRect.width,   ArchimatixUtils.paletteRect.y + cur_y + lineHgt / 2);
             *      bRect.y = cur_y-2;
             *
             *      cur_y = ParameterSplineGUI.OnGUI_Spline(new Rect(x1, cur_y, width, lineHgt), editor, shp.grouped);
             *
             *      tmp_boolval = (shp.combineType == AXShape.CombineType.Grouped);
             *      EditorGUI.BeginChangeCheck ();
             *      tmp_boolval = EditorGUI.Toggle (bRect, "",  tmp_boolval);
             *      if (EditorGUI.EndChangeCheck ()) {
             *              Undo.RegisterCompleteObjectUndo (shp.Parent.model, "value change for combineType" );
             *              shp.combineType = AXShape.CombineType.Grouped;
             *              shp.parametricObject.model.autobuild();
             *      }
             *
             *
             *
             *
             *      ArchimatixUtils.cur_x -= ArchimatixUtils.indent;
             *
             *
             * }
             */
            //Archimatix.cur_x -= Archimatix.indent;
            //cur_y += lineHgt;
        }


        GUI.backgroundColor = origBG;

        return(cur_y);
    }     // OnGUI