layers3d.shader now detects and draws 'starts' as boxes

Also adds a "show starts" option to the SimulationViewMenuComponent and corresponding logic

SimulationPass.py adds a prev_line_types attribute to the shader, which the shader uses to compare with its line_type to detect starts.
This commit is contained in:
bas 2020-10-28 09:49:26 +01:00
parent 2d1128f088
commit 757d7eee50
4 changed files with 58 additions and 1 deletions

View file

@ -82,6 +82,7 @@ Cura.ExpandableComponent
property bool show_helpers: UM.Preferences.getValue("layerview/show_helpers")
property bool show_skin: UM.Preferences.getValue("layerview/show_skin")
property bool show_infill: UM.Preferences.getValue("layerview/show_infill")
property bool show_starts: UM.Preferences.getValue("layerview/show_starts")
// If we are in compatibility mode, we only show the "line type"
property bool show_legend: UM.SimulationView.compatibilityMode ? true : UM.Preferences.getValue("layerview/layer_view_type") == 1
@ -250,6 +251,12 @@ Cura.ExpandableComponent
preference: "layerview/show_infill",
colorId: "layerview_infill"
});
typesLegendModel.append({
label: catalog.i18nc("@label", "Starts"),
initialValue: viewSettings.show_starts,
preference: "layerview/show_starts",
colorId: "layerview_starts"
});
}
}