|
@@ -393,10 +393,22 @@ class ExtruderManager(QObject):
|
|
|
extruder_train.setNextStack(global_stack)
|
|
|
extruders_changed = True
|
|
|
|
|
|
+ self._fixSingleExtrusionMahineExtruderDefinition(global_stack)
|
|
|
if extruders_changed:
|
|
|
self.extrudersChanged.emit(global_stack_id)
|
|
|
self.setActiveExtruderIndex(0)
|
|
|
|
|
|
+ # After 3.4, all single-extrusion machines have their own extruder definition files instead of reusing
|
|
|
+ # "fdmextruder". We need to check a machine here so its extruder definition is correct according to this.
|
|
|
+ def _fixSingleExtrusionMahineExtruderDefinition(self, global_stack):
|
|
|
+ expected_extruder_definition_0_id = global_stack.getMetaDataEntry("machine_extruder_trains")["0"]
|
|
|
+ extruder_stack_0 = global_stack.extruders["0"]
|
|
|
+ if extruder_stack_0.definition.getId() != expected_extruder_definition_0_id:
|
|
|
+ extruder_definition_id = global_stack.getMetaDataEntry("machine_extruder_trains")["0"]
|
|
|
+ container_registry = ContainerRegistry.getInstance()
|
|
|
+ extruder_definition = container_registry.findDefinitionContainers(id = extruder_definition_id)[0]
|
|
|
+ extruder_stack_0.definition = extruder_definition
|
|
|
+
|
|
|
## Get all extruder values for a certain setting.
|
|
|
#
|
|
|
# This is exposed to SettingFunction so it can be used in value functions.
|