mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
CURA-4485 Disabling automatic material and variant when connecting to a
printer within a cluster of more than 1 printer.
This commit is contained in:
parent
6dfd04928f
commit
0eedfa5c18
2 changed files with 20 additions and 4 deletions
|
@ -14,6 +14,14 @@ Menu
|
||||||
|
|
||||||
property int extruderIndex: 0
|
property int extruderIndex: 0
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
|
property bool isClusterPrinter:
|
||||||
|
{
|
||||||
|
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||||
|
// This is a non cluster printer or the cluster it is just one printer
|
||||||
|
if (typeof clusterSize == "undefined" || clusterSize == 1)
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
UM.SettingPropertyProvider
|
UM.SettingPropertyProvider
|
||||||
{
|
{
|
||||||
|
@ -29,14 +37,14 @@ Menu
|
||||||
id: automaticMaterial
|
id: automaticMaterial
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex)
|
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex && !isClusterPrinter)
|
||||||
{
|
{
|
||||||
var materialName = Cura.MachineManager.printerOutputDevices[0].materialNames[extruderIndex];
|
var materialName = Cura.MachineManager.printerOutputDevices[0].materialNames[extruderIndex];
|
||||||
return catalog.i18nc("@title:menuitem %1 is the automatically selected material", "Automatic: %1").arg(materialName);
|
return catalog.i18nc("@title:menuitem %1 is the automatically selected material", "Automatic: %1").arg(materialName);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex
|
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex && !isClusterPrinter
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
var materialId = Cura.MachineManager.printerOutputDevices[0].materialIds[extruderIndex];
|
var materialId = Cura.MachineManager.printerOutputDevices[0].materialIds[extruderIndex];
|
||||||
|
|
|
@ -14,20 +14,28 @@ Menu
|
||||||
|
|
||||||
property int extruderIndex: 0
|
property int extruderIndex: 0
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
|
property bool isClusterPrinter:
|
||||||
|
{
|
||||||
|
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||||
|
// This is a non cluster printer or the cluster it is just one printer
|
||||||
|
if (typeof clusterSize == "undefined" || clusterSize == 1)
|
||||||
|
return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
id: automaticNozzle
|
id: automaticNozzle
|
||||||
text:
|
text:
|
||||||
{
|
{
|
||||||
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex)
|
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex && !isClusterPrinter)
|
||||||
{
|
{
|
||||||
var nozzleName = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
|
var nozzleName = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
|
||||||
return catalog.i18nc("@title:menuitem %1 is the nozzle currently loaded in the printer", "Automatic: %1").arg(nozzleName);
|
return catalog.i18nc("@title:menuitem %1 is the nozzle currently loaded in the printer", "Automatic: %1").arg(nozzleName);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex
|
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex && !isClusterPrinter
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue