Make sure we can switch back to solid
This commit is contained in:
parent
d3fc9fdd49
commit
e692492c31
4 changed files with 9 additions and 16 deletions
|
|
@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var buttonMargin = new BorderDouble(2, 5);
|
var buttonMargin = new BorderDouble(2, 5);
|
||||||
|
|
||||||
// put in the button for making the behavior solid
|
// put in the button for making the behavior solid
|
||||||
Button solidButtonView = theme.ButtonFactory.Generate("Solid".Localize());
|
var solidButtonView = theme.ButtonFactory.Generate("Solid".Localize());
|
||||||
var solidBehaviorButton = new PopupButton(solidButtonView)
|
var solidBehaviorButton = new PopupButton(solidButtonView)
|
||||||
{
|
{
|
||||||
Name = "Solid Colors",
|
Name = "Solid Colors",
|
||||||
|
|
@ -79,7 +79,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
},
|
},
|
||||||
Margin = buttonMargin
|
Margin = buttonMargin
|
||||||
};
|
};
|
||||||
solidButtonView.Click += (s, e) =>
|
solidBehaviorButton.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
item.OutputType = PrintOutputTypes.Solid;
|
item.OutputType = PrintOutputTypes.Solid;
|
||||||
};
|
};
|
||||||
|
|
@ -92,11 +92,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
holeBehaviorButton.Click += (s, e) =>
|
holeBehaviorButton.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
item.OutputType = PrintOutputTypes.Hole;
|
item.OutputType = PrintOutputTypes.Hole;
|
||||||
if(item.Mesh != null)
|
|
||||||
{
|
|
||||||
item.Mesh.FaceBspTree = FaceBspTree.Create(item.Mesh);
|
|
||||||
}
|
|
||||||
|
|
||||||
view3DWidget.Invalidate();
|
view3DWidget.Invalidate();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -384,7 +384,7 @@ namespace MatterHackers.MeshVisualizer
|
||||||
|
|
||||||
if (drawColor.alpha == 255)
|
if (drawColor.alpha == 255)
|
||||||
{
|
{
|
||||||
GLHelper.Render(renderData.Mesh, drawColor, renderData.Matrix, RenderType);
|
GLHelper.Render(renderData.Mesh, drawColor, renderData.Matrix, RenderType, renderData.Matrix * World.ModelviewMatrix);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -530,7 +530,7 @@ namespace MatterHackers.MeshVisualizer
|
||||||
{
|
{
|
||||||
var color = transparentRenderData.Color;
|
var color = transparentRenderData.Color;
|
||||||
//color = RGBA_Floats.FromHSL(Math.Max(colorIndex++, 0) / 10.0, .99, .49).GetAsRGBA_Bytes();
|
//color = RGBA_Floats.FromHSL(Math.Max(colorIndex++, 0) / 10.0, .99, .49).GetAsRGBA_Bytes();
|
||||||
GLHelper.Render(transparentRenderData.Mesh, color, transparentRenderData.Matrix, RenderType);
|
GLHelper.Render(transparentRenderData.Mesh, color, transparentRenderData.Matrix, RenderTypes.Outlines, transparentRenderData.Matrix * World.ModelviewMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -538,7 +538,7 @@ namespace MatterHackers.MeshVisualizer
|
||||||
// render the transparent stuff
|
// render the transparent stuff
|
||||||
foreach (var transparentRenderData in transparentMeshes)
|
foreach (var transparentRenderData in transparentMeshes)
|
||||||
{
|
{
|
||||||
GLHelper.Render(transparentRenderData.Mesh, transparentRenderData.Color, transparentRenderData.Matrix, RenderType);
|
GLHelper.Render(transparentRenderData.Mesh, transparentRenderData.Color, transparentRenderData.Matrix, RenderTypes.Outlines, transparentRenderData.Matrix * World.ModelviewMatrix);
|
||||||
}
|
}
|
||||||
// than render the bed
|
// than render the bed
|
||||||
RenderBedMesh(lookingDownOnBed);
|
RenderBedMesh(lookingDownOnBed);
|
||||||
|
|
@ -575,16 +575,16 @@ namespace MatterHackers.MeshVisualizer
|
||||||
{
|
{
|
||||||
bedColor = new RGBA_Bytes(this.BedColor, this.BedColor.alpha / 4);
|
bedColor = new RGBA_Bytes(this.BedColor, this.BedColor.alpha / 4);
|
||||||
}
|
}
|
||||||
GLHelper.Render(printer.Bed.Mesh, bedColor);
|
GLHelper.Render(printer.Bed.Mesh, bedColor, RenderTypes.Shaded, World.ModelviewMatrix);
|
||||||
if (printerShape != null)
|
if (printerShape != null)
|
||||||
{
|
{
|
||||||
GLHelper.Render(printerShape, bedColor);
|
GLHelper.Render(printerShape, bedColor, RenderTypes.Shaded, World.ModelviewMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (printer.Bed.BuildVolumeMesh != null && RenderBuildVolume)
|
if (printer.Bed.BuildVolumeMesh != null && RenderBuildVolume)
|
||||||
{
|
{
|
||||||
GLHelper.Render(printer.Bed.BuildVolumeMesh, this.BuildVolumeColor);
|
GLHelper.Render(printer.Bed.BuildVolumeMesh, this.BuildVolumeColor, RenderTypes.Shaded, World.ModelviewMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
this.printer = printer;
|
this.printer = printer;
|
||||||
this.viewControls3D = viewControls3D;
|
this.viewControls3D = viewControls3D;
|
||||||
|
|
||||||
RenderOpenGl.GLHelper.WireframeColor = ActiveTheme.Instance.PrimaryAccentColor;
|
|
||||||
|
|
||||||
CreateAndAddChildren();
|
CreateAndAddChildren();
|
||||||
|
|
||||||
ActiveSliceSettings.SettingChanged.RegisterEvent((s, e) =>
|
ActiveSliceSettings.SettingChanged.RegisterEvent((s, e) =>
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 409e98615fd3a51519b27ce1405e27c7942383f9
|
Subproject commit a298fe4984a29c476d2477e24b440b3b23b410bd
|
||||||
Loading…
Add table
Add a link
Reference in a new issue