Rename to CuraFormulaFunctions

to avoid confusion with "SettingFunction" in Uranium.
This commit is contained in:
Lipu Fei 2018-10-01 11:24:31 +02:00
parent 329b38663e
commit f69005fef9
4 changed files with 15 additions and 15 deletions

View file

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

View file

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

View file

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