diff --git a/cura/Settings/CuraFormulaFunctions.py b/cura/Settings/CuraFormulaFunctions.py index fd6555e679d..8dd96cc03e9 100644 --- a/cura/Settings/CuraFormulaFunctions.py +++ b/cura/Settings/CuraFormulaFunctions.py @@ -101,10 +101,10 @@ def getValuesInAllExtruders(self, property_key: str, def getAnyExtruderPositionWithOrDefault(self, filter_key: str, context: Optional["PropertyEvaluationContext"] = None) -> str: for extruder in self._getActiveExtruders(context): - value = extruder.getRawProperty(filter_key, "value", context=context) - if value is None or not value: - continue - return str(extruder.position) + material_container = extruder.material + value = material_container.getProperty(filter_key, "value", context) + if value is not None: + return extruder.position return self.getDefaultExtruderPosition() # Get the resolve value or value for a given key. diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 9c83431f544..525a5e1eeeb 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4488,7 +4488,7 @@ "type": "extruder", "default_value": "0", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", - "value": "int(defaultExtruderPosition())", + "value": "int(anyExtruderNrWithOrDefault('material_is_support_material'))", "settable_per_mesh": false, "settable_per_extruder": false, "children":