From 6870a3bce48f5115f390c1e93b41b3e9f87b721a Mon Sep 17 00:00:00 2001 From: "saumya.jain" Date: Mon, 21 Aug 2023 10:06:51 +0200 Subject: [PATCH] improve number of iterations CURA-10685 --- cura/Settings/CuraFormulaFunctions.py | 8 ++++---- resources/definitions/fdmprinter.def.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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":