from Cura.util import version
from Cura.util import validators
+#The settings dictionary contains a key/value reference to all possible settings. With the setting name as key.
settingsDictionary = {}
+#The settings list is used to keep a full list of all the settings. This is needed to keep the settings in the proper order,
+# as the dictionary will not contain insertion order.
settingsList = []
+
class setting(object):
+ #A setting object contains a configuration setting. These are globally accessible trough the quick access functions
+ # and trough the settingsDictionary function.
+ # Settings can be:
+ # * profile settings (settings that effect the slicing process and the print result)
+ # * preferences (settings that effect how cura works and acts)
+ # * machine settings (settings that relate to the physical configuration of your machine)
+ # * alterations (bad name copied from Skeinforge. These are the start/end code pieces)
+ # Settings have validators that check if the value is valid, but do not prevent invalid values!
+ # Settings have conditions that enable/disable this setting depending on other settings. (Ex: Dual-extrusion)
def __init__(self, name, default, type, category, subcategory):
self._name = name
self._label = name
self._tooltip = tooltip
return self
- def setRange(self, minValue = None, maxValue = None):
+ def setRange(self, minValue=None, maxValue=None):
if len(self._validators) < 1:
return
self._validators[0].minValue = minValue
setting('submit_slice_information', 'False', bool, 'preference', 'hidden').setLabel('Send usage statistics', 'Submit anonymous usage information to improve next versions of Cura')
setting('youmagine_token', '', str, 'preference', 'hidden')
setting('filament_physical_density', '1240', float, 'preference', 'hidden').setRange(500.0, 3000.0).setLabel('Density (kg/m3)', 'Weight of the filament per m3. Around 1240 for PLA. And around 1040 for ABS. This value is used to estimate the weight if the filament used for the print.')
+setting('active_machine', '', str, 'preference', 'hidden')
setting('model_colour', '#FFC924', str, 'preference', 'hidden').setLabel('Model colour')
setting('model_colour2', '#CB3030', str, 'preference', 'hidden').setLabel('Model colour (2)')
setting('window_height', '-1', float, 'preference', 'hidden')
setting('window_normal_sash', '320', float, 'preference', 'hidden')
+setting('machine_name', 'unknown', str, 'machine', 'hidden')
+setting('machine_type', 'unknown', str, 'machine', 'hidden') #Ultimaker, Ultimaker2, RepRap
setting('machine_width', '205', float, 'machine', 'hidden').setLabel('Maximum width (mm)', 'Size of the machine in mm')
setting('machine_depth', '205', float, 'machine', 'hidden').setLabel('Maximum depth (mm)', 'Size of the machine in mm')
setting('machine_height', '200', float, 'machine', 'hidden').setLabel('Maximum height (mm)', 'Size of the machine in mm')
-setting('machine_type', 'unknown', str, 'machine', 'hidden')
setting('machine_center_is_zero', 'False', bool, 'machine', 'hidden')
setting('ultimaker_extruder_upgrade', 'False', bool, 'machine', 'hidden')
setting('has_heated_bed', 'False', bool, 'machine', 'hidden').setLabel('Heated bed', 'If you have an heated bed, this enabled heated bed settings (requires restart)')