mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Put back getAnyExtruderPositionWithOrDefault
api function
CURA-10685
This commit is contained in:
parent
ef4665a55f
commit
6e045e8b37
3 changed files with 14 additions and 0 deletions
|
@ -97,6 +97,15 @@ class CuraFormulaFunctions:
|
|||
|
||||
return result
|
||||
|
||||
# Get the first extruder that adheres to a specific (boolean) property, like 'material_is_support_material'.
|
||||
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)
|
||||
|
||||
# Get the first extruder with material that adheres to a specific (boolean) property, like 'material_is_support_material'.
|
||||
def getExtruderPositionWithMaterial(self, filter_key: str,
|
||||
context: Optional["PropertyEvaluationContext"] = None) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue