mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-01 14:51:07 -07:00
Rename to CuraFormulaFunctions
to avoid confusion with "SettingFunction" in Uranium.
This commit is contained in:
parent
329b38663e
commit
f69005fef9
4 changed files with 15 additions and 15 deletions
|
|
@ -12,10 +12,10 @@ if TYPE_CHECKING:
|
|||
|
||||
|
||||
#
|
||||
# This class contains all Cura-related custom setting functions. Some functions requires information such as the
|
||||
# currently active machine, so this is made into a class instead of standalone functions.
|
||||
# This class contains all Cura-related custom functions that can be used in formulas. Some functions requires
|
||||
# information such as the currently active machine, so this is made into a class instead of standalone functions.
|
||||
#
|
||||
class CustomSettingFunctions:
|
||||
class CuraFormulaFunctions:
|
||||
|
||||
def __init__(self, application: "CuraApplication") -> None:
|
||||
self._application = application
|
||||
|
|
@ -373,7 +373,7 @@ class ExtruderManager(QObject):
|
|||
# \return String representing the extruder values
|
||||
@pyqtSlot(str, result="QVariant")
|
||||
def getInstanceExtruderValues(self, key: str) -> List:
|
||||
return self._application.getCustomSettingFunctions().getValuesInAllExtruders(key)
|
||||
return self._application.getCuraFormulaFunctions().getValuesInAllExtruders(key)
|
||||
|
||||
## Get the resolve value or value for a given key
|
||||
#
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class UserChangesModel(ListModel):
|
|||
def _update(self):
|
||||
application = Application.getInstance()
|
||||
machine_manager = application.getMachineManager()
|
||||
custom_setting_functions = application.getCustomSettingFunctions()
|
||||
cura_formula_functions = application.getCuraFormulaFunctions()
|
||||
|
||||
item_dict = OrderedDict()
|
||||
item_list = []
|
||||
|
|
@ -77,7 +77,7 @@ class UserChangesModel(ListModel):
|
|||
|
||||
# Override "getExtruderValue" with "getDefaultExtruderValue" so we can get the default values
|
||||
user_changes = containers.pop(0)
|
||||
default_value_resolve_context = custom_setting_functions.createContextForDefaultValueEvaluation(stack)
|
||||
default_value_resolve_context = cura_formula_functions.createContextForDefaultValueEvaluation(stack)
|
||||
|
||||
for setting_key in user_changes.getAllKeys():
|
||||
original_value = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue