diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 723bf91d0d..389c4e4de3 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -655,6 +655,15 @@ class MachineManager(QObject): return "" + @pyqtProperty(str, notify = activeVariantChanged) + def activeVariantId(self) -> str: + if self._active_container_stack: + variant = self._active_container_stack.variant + if variant: + return variant.getId() + + return "" + @pyqtProperty(str, notify = activeVariantChanged) def activeVariantBuildplateName(self) -> str: if self._global_container_stack: diff --git a/resources/definitions/ultimaker3.def.json b/resources/definitions/ultimaker3.def.json index 64948b4fe9..08fe01a76b 100644 --- a/resources/definitions/ultimaker3.def.json +++ b/resources/definitions/ultimaker3.def.json @@ -122,7 +122,7 @@ "raft_jerk": { "value": "jerk_layer_0" }, "raft_margin": { "value": "10" }, "raft_surface_layers": { "value": "1" }, - "retraction_amount": { "value": "2" }, + "retraction_amount": { "value": "6.5" }, "retraction_count_max": { "value": "10" }, "retraction_extrusion_window": { "value": "1" }, "retraction_hop": { "value": "2" }, diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index 8af77e22ac..f6971d0da3 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -119,7 +119,7 @@ "raft_margin": { "value": "10" }, "raft_speed": { "value": "25" }, "raft_surface_layers": { "value": "1" }, - "retraction_amount": { "value": "2" }, + "retraction_amount": { "value": "6.5" }, "retraction_count_max": { "value": "10" }, "retraction_extrusion_window": { "value": "1" }, "retraction_hop": { "value": "2" }, diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index ceb2ed12be..ad91f2ee9a 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -404,10 +404,17 @@ TabView id: spinBox anchors.left: label.right value: { + // In case the setting is not in the material... if (!isNaN(parseFloat(materialPropertyProvider.properties.value))) { return parseFloat(materialPropertyProvider.properties.value); } + // ... we search in the variant, and if it is not there... + if (!isNaN(parseFloat(variantPropertyProvider.properties.value))) + { + return parseFloat(variantPropertyProvider.properties.value); + } + // ... then look in the definition container. if (!isNaN(parseFloat(machinePropertyProvider.properties.value))) { return parseFloat(machinePropertyProvider.properties.value); @@ -431,6 +438,13 @@ TabView key: model.key } UM.ContainerPropertyProvider + { + id: variantPropertyProvider + containerId: Cura.MachineManager.activeVariantId + watchedProperties: [ "value" ] + key: model.key + } + UM.ContainerPropertyProvider { id: machinePropertyProvider containerId: Cura.MachineManager.activeDefinitionId