From fa3f473b6179dd11c69ac92324b414e513ce0b9c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Dec 2016 11:35:08 +0100 Subject: [PATCH 1/9] Changed order of buttons --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 24 ++++++++++--- plugins/3MFReader/WorkspaceDialog.py | 20 +++++++++++ plugins/3MFReader/WorkspaceDialog.qml | 39 +++++++++++++++++---- 3 files changed, 71 insertions(+), 12 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index b4de6c0736..10cc7b5c88 100644 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -55,9 +55,11 @@ class ThreeMFWorkspaceReader(WorkspaceReader): Logger.log("w", "Could not find reader that was able to read the scene data for 3MF workspace") return WorkspaceReader.PreReadResult.failed - machine_name = "" machine_type = "" + variant_type_name = i18n_catalog.i18nc("@label", "Nozzle") + + num_extruders = 0 # Check if there are any conflicts, so we can ask the user. archive = zipfile.ZipFile(file_name, "r") cura_file_names = [name for name in archive.namelist() if name.startswith("Cura/")] @@ -87,13 +89,22 @@ class ThreeMFWorkspaceReader(WorkspaceReader): if not definitions: definition_container = DefinitionContainer(container_id) definition_container.deserialize(archive.open(definition_container_file).read().decode("utf-8")) - if definition_container.getMetaDataEntry("type") != "extruder": - machine_type = definition_container.getName() + else: - if definitions[0].getMetaDataEntry("type") != "extruder": - machine_type = definitions[0].getName() + definition_container = definitions[0] + + if definition_container.getMetaDataEntry("type") != "extruder": + machine_type = definition_container.getName() + variant_type_name = definition_container.getMetaDataEntry("variants_name", variant_type_name) + else: + num_extruders += 1 Job.yieldThread() + if num_extruders == 0: + num_extruders = 1 # No extruder stacks found, which means there is one extruder + + extruders = num_extruders * [""] + material_labels = [] material_conflict = False xml_material_profile = self._getXmlProfileClass() @@ -138,6 +149,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader): quality_type = instance_container.getName() elif container_type == "user": num_user_settings += len(instance_container._instances) + Job.yieldThread() num_visible_settings = 0 try: @@ -168,6 +180,8 @@ class ThreeMFWorkspaceReader(WorkspaceReader): self._dialog.setMachineName(machine_name) self._dialog.setMaterialLabels(material_labels) self._dialog.setMachineType(machine_type) + self._dialog.setExtruders(extruders) + self._dialog.setVariantType(variant_type_name) self._dialog.setHasObjectsOnPlate(Application.getInstance().getPlatformActivity) self._dialog.show() diff --git a/plugins/3MFReader/WorkspaceDialog.py b/plugins/3MFReader/WorkspaceDialog.py index ec2509252b..c26f0707f6 100644 --- a/plugins/3MFReader/WorkspaceDialog.py +++ b/plugins/3MFReader/WorkspaceDialog.py @@ -43,7 +43,9 @@ class WorkspaceDialog(QObject): self._quality_type = "" self._machine_name = "" self._machine_type = "" + self._variant_type = "" self._material_labels = [] + self._extruders = [] self._objects_on_plate = False machineConflictChanged = pyqtSignal() @@ -59,6 +61,16 @@ class WorkspaceDialog(QObject): objectsOnPlateChanged = pyqtSignal() numUserSettingsChanged = pyqtSignal() machineTypeChanged = pyqtSignal() + variantTypeChanged = pyqtSignal() + extrudersChanged = pyqtSignal() + + @pyqtProperty(str, notify=variantTypeChanged) + def variantType(self): + return self._variant_type + + def setVariantType(self, variant_type): + self._variant_type = variant_type + self.variantTypeChanged.emit() @pyqtProperty(str, notify=machineTypeChanged) def machineType(self): @@ -92,6 +104,14 @@ class WorkspaceDialog(QObject): self._material_labels = material_labels self.materialLabelsChanged.emit() + @pyqtProperty("QVariantList", notify=extrudersChanged) + def extruders(self): + return self._extruders + + def setExtruders(self, extruders): + self._extruders = extruders + self.extrudersChanged.emit() + @pyqtProperty(str, notify = machineNameChanged) def machineName(self): return self._machine_name diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 3d30d17d25..0ee980a67f 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -133,6 +133,30 @@ UM.Dialog } } } + + /*Repeater + { + model: manager.extruders + delegate: Column + { + Label + { + text: catalog.i18nc("@action:label", "Extruder %1").arg(index+1) + } + width: parent.width + height: childrenRect.height + Label + { + text: catalog.i18nc("@action:label", "%1 & material").arg(manager.variantType) + width: parent.width / 3 + } + Label + { + text: modelData + width: parent.width / 3 + } + } + }*/ Item // Spacer { height: spacerHeight @@ -332,19 +356,20 @@ UM.Dialog } } rightButtons: [ - Button - { - id: ok_button - text: catalog.i18nc("@action:button","OK"); - onClicked: { manager.closeBackend(); manager.onOkButtonClicked() } - enabled: true - }, + Button { id: cancel_button text: catalog.i18nc("@action:button","Cancel"); onClicked: { manager.onCancelButtonClicked() } enabled: true + }, + Button + { + id: ok_button + text: catalog.i18nc("@action:button","Open"); + onClicked: { manager.closeBackend(); manager.onOkButtonClicked() } + enabled: true } ] } \ No newline at end of file From 0e09de195b5fa56cf4b3173a18f9208a941deee1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Dec 2016 11:50:50 +0100 Subject: [PATCH 2/9] Added num user settings to save project dialog --- cura/Settings/MachineManager.py | 11 +++++++++++ resources/qml/WorkspaceSummaryDialog.qml | 16 +++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 11a8087f37..259f087149 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -412,6 +412,17 @@ class MachineManager(QObject): return False + @pyqtProperty(int, notify = activeStackValueChanged) + def numUserSettings(self): + if not self._global_container_stack: + return 0 + num_user_settings = 0 + num_user_settings += len(self._global_container_stack.getTop().findInstances()) + stacks = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())) + for stack in stacks: + num_user_settings += len(stack.getTop().findInstances()) + return num_user_settings + ## Delete a user setting from the global stack and all extruder stacks. # \param key \type{str} the name of the key to delete @pyqtSlot(str) diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index c8da87dc76..bcd0ac6819 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -119,7 +119,21 @@ UM.Dialog text: catalog.i18nc("@action:label", "Profile settings") font.bold: true } - + Row + { + width: parent.width + Label + { + text: catalog.i18nc("@action:label", "Not in profile") + width: parent.width / 3 + } + Label + { + text: catalog.i18nc("@action:label", "%1 override(s)").arg(Cura.MachineManager.numUserSettings) + width: parent.width / 3 + } + visible: Cura.MachineManager.numUserSettings + } Row { width: parent.width From 8391a7971bfb0ab4e45a896cb8340517c93fe090 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Dec 2016 12:40:59 +0100 Subject: [PATCH 3/9] Added machine type to workspace summary dialog CURA-1263 --- cura/Settings/MachineManager.py | 9 +++++++++ resources/qml/WorkspaceSummaryDialog.qml | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 259f087149..2a456c3ff1 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -982,6 +982,15 @@ class MachineManager(QObject): return "" + @pyqtProperty(str, notify=globalContainerChanged) + def activeDefinitionName(self): + if self._global_container_stack: + definition = self._global_container_stack.getBottom() + if definition: + return definition.getMetaDataEntry("name", "") + + return "" + ## Get the Definition ID to use to select quality profiles for the currently active machine # \returns DefinitionID (string) if found, empty string otherwise # \sa getQualityDefinitionId diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index bcd0ac6819..1f52dd3719 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -91,7 +91,21 @@ UM.Dialog text: catalog.i18nc("@action:label", "Printer settings") font.bold: true } - + Row + { + width: parent.width + height: childrenRect.height + Label + { + text: catalog.i18nc("@action:label", "Type") + width: parent.width / 3 + } + Label + { + text: manager.activeDefinitionName + width: parent.width / 3 + } + } Row { width: parent.width From ff18a314eff3bf81e44d233d78ec6af18ab28e2f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Dec 2016 13:16:11 +0100 Subject: [PATCH 4/9] Added extruder information to workspace summary dialog CURA-1263 --- cura/Settings/MachineManager.py | 13 +++++++++- resources/qml/WorkspaceSummaryDialog.qml | 33 ++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 2a456c3ff1..6bc407928b 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -498,6 +498,17 @@ class MachineManager(QObject): return "" + @pyqtProperty("QVariantList", notify=activeVariantChanged) + def activeVariantNames(self): + result = [] + if ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() is not None: + for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks(): + variant_container = stack.findContainer({"type": "variant"}) + if variant_container and variant_container != self._empty_variant_container: + result.append(variant_container.getName()) + + return result + @pyqtProperty("QVariantList", notify = activeMaterialChanged) def activeMaterialNames(self): result = [] @@ -987,7 +998,7 @@ class MachineManager(QObject): if self._global_container_stack: definition = self._global_container_stack.getBottom() if definition: - return definition.getMetaDataEntry("name", "") + return definition.getName() return "" diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index 1f52dd3719..61022ca3b4 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -102,7 +102,7 @@ UM.Dialog } Label { - text: manager.activeDefinitionName + text: Cura.MachineManager.activeDefinitionName width: parent.width / 3 } } @@ -120,8 +120,37 @@ UM.Dialog text: Cura.MachineManager.activeMachineName width: parent.width / 3 } - } + + Repeater + { + model: Cura.MachineManager.activeMaterialNames + delegate: Column + { + Label + { + text: catalog.i18nc("@action:label", "Extruder %1").arg(index+1) + } + height: childrenRect.height + width: parent.width + Row + { + width: parent.width + height: childrenRect.height + Label + { + text: catalog.i18nc("@action:label", "%1 & material").arg(Cura.MachineManager.activeDefinitionVariantsName) + width: parent.width / 3 + } + Label + { + text: Cura.MachineManager.activeVariantNames[index] + ", " + modelData + width: parent.width / 3 + } + } + } + } + Item // Spacer { height: spacerHeight From f598a49c4bb833dbbe8f6507c54230568d0b30ea Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Dec 2016 13:29:51 +0100 Subject: [PATCH 5/9] Order of extruders is now sorted by position CURA-1263 --- cura/Settings/ExtruderManager.py | 7 ++++++- resources/qml/WorkspaceSummaryDialog.qml | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index a0db1bbf83..e98386a908 100644 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -395,7 +395,12 @@ class ExtruderManager(QObject): # \return \type{List[ContainerStack]} a list of def getActiveExtruderStacks(self): global_stack = UM.Application.getInstance().getGlobalContainerStack() - return list(self._extruder_trains[global_stack.getId()].values()) if global_stack else [] + + result = [] + if global_stack: + for extruder in sorted(self._extruder_trains[global_stack.getId()]): + result.append(self._extruder_trains[global_stack.getId()][extruder]) + return result def __globalContainerStackChanged(self): self._addCurrentMachineExtruders() diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index 61022ca3b4..1b73b276fd 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -127,6 +127,11 @@ UM.Dialog model: Cura.MachineManager.activeMaterialNames delegate: Column { + Item // Spacer + { + height: spacerHeight + width: height + } Label { text: catalog.i18nc("@action:label", "Extruder %1").arg(index+1) @@ -193,7 +198,7 @@ UM.Dialog } } - Item // Spacer + /*Item // Spacer { height: spacerHeight width: height @@ -223,8 +228,7 @@ UM.Dialog width: parent.width / 3 } } - } - + }*/ Item // Spacer { From c4e061be60ee9e8eab0b2b23d75d38fc9edc4f49 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 16 Dec 2016 14:38:31 +0100 Subject: [PATCH 6/9] Changed margins on save & load workspace dialog CURA-1263 --- plugins/3MFReader/WorkspaceDialog.qml | 77 ++++++++++++------------ resources/qml/WorkspaceSummaryDialog.qml | 45 ++++++++++---- 2 files changed, 72 insertions(+), 50 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 0ee980a67f..cb8e667872 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -16,9 +16,9 @@ UM.Dialog minimumWidth: 550 maximumWidth: 550 - height: 350 - minimumHeight: 350 - maximumHeight: 350 + height: 400 + minimumHeight: 400 + maximumHeight: 400 property int comboboxHeight: 15 property int spacerHeight: 10 onClosing: manager.notifyClosed() @@ -33,7 +33,15 @@ UM.Dialog } Item { - anchors.fill: parent + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + + anchors.topMargin: 20 + anchors.bottomMargin: 20 + anchors.leftMargin:20 + anchors.rightMargin: 20 UM.I18nCatalog { @@ -134,29 +142,6 @@ UM.Dialog } } - /*Repeater - { - model: manager.extruders - delegate: Column - { - Label - { - text: catalog.i18nc("@action:label", "Extruder %1").arg(index+1) - } - width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "%1 & material").arg(manager.variantType) - width: parent.width / 3 - } - Label - { - text: modelData - width: parent.width / 3 - } - } - }*/ Item // Spacer { height: spacerHeight @@ -345,31 +330,47 @@ UM.Dialog height: spacerHeight width: height } - Label + Row { - text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the buildplate") - visible: manager.hasObjectsOnPlate - color: "red" width: parent.width - wrapMode: Text.Wrap + height: childrenRect.height + visible: manager.hasObjectsOnPlate + UM.RecolorImage + { + width: warningLabel.height + height: width + + source: UM.Theme.getIcon("notice") + color: "black" + + } + Label + { + id: warningLabel + text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the buildplate") + wrapMode: Text.Wrap + } } } - } - rightButtons: [ - Button { id: cancel_button text: catalog.i18nc("@action:button","Cancel"); onClicked: { manager.onCancelButtonClicked() } enabled: true - }, + anchors.bottom: parent.bottom + anchors.right: ok_button.left + anchors.bottomMargin: - 0.5 * height + anchors.rightMargin:2 + } Button { id: ok_button text: catalog.i18nc("@action:button","Open"); onClicked: { manager.closeBackend(); manager.onOkButtonClicked() } - enabled: true + anchors.bottomMargin: - 0.5 * height + anchors.bottom: parent.bottom + anchors.right: parent.right } - ] + } } \ No newline at end of file diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index 1b73b276fd..c87830fe5c 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -46,7 +46,16 @@ UM.Dialog Item { - anchors.fill: parent + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + + anchors.topMargin: 20 + anchors.bottomMargin: 20 + anchors.leftMargin:20 + anchors.rightMargin: 20 + UM.SettingDefinitionsModel { id: definitionsModel @@ -263,22 +272,34 @@ UM.Dialog checked: dontShowAgain } } - } - rightButtons: [ - Button - { - id: cancel_button - text: catalog.i18nc("@action:button","Cancel"); - enabled: true - onClicked: close() - }, + + Button { id: ok_button text: catalog.i18nc("@action:button","Save"); enabled: true onClicked: { - close(); yes() } + close() + yes() + } + anchors.bottomMargin: - 0.5 * height + anchors.bottom: parent.bottom + anchors.right: parent.right } - ] + + Button + { + id: cancel_button + text: catalog.i18nc("@action:button","Cancel"); + enabled: true + onClicked: close() + + anchors.bottom: parent.bottom + anchors.right: ok_button.left + anchors.bottomMargin: - 0.5 * height + anchors.rightMargin:2 + + } + } } \ No newline at end of file From 0c212d01b9053007a7218379c31604384f11d9f9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Dec 2016 15:28:38 +0100 Subject: [PATCH 7/9] Tighten regex for floats You're no longer allowed to type multiple radices, for instance. Contributes to issue CURA-3157. --- resources/qml/Settings/SettingTextField.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index d89f540aa3..eada681627 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -100,7 +100,7 @@ SettingItem maximumLength: 10; - validator: RegExpValidator { regExp: (definition.type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } // definition.type property from parent loader used to disallow fractional number entry + validator: RegExpValidator { regExp: (definition.type == "int") ? /^-?[0-9]{0,10}$/ : /^-?[0-9]?[.,]?[0-9]{0,10}$/ } // definition.type property from parent loader used to disallow fractional number entry Binding { From 0e31de3ed96fbe7cf23e0794d17777edad20e638 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Dec 2016 16:13:15 +0100 Subject: [PATCH 8/9] No longer crash when numeric settings are empty strings They may temporarily be empty strings while the user is typing, but that currently makes the setting red. However, if we crash during the build plate updating, the front-end gets in some half-updated state in which settings get reset to their previous state every time the user changes anything. So don't crash here. Contributes to issue CURA-3157. --- cura/BuildVolume.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 629f7ba6d8..56fa8d7b3b 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -721,7 +721,12 @@ class BuildVolume(SceneNode): # # \return A sequence of setting values, one for each extruder. def _getSettingFromAllExtruders(self, setting_key, property = "value"): - return ExtruderManager.getInstance().getAllExtruderSettings(setting_key, property) + all_values = ExtruderManager.getInstance().getAllExtruderSettings(setting_key, property) + all_types = ExtruderManager.getInstance().getAllExtruderSettings(setting_key, "type") + for i in range(len(all_values)): + if not all_values[i] and (all_types[i] == "int" or all_types[i] == "float"): + all_values[i] = 0 + return all_values ## Private convenience function to get a setting from the support infill # extruder. @@ -745,16 +750,21 @@ class BuildVolume(SceneNode): multi_extrusion = self._global_container_stack.getProperty("machine_extruder_count", "value") > 1 if not multi_extrusion: - return self._global_container_stack.getProperty(setting_key, property) + stack = self._global_container_stack + else: + extruder_index = self._global_container_stack.getProperty(extruder_setting_key, "value") - extruder_index = self._global_container_stack.getProperty(extruder_setting_key, "value") + if extruder_index == "-1": # If extruder index is -1 use global instead + stack = self._global_container_stack + else: + extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)] + stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0] - if extruder_index == "-1": # If extruder index is -1 use global instead - return self._global_container_stack.getProperty(setting_key, property) - - extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)] - stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0] - return stack.getProperty(setting_key, property) + value = stack.getProperty(setting_key, property) + setting_type = stack.getProperty(setting_key, "type") + if not value and (setting_type == "int" or setting_type == "float"): + return 0 + return value ## Convenience function to calculate the disallowed radius around the edge. # From 39c0a367b66c9f787e8ddee1ff1a75ad3bbb32af Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Dec 2016 16:16:51 +0100 Subject: [PATCH 9/9] Update documentation of this stack description I found Not really related, but doesn't hurt. So... does not contribute to issue CURA-3157. --- resources/qml/Settings/SettingTextField.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index eada681627..427b482cea 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -113,7 +113,8 @@ SettingItem // 2: quality // 3: material -> user changed material in materialspage // 4: variant - // 5: machine + // 5: machine_changes + // 6: machine if ((base.resolve != "None" && base.resolve) && (stackLevel != 0) && (stackLevel != 1)) { // We have a resolve function. Indicates that the setting is not settable per extruder and that // we have to choose between the resolved value (default) and the global value