Beispiel #1
0
        void PROCESS_KEYS()
        {
            MeshToolBase t = MeshTool;

            if (_dragging)
            {
                t.KeysEventDragging();
            }

            if ((t.ShowVertices) && (PointedUV != null))
            {
                t.KeysEventPointedVertex();
            }
            else if ((t.ShowLines) && (PointedLine != null))
            {
                t.KeysEventPointedLine();
            }
            else if ((t.ShowTriangles) && (PointedTris != null))
            {
                t.KeysEventPointedTriangle();
            }
        }
Beispiel #2
0
        void RAYCAST_SELECT_MOUSEedit()
        {
            PointedTris = null;
            PointedLine = null;

            bool pointingUV = Raycast_VertexIsPointed();

            if (_dragging)
            {
                MeshTool.ManageDragging();
            }

            if (!_dragging)
            {
                if ((pointingUV) && (currentUV <= edMesh.meshPoints[0].uvpoints.Count))
                {
                    var pointedVX = edMesh.meshPoints[0];

                    if (currentUV == pointedVX.uvpoints.Count)
                    {
                        currentUV--;
                    }

                    if ((SelectedUV != null) && (SelectedUV.meshPoint == pointedVX) && (!SelectingUVbyNumber))
                    {
                        PointedUV = SelectedUV;
                    }
                    else
                    {
                        PointedUV = pointedVX.uvpoints[currentUV];
                    }

                    if (EditorInputManager.GetMouseButtonDown(0))
                    {
                        AssignSelected(PointedUV);
                    }
                }

                MeshToolBase t = MeshTool;

                if ((t.ShowVertices) && (PointedUV != null))
                {
                    if (t.MouseEventPointedVertex())
                    {
                        EditedMesh.SetLastPointed(PointedUV);
                    }
                    else
                    {
                        EditedMesh.ClearLastPointed();
                    }
                }
                else if ((t.ShowLines) && (PointedLine != null))
                {
                    if (t.MouseEventPointedLine())
                    {
                        EditedMesh.SetLastPointed(PointedLine);
                    }
                    else
                    {
                        EditedMesh.ClearLastPointed();
                    }
                }
                else if ((t.ShowTriangles) && (PointedTris != null))
                {
                    if (t.MouseEventPointedTriangle())
                    {
                        EditedMesh.SetLastPointed(PointedTris);
                    }
                    else
                    {
                        EditedMesh.ClearLastPointed();
                    }
                }
                else
                {
                    t.MouseEventPointedNothing();
                    EditedMesh.ClearLastPointed();
                }
            }
        }