Skip to content

Commit

Permalink
improve number of iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 committed Aug 21, 2023
1 parent e5fef5b commit 6870a3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cura/Settings/CuraFormulaFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 6870a3b

Please sign in to comment.