private static void SaveExtensionPlaneLookAndFeel(ObjectPlacementExtensionPlaneRenderSettings extensionPlaneRenderSettings, XmlTextWriter xmlWriter, int indent)
        {
            xmlWriter.WriteNewLine(indent);
            xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ExtensionPlaneLookAndFeelNode);

            int childIndent = indent + 1;

            xmlWriter.WriteNewLine(childIndent);
            xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ExtensionPlaneScaleNode);
            xmlWriter.WriteString(extensionPlaneRenderSettings.PlaneScale.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(childIndent);
            xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ExtensionPlaneColorNode);
            xmlWriter.WriteColorString(extensionPlaneRenderSettings.PlaneColor);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(childIndent);
            xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ExtensionPlaneBorderColorNode);
            xmlWriter.WriteColorString(extensionPlaneRenderSettings.PlaneBorderLineColor);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(childIndent);
            xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ExtensionPlaneNormalLineLengthNode);
            xmlWriter.WriteString(extensionPlaneRenderSettings.PlaneNormalLineLength.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(childIndent);
            xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ExtensionPlaneNormalLineColorNode);
            xmlWriter.WriteColorString(extensionPlaneRenderSettings.PlaneNormalLineColor);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(indent);
            xmlWriter.WriteEndElement();
        }
        private static void SaveMirrorLookAndFeel(InteractableMirrorRenderSettings renderSettings, XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings, bool objectPlacementMirror)
        {
            if (saveSettings.MirrorLookAndFeel)
            {
                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteStartElement(objectPlacementMirror ? Octave3DConfigXMLInfo.ObjectPlacementMirrorLookAndFeelNode : Octave3DConfigXMLInfo.ObjectSelectionMirrorLookAndFeelNode);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirrorWidthNode);
                xmlWriter.WriteString(renderSettings.MirrorWidth.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirrorHeightNode);
                xmlWriter.WriteString(renderSettings.MirrorHeight.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirrorHasInfiniteWidthNode);
                xmlWriter.WriteString(renderSettings.UseInfiniteWidth.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirrorHasInfiniteHeightNode);
                xmlWriter.WriteString(renderSettings.UseInfiniteHeight.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirrorColorNode);
                xmlWriter.WriteColorString(renderSettings.MirrorPlaneColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirrorBorderColorNode);
                xmlWriter.WriteColorString(renderSettings.MirrorPlaneBorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirroredBoxColorNode);
                xmlWriter.WriteColorString(renderSettings.MirroredBoxColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.MirroredBoxBorderColorNode);
                xmlWriter.WriteColorString(renderSettings.MirroredBoxBorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteEndElement();
            }
        }
        private static void SaveObjectErasingLookAndFeel(XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings)
        {
            if (saveSettings.ObjectErasingLookAndFeel)
            {
                EllipseShapeRenderSettings           circle2DRenderSettings = ObjectEraser.Get().Circle2DMassEraseShapeRenderSettings;
                XZOrientedEllipseShapeRenderSettings circle3DRenderSettings = ObjectEraser.Get().Circle3DMassEraseShapeRenderSettings;

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectErasingLookAndFeelNode);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectErasing2DCircleLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectErasingShapeFillColorNode);
                xmlWriter.WriteColorString(circle2DRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectErasingShapeBorderColorNode);
                xmlWriter.WriteColorString(circle2DRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectErasing3DCircleLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectErasingShapeBorderColorNode);
                xmlWriter.WriteColorString(circle3DRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteEndElement();
            }
        }
Esempio n. 4
0
        private static void WritePrefabScrollViewLookAndFeel(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteNewLine(2);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.PrefabScrollViewLookAndFeelNode);

            PrefabCategoryPrefabScrollViewData lookAndFeelData = Octave3DWorldBuilder.ActiveInstance.EditorWindowPool.ActivePrefabCategoryView.PrefabScrollView.ViewData;

            xmlWriter.WriteNewLine(3);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.NumPrefabsPerRowNode);
            xmlWriter.WriteString(lookAndFeelData.NumberOfPrefabsPerRow.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(3);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.PrefabPreviewScaleNode);
            xmlWriter.WriteString(lookAndFeelData.PrefabPreviewScale.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(3);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.PrefabScrollViewHeightNode);
            xmlWriter.WriteString(lookAndFeelData.PrefabScrollViewHeight.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(3);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.ActivePrefabTintNode);
            xmlWriter.WriteColorString(lookAndFeelData.ActivePrefabTint);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(3);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.ShowPrefabNamesNode);
            xmlWriter.WriteString(lookAndFeelData.ShowPrefabNames.ToString());
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(3);
            xmlWriter.WriteStartElement(PrefabConfigXMLInfo.PrefabNameLabelColorNode);
            xmlWriter.WriteColorString(lookAndFeelData.PrefabNameLabelColor);
            xmlWriter.WriteEndElement();

            xmlWriter.WriteNewLine(2);
            xmlWriter.WriteEndElement();
        }
        private static void SaveObjectSelectionLookAndFeel(XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings)
        {
            if (saveSettings.ObjectSelectionLookAndFeel)
            {
                ObjectSelectionRenderSettings selectionRenderSettings = ObjectSelection.Get().RenderSettings;
                RectangleShapeRenderSettings  rectRenderSettings      = ObjectSelection.Get().RectangleSelectionShapeRenderSettings;
                EllipseShapeRenderSettings    ellipseRenderSettings   = ObjectSelection.Get().EllipseSelectionShapeRenderSettings;

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionLookAndFeelNode);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxEdgeDrawModeNode);
                xmlWriter.WriteString(selectionRenderSettings.BoxRenderModeSettings.EdgeRenderMode.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxCornerEdgeLengthPercentageNode);
                xmlWriter.WriteString(selectionRenderSettings.BoxRenderModeSettings.CornerEdgesRenderModeSettings.CornerEdgeLengthPercentage.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxEdgeColorNode);
                xmlWriter.WriteColorString(selectionRenderSettings.BoxRenderModeSettings.EdgeColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxColorNode);
                xmlWriter.WriteColorString(selectionRenderSettings.BoxRenderModeSettings.BoxColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionBoxScaleNode);
                xmlWriter.WriteString(selectionRenderSettings.BoxRenderModeSettings.BoxScale.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionRectLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeFillColorNode);
                xmlWriter.WriteColorString(rectRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeBorderColorNode);
                xmlWriter.WriteColorString(rectRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionEllipseLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeFillColorNode);
                xmlWriter.WriteColorString(ellipseRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSelectionShapeBorderColorNode);
                xmlWriter.WriteColorString(ellipseRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteEndElement();
            }
        }
        private static void SaveObjectPlacementLookAndFeel(XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings)
        {
            if (saveSettings.ObjectPlacementLookAndFeel)
            {
                ObjectPivotPointsRenderSettings           pivotPointsRenderSettings         = ObjectPlacement.Get().GuidePivotPointsRenderSettings;
                ProjectedBoxFacePivotPointsRenderSettings projectedPivotPointRenderSettings = pivotPointsRenderSettings.ProjectedBoxFacePivotPointsRenderSettings;
                ObjectVertexSnapSessionRenderSettings     vertexSnapRenderSettings          = ObjectPlacement.Get().ObjectVertexSnapSessionRenderSettings;

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectPlacementLookAndFeelNode);

                // Pivot points
                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.GuidePivotPointsLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.GuidePivotPointsShapeTypeNode);
                xmlWriter.WriteString(pivotPointsRenderSettings.ShapeType.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.GuidePivotPointsShapeSizeInPixelsNode);
                xmlWriter.WriteString(pivotPointsRenderSettings.PivotPointSizeInPixels.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DrawPivotPointProjectionLinesNode);
                xmlWriter.WriteString(projectedPivotPointRenderSettings.RenderProjectionLines.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointProjectionLineColorNode);
                xmlWriter.WriteColorString(projectedPivotPointRenderSettings.ProjectionLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DrawPivotPointConnectionLinesNode);
                xmlWriter.WriteString(projectedPivotPointRenderSettings.RenderPivotPointConnectionLines.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointConnectionLineColorNode);
                xmlWriter.WriteColorString(projectedPivotPointRenderSettings.PivotPointConnectionLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ActivePivotPointLookAndFeelNode);

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointIsVisibleNode);
                xmlWriter.WriteString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.IsVisible.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointFillColorNode);
                xmlWriter.WriteColorString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointBorderColorNode);
                xmlWriter.WriteColorString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointScaleNode);
                xmlWriter.WriteString(projectedPivotPointRenderSettings.ActivePivotPointRenderSettings.Scale.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.InactivePivotPointLookAndFeelNode);

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointIsVisibleNode);
                xmlWriter.WriteString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.IsVisible.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointFillColorNode);
                xmlWriter.WriteColorString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.FillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointBorderColorNode);
                xmlWriter.WriteColorString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PivotPointScaleNode);
                xmlWriter.WriteString(projectedPivotPointRenderSettings.InactivePivotPointRenderSettings.Scale.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                // Vertex snapping
                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingDrawSrcVertexNode);
                xmlWriter.WriteString(vertexSnapRenderSettings.RenderSourceVertex.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingSrcVertexFillColorNode);
                xmlWriter.WriteColorString(vertexSnapRenderSettings.SourceVertexFillColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingSrcVertexBorderColorNode);
                xmlWriter.WriteColorString(vertexSnapRenderSettings.SourceVertexBorderColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectVertexSnappingSrcVertexPixelRadiusNode);
                xmlWriter.WriteString(vertexSnapRenderSettings.SourceVertexRadiusInPixels.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                // Decor paint
                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DecorPaintLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DecorPaintBrushCircleLookAndFeelNode);

                xmlWriter.WriteNewLine(4);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.DecorPaintBrushCircleBorderLineColorNode);
                xmlWriter.WriteColorString(ObjectPlacement.Get().DecorPaintObjectPlacement.BrushCircleRenderSettings.BorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                // Path
                ObjectPlacementPathRenderSettings pathRenderSettings = ObjectPlacement.Get().PathObjectPlacement.PathRenderSettings;
                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PathLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.PathBorderLineColorNode);
                xmlWriter.WriteColorString(pathRenderSettings.ManualConstructionRenderSettings.BoxBorderLineColor);
                xmlWriter.WriteEndElement();

                SaveExtensionPlaneLookAndFeel(ObjectPlacement.Get().PathObjectPlacement.PathExtensionPlaneRenderSettings, xmlWriter, 3);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                // Block
                ObjectPlacementBlockRenderSettings blockRenderSettings = ObjectPlacement.Get().BlockObjectPlacement.BlockRenderSettings;
                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockBorderLineColorNode);
                xmlWriter.WriteColorString(blockRenderSettings.ManualConstructionRenderSettings.BoxBorderLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockTextColorNode);
                xmlWriter.WriteColorString(blockRenderSettings.ManualConstructionRenderSettings.DimensionsLabelRenderSettings.TextColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockFontSizeNode);
                xmlWriter.WriteString(blockRenderSettings.ManualConstructionRenderSettings.DimensionsLabelRenderSettings.FontSize.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.BlockBoldTextNode);
                xmlWriter.WriteString(blockRenderSettings.ManualConstructionRenderSettings.DimensionsLabelRenderSettings.Bold.ToString());
                xmlWriter.WriteEndElement();

                SaveExtensionPlaneLookAndFeel(ObjectPlacement.Get().BlockObjectPlacement.BlockExtensionPlaneRenderSettings, xmlWriter, 3);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteEndElement();
            }
        }
        private static void SaveSnapLookAndFeel(XmlTextWriter xmlWriter, Octave3DConfigSaveLoadSettings saveSettings)
        {
            if (saveSettings.SnapLookAndFeel)
            {
                XZGridRenderSettings           xzGridRenderSettings         = ObjectSnapping.Get().XZSnapGrid.RenderSettings;
                XZGridRenderSettings           objSurfaceGridRenderSettings = ObjectSnapping.Get().RenderSettingsForColliderSnapSurfaceGrid;
                CoordinateSystemRenderSettings coordSystemRenderSettings    = ObjectSnapping.Get().XZSnapGrid.RenderableCoordinateSystem.RenderSettings;

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.SnapLookAndFeelNode);

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.IsXZGridVisibleNode);
                xmlWriter.WriteString(xzGridRenderSettings.IsVisible.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridCellLineColorNode);
                xmlWriter.WriteColorString(xzGridRenderSettings.CellLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridCellLineThicknessNode);
                xmlWriter.WriteString(xzGridRenderSettings.CellLineThickness.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridPlaneColorNode);
                xmlWriter.WriteColorString(xzGridRenderSettings.PlaneColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridCoordSystemLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.IsXZGridCoordSystemVisibleNode);
                xmlWriter.WriteString(coordSystemRenderSettings.IsVisible.ToString());
                xmlWriter.WriteEndElement();

                List <CoordinateSystemAxis> allAxes = CoordinateSystemAxes.GetAll();
                foreach (var axis in allAxes)
                {
                    xmlWriter.WriteNewLine(3);
                    xmlWriter.WriteStartElement(axis.ToString());

                    xmlWriter.WriteNewLine(4);
                    xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.IsXZGridCoordSystemAxisVisibleNode);
                    xmlWriter.WriteString(coordSystemRenderSettings.IsAxisVisible(axis).ToString());
                    xmlWriter.WriteEndElement();

                    xmlWriter.WriteNewLine(4);
                    xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.IsXZGridCoordSystemAxisInfiniteNode);
                    xmlWriter.WriteString(coordSystemRenderSettings.IsAxisRenderedInfinite(axis).ToString());
                    xmlWriter.WriteEndElement();

                    xmlWriter.WriteNewLine(4);
                    xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridCoordSystemAxisFiniteSizeNode);
                    xmlWriter.WriteString(coordSystemRenderSettings.GetAxisFinitSize(axis).ToString());
                    xmlWriter.WriteEndElement();

                    xmlWriter.WriteNewLine(4);
                    xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.XZGridCoordSystemAxisColorNode);
                    xmlWriter.WriteColorString(coordSystemRenderSettings.GetAxisColor(axis));
                    xmlWriter.WriteEndElement();

                    xmlWriter.WriteNewLine(3);
                    xmlWriter.WriteEndElement();
                }

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSnapSurfaceGridLookAndFeelNode);

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.IsObjectSnapSurfaceGridVisibleNode);
                xmlWriter.WriteString(objSurfaceGridRenderSettings.IsVisible.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSnapSurfaceGridCellLineColorNode);
                xmlWriter.WriteColorString(objSurfaceGridRenderSettings.CellLineColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSnapSurfaceGridCellLineThicknessNode);
                xmlWriter.WriteString(objSurfaceGridRenderSettings.CellLineThickness.ToString());
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(3);
                xmlWriter.WriteStartElement(Octave3DConfigXMLInfo.ObjectSnapSurfaceGridPlaneColorNode);
                xmlWriter.WriteColorString(objSurfaceGridRenderSettings.PlaneColor);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(2);
                xmlWriter.WriteEndElement();

                xmlWriter.WriteNewLine(1);
                xmlWriter.WriteEndElement();
            }
        }