Filter materials by the (approximate) material diameter of the printer

If a machine defines material diameter of 2.85mm, there is no use to show the 1.75mm materials and vice-versa
This commit is contained in:
fieldOfView 2017-04-12 23:03:58 +02:00
parent e0b927b53c
commit e92aaca7b6
3 changed files with 22 additions and 2 deletions

View file

@ -15,6 +15,15 @@ Menu
property int extruderIndex: 0
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
UM.SettingPropertyProvider
{
id: materialDiameterProvider
containerStackId: Cura.MachineManager.activeMachineId
key: "material_diameter"
watchedProperties: [ "value" ]
}
MenuItem
{
id: automaticMaterial
@ -141,7 +150,7 @@ Menu
function materialFilter()
{
var result = { "type": "material" };
var result = { "type": "material", "approximate_diameter": Math.round(materialDiameterProvider.properties.value) };
if(Cura.MachineManager.filterMaterialsByMachine)
{
result.definition = Cura.MachineManager.activeQualityDefinitionId;