예제 #1
0
        public void RenderBlueprint()
        {
            try
            {
                TextBox_Name.Text        = BP.Description.name;
                TextBox_Description.Text = BP.Description.description;

                Tuple <Model3DGroup, Model3DGroup> renders = BP.RenderBlocks();//backgroundtask ?
                this.Model         = renders.Item1;
                this.Glass         = renders.Item2;
                this.Marker        = null;
                CenterMass.Content = null;
                this.Marker2       = new Model3DGroup();

                RenderWires();
                if (listBox_parts.Visibility == Visibility.Visible)
                {
                    fillparts();
                }
                Image_blueprint.DataContext = null;
                Image_blueprint.DataContext = this;
                helix.ResetCamera();
                helix_wires.Camera = helix.Camera;
                //Model.Children[5].Transform = new ScaleTransform3D(2,2,2);

                if (connections.IsEnabled == false)
                {
                    connections.IsEnabled     = true;
                    blockproperties.IsEnabled = true;
                    paint.IsEnabled           = true;
                    fixcreation.IsEnabled     = true;
                    areaproperties.IsEnabled  = true;
                    swapblocks.IsEnabled      = true;
                    paintpicker.IsEnabled     = true;
                    mirrorcreation.IsEnabled  = true;
                    requiredmods.IsEnabled    = true;
                }
                if (!Properties.Settings.Default.safemode)
                {
                    blockpropertiesRAW.IsEnabled = true;
                }
                else
                {
                    blockpropertiesRAW.IsEnabled = false;
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message + "\nin most cases the creation should be fine, something just went wrong while rendering", "failed to render");
            }
        }