mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-07 07:51:51 +08:00
improve number of iterations
CURA-10685
This commit is contained in:
parent
e5fef5ba4b
commit
6870a3bce4
@ -101,10 +101,10 @@ class CuraFormulaFunctions:
|
||||
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.
|
||||
|
@ -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":
|
||||
|
Loading…
x
Reference in New Issue
Block a user