|
@@ -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.
|