mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
Merge branch 'CURA-4451_not_support_container'
This commit is contained in:
commit
92ac7c5a15
44 changed files with 149 additions and 572 deletions
|
@ -53,6 +53,7 @@ class CrashHandler:
|
||||||
self.exception_type = exception_type
|
self.exception_type = exception_type
|
||||||
self.value = value
|
self.value = value
|
||||||
self.traceback = tb
|
self.traceback = tb
|
||||||
|
self.dialog = QDialog()
|
||||||
|
|
||||||
# While we create the GUI, the information will be stored for sending afterwards
|
# While we create the GUI, the information will be stored for sending afterwards
|
||||||
self.data = dict()
|
self.data = dict()
|
||||||
|
@ -74,7 +75,6 @@ class CrashHandler:
|
||||||
|
|
||||||
## Creates a modal dialog.
|
## Creates a modal dialog.
|
||||||
def _createDialog(self):
|
def _createDialog(self):
|
||||||
self.dialog = QDialog()
|
|
||||||
self.dialog.setMinimumWidth(640)
|
self.dialog.setMinimumWidth(640)
|
||||||
self.dialog.setMinimumHeight(640)
|
self.dialog.setMinimumHeight(640)
|
||||||
self.dialog.setWindowTitle(catalog.i18nc("@title:window", "Crash Report"))
|
self.dialog.setWindowTitle(catalog.i18nc("@title:window", "Crash Report"))
|
||||||
|
|
|
@ -270,8 +270,9 @@ class CuraApplication(QtApplication):
|
||||||
empty_quality_container = copy.deepcopy(empty_container)
|
empty_quality_container = copy.deepcopy(empty_container)
|
||||||
empty_quality_container._id = "empty_quality"
|
empty_quality_container._id = "empty_quality"
|
||||||
empty_quality_container.setName("Not Supported")
|
empty_quality_container.setName("Not Supported")
|
||||||
empty_quality_container.addMetaDataEntry("quality_type", "normal")
|
empty_quality_container.addMetaDataEntry("quality_type", "not_supported")
|
||||||
empty_quality_container.addMetaDataEntry("type", "quality")
|
empty_quality_container.addMetaDataEntry("type", "quality")
|
||||||
|
empty_quality_container.addMetaDataEntry("supported", False)
|
||||||
ContainerRegistry.getInstance().addContainer(empty_quality_container)
|
ContainerRegistry.getInstance().addContainer(empty_quality_container)
|
||||||
empty_quality_changes_container = copy.deepcopy(empty_container)
|
empty_quality_changes_container = copy.deepcopy(empty_container)
|
||||||
empty_quality_changes_container._id = "empty_quality_changes"
|
empty_quality_changes_container._id = "empty_quality_changes"
|
||||||
|
|
|
@ -87,7 +87,7 @@ class QualityManager:
|
||||||
qualities = set(quality_type_dict.values())
|
qualities = set(quality_type_dict.values())
|
||||||
for material_container in material_containers[1:]:
|
for material_container in material_containers[1:]:
|
||||||
next_quality_type_dict = self.__fetchQualityTypeDictForMaterial(machine_definition, material_container)
|
next_quality_type_dict = self.__fetchQualityTypeDictForMaterial(machine_definition, material_container)
|
||||||
qualities.update(set(next_quality_type_dict.values()))
|
qualities.intersection_update(set(next_quality_type_dict.values()))
|
||||||
|
|
||||||
return list(qualities)
|
return list(qualities)
|
||||||
|
|
||||||
|
@ -178,12 +178,25 @@ class QualityManager:
|
||||||
def findAllUsableQualitiesForMachineAndExtruders(self, global_container_stack: "GlobalStack", extruder_stacks: List["ExtruderStack"]) -> List[InstanceContainer]:
|
def findAllUsableQualitiesForMachineAndExtruders(self, global_container_stack: "GlobalStack", extruder_stacks: List["ExtruderStack"]) -> List[InstanceContainer]:
|
||||||
global_machine_definition = global_container_stack.getBottom()
|
global_machine_definition = global_container_stack.getBottom()
|
||||||
|
|
||||||
|
machine_manager = Application.getInstance().getMachineManager()
|
||||||
|
active_stack_id = machine_manager.activeStackId
|
||||||
|
|
||||||
|
materials = []
|
||||||
|
|
||||||
|
# TODO: fix this
|
||||||
if extruder_stacks:
|
if extruder_stacks:
|
||||||
# Multi-extruder machine detected.
|
# Multi-extruder machine detected
|
||||||
materials = [stack.material for stack in extruder_stacks]
|
for stack in extruder_stacks:
|
||||||
|
if stack.getId() == active_stack_id and machine_manager.newMaterial:
|
||||||
|
materials.append(machine_manager.newMaterial)
|
||||||
else:
|
else:
|
||||||
# Machine with one extruder.
|
materials.append(stack.material)
|
||||||
materials = [global_container_stack.material]
|
else:
|
||||||
|
# Machine with one extruder
|
||||||
|
if global_container_stack.getId() == active_stack_id and machine_manager.newMaterial:
|
||||||
|
materials.append(machine_manager.newMaterial)
|
||||||
|
else:
|
||||||
|
materials.append(global_container_stack.material)
|
||||||
|
|
||||||
quality_types = self.findAllQualityTypesForMachineAndMaterials(global_machine_definition, materials)
|
quality_types = self.findAllQualityTypesForMachineAndMaterials(global_machine_definition, materials)
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ class MachineManager(QObject):
|
||||||
# Used to store the new containers until after confirming the dialog
|
# Used to store the new containers until after confirming the dialog
|
||||||
self._new_variant_container = None
|
self._new_variant_container = None
|
||||||
self._new_material_container = None
|
self._new_material_container = None
|
||||||
|
self._new_quality_containers = []
|
||||||
|
|
||||||
self._error_check_timer = QTimer()
|
self._error_check_timer = QTimer()
|
||||||
self._error_check_timer.setInterval(250)
|
self._error_check_timer.setInterval(250)
|
||||||
|
@ -70,10 +71,10 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
self._stacks_have_errors = None
|
self._stacks_have_errors = None
|
||||||
|
|
||||||
self._empty_variant_container = ContainerRegistry.getInstance().getEmptyInstanceContainer()
|
self._empty_variant_container = ContainerRegistry.getInstance().findContainers(id = "empty_variant")[0]
|
||||||
self._empty_material_container = ContainerRegistry.getInstance().getEmptyInstanceContainer()
|
self._empty_material_container = ContainerRegistry.getInstance().findContainers(id = "empty_material")[0]
|
||||||
self._empty_quality_container = ContainerRegistry.getInstance().getEmptyInstanceContainer()
|
self._empty_quality_container = ContainerRegistry.getInstance().findContainers(id = "empty_quality")[0]
|
||||||
self._empty_quality_changes_container = ContainerRegistry.getInstance().getEmptyInstanceContainer()
|
self._empty_quality_changes_container = ContainerRegistry.getInstance().findContainers(id = "empty_quality_changes")[0]
|
||||||
|
|
||||||
self._onGlobalContainerChanged()
|
self._onGlobalContainerChanged()
|
||||||
|
|
||||||
|
@ -147,6 +148,14 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
self.outputDevicesChanged.emit()
|
self.outputDevicesChanged.emit()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def newVariant(self):
|
||||||
|
return self._new_variant_container
|
||||||
|
|
||||||
|
@property
|
||||||
|
def newMaterial(self):
|
||||||
|
return self._new_material_container
|
||||||
|
|
||||||
@pyqtProperty("QVariantList", notify = outputDevicesChanged)
|
@pyqtProperty("QVariantList", notify = outputDevicesChanged)
|
||||||
def printerOutputDevices(self):
|
def printerOutputDevices(self):
|
||||||
return self._printer_output_devices
|
return self._printer_output_devices
|
||||||
|
@ -833,8 +842,6 @@ class MachineManager(QObject):
|
||||||
if not containers or not self._global_container_stack:
|
if not containers or not self._global_container_stack:
|
||||||
return
|
return
|
||||||
|
|
||||||
Logger.log("d", "Attempting to change the active quality to %s", quality_id)
|
|
||||||
|
|
||||||
# Quality profile come in two flavours: type=quality and type=quality_changes
|
# Quality profile come in two flavours: type=quality and type=quality_changes
|
||||||
# If we found a quality_changes profile then look up its parent quality profile.
|
# If we found a quality_changes profile then look up its parent quality profile.
|
||||||
container_type = containers[0].getMetaDataEntry("type")
|
container_type = containers[0].getMetaDataEntry("type")
|
||||||
|
@ -854,20 +861,36 @@ class MachineManager(QObject):
|
||||||
if new_quality_settings_list is None:
|
if new_quality_settings_list is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
name_changed_connect_stacks = [] # Connect these stacks to the name changed callback
|
# check if any of the stacks have a not supported profile
|
||||||
|
# if that is the case, all stacks should have a not supported state (otherwise it will show quality_type normal)
|
||||||
|
has_not_supported_quality = False
|
||||||
|
|
||||||
|
# check all stacks for not supported
|
||||||
|
for setting_info in new_quality_settings_list:
|
||||||
|
if setting_info["quality"].getMetaDataEntry("quality_type") == "not_supported":
|
||||||
|
has_not_supported_quality = True
|
||||||
|
break
|
||||||
|
|
||||||
|
# set all stacks to not supported if that's the case
|
||||||
|
if has_not_supported_quality:
|
||||||
|
for setting_info in new_quality_settings_list:
|
||||||
|
setting_info["quality"] = self._empty_quality_container
|
||||||
|
|
||||||
|
self._new_quality_containers.clear()
|
||||||
|
|
||||||
|
# store the upcoming quality profile changes per stack for later execution
|
||||||
|
# this prevents re-slicing before the user has made a choice in the discard or keep dialog
|
||||||
|
# (see _executeDelayedActiveContainerStackChanges)
|
||||||
for setting_info in new_quality_settings_list:
|
for setting_info in new_quality_settings_list:
|
||||||
stack = setting_info["stack"]
|
stack = setting_info["stack"]
|
||||||
stack_quality = setting_info["quality"]
|
stack_quality = setting_info["quality"]
|
||||||
stack_quality_changes = setting_info["quality_changes"]
|
stack_quality_changes = setting_info["quality_changes"]
|
||||||
|
|
||||||
name_changed_connect_stacks.append(stack_quality)
|
self._new_quality_containers.append({
|
||||||
name_changed_connect_stacks.append(stack_quality_changes)
|
"stack": stack,
|
||||||
self._replaceQualityOrQualityChangesInStack(stack, stack_quality, postpone_emit=True)
|
"quality": stack_quality,
|
||||||
self._replaceQualityOrQualityChangesInStack(stack, stack_quality_changes, postpone_emit=True)
|
"quality_changes": stack_quality_changes
|
||||||
|
})
|
||||||
# Connect to onQualityNameChanged
|
|
||||||
for stack in name_changed_connect_stacks:
|
|
||||||
stack.nameChanged.connect(self._onQualityNameChanged)
|
|
||||||
|
|
||||||
has_user_interaction = False
|
has_user_interaction = False
|
||||||
|
|
||||||
|
@ -890,13 +913,24 @@ class MachineManager(QObject):
|
||||||
# before the user decided to keep or discard any of their changes using the dialog.
|
# before the user decided to keep or discard any of their changes using the dialog.
|
||||||
# The Application.onDiscardOrKeepProfileChangesClosed signal triggers this method.
|
# The Application.onDiscardOrKeepProfileChangesClosed signal triggers this method.
|
||||||
def _executeDelayedActiveContainerStackChanges(self):
|
def _executeDelayedActiveContainerStackChanges(self):
|
||||||
|
if self._new_variant_container is not None:
|
||||||
|
self._active_container_stack.variant = self._new_variant_container
|
||||||
|
self._new_variant_container = None
|
||||||
|
|
||||||
if self._new_material_container is not None:
|
if self._new_material_container is not None:
|
||||||
self._active_container_stack.material = self._new_material_container
|
self._active_container_stack.material = self._new_material_container
|
||||||
self._new_material_container = None
|
self._new_material_container = None
|
||||||
|
|
||||||
if self._new_variant_container is not None:
|
# apply the new quality to all stacks
|
||||||
self._active_container_stack.variant = self._new_variant_container
|
if self._new_quality_containers:
|
||||||
self._new_variant_container = None
|
for new_quality in self._new_quality_containers:
|
||||||
|
self._replaceQualityOrQualityChangesInStack(new_quality["stack"], new_quality["quality"], postpone_emit = True)
|
||||||
|
self._replaceQualityOrQualityChangesInStack(new_quality["stack"], new_quality["quality_changes"], postpone_emit = True)
|
||||||
|
|
||||||
|
for new_quality in self._new_quality_containers:
|
||||||
|
new_quality["stack"].nameChanged.connect(self._onQualityNameChanged)
|
||||||
|
|
||||||
|
self._new_quality_containers.clear()
|
||||||
|
|
||||||
## Cancel set changes for material and variant in the active container stack.
|
## Cancel set changes for material and variant in the active container stack.
|
||||||
# Used for ignoring any changes when switching between printers (setActiveMachine)
|
# Used for ignoring any changes when switching between printers (setActiveMachine)
|
||||||
|
@ -926,8 +960,14 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
for stack in stacks:
|
for stack in stacks:
|
||||||
material = stack.material
|
material = stack.material
|
||||||
|
|
||||||
|
# TODO: fix this
|
||||||
|
if self._new_material_container and stack.getId() == self._active_container_stack.getId():
|
||||||
|
material = self._new_material_container
|
||||||
|
|
||||||
quality = quality_manager.findQualityByQualityType(quality_type, global_machine_definition, [material])
|
quality = quality_manager.findQualityByQualityType(quality_type, global_machine_definition, [material])
|
||||||
if not quality: #No quality profile is found for this quality type.
|
if not quality:
|
||||||
|
# No quality profile is found for this quality type.
|
||||||
quality = self._empty_quality_container
|
quality = self._empty_quality_container
|
||||||
result.append({"stack": stack, "quality": quality, "quality_changes": empty_quality_changes})
|
result.append({"stack": stack, "quality": quality, "quality_changes": empty_quality_changes})
|
||||||
|
|
||||||
|
@ -962,8 +1002,12 @@ class MachineManager(QObject):
|
||||||
else:
|
else:
|
||||||
Logger.log("e", "Could not find the global quality changes container with name %s", quality_changes_name)
|
Logger.log("e", "Could not find the global quality changes container with name %s", quality_changes_name)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
material = global_container_stack.material
|
material = global_container_stack.material
|
||||||
|
|
||||||
|
if self._new_material_container and self._active_container_stack.getId() == global_container_stack.getId():
|
||||||
|
material = self._new_material_container
|
||||||
|
|
||||||
# For the global stack, find a quality which matches the quality_type in
|
# For the global stack, find a quality which matches the quality_type in
|
||||||
# the quality changes profile and also satisfies any material constraints.
|
# the quality changes profile and also satisfies any material constraints.
|
||||||
quality_type = global_quality_changes.getMetaDataEntry("quality_type")
|
quality_type = global_quality_changes.getMetaDataEntry("quality_type")
|
||||||
|
@ -990,6 +1034,10 @@ class MachineManager(QObject):
|
||||||
quality_changes = self._empty_quality_changes_container
|
quality_changes = self._empty_quality_changes_container
|
||||||
|
|
||||||
material = stack.material
|
material = stack.material
|
||||||
|
|
||||||
|
if self._new_material_container and self._active_container_stack.getId() == stack.getId():
|
||||||
|
material = self._new_material_container
|
||||||
|
|
||||||
quality = quality_manager.findQualityByQualityType(quality_type, global_machine_definition, [material])
|
quality = quality_manager.findQualityByQualityType(quality_type, global_machine_definition, [material])
|
||||||
if not quality: #No quality profile found for this quality type.
|
if not quality: #No quality profile found for this quality type.
|
||||||
quality = self._empty_quality_container
|
quality = self._empty_quality_container
|
||||||
|
|
|
@ -61,6 +61,7 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
active_extruder = extruder_manager.getActiveExtruderStack()
|
active_extruder = extruder_manager.getActiveExtruderStack()
|
||||||
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
||||||
materials = [global_container_stack.material]
|
materials = [global_container_stack.material]
|
||||||
|
|
||||||
if active_extruder in extruder_stacks:
|
if active_extruder in extruder_stacks:
|
||||||
extruder_stacks.remove(active_extruder)
|
extruder_stacks.remove(active_extruder)
|
||||||
extruder_stacks = [active_extruder] + extruder_stacks
|
extruder_stacks = [active_extruder] + extruder_stacks
|
||||||
|
@ -83,10 +84,17 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
if quality.getMetaDataEntry("quality_type") not in quality_type_set:
|
if quality.getMetaDataEntry("quality_type") not in quality_type_set:
|
||||||
result.append(quality)
|
result.append(quality)
|
||||||
|
|
||||||
|
# if still profiles are found, add a single empty_quality ("Not supported") instance to the drop down list
|
||||||
|
if len(result) == 0:
|
||||||
|
# If not qualities are found we dynamically create a not supported container for this machine + material combination
|
||||||
|
not_supported_container = ContainerRegistry.getInstance().findContainers(id = "empty_quality")[0]
|
||||||
|
result.append(not_supported_container)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
## Re-computes the items in this model, and adds the layer height role.
|
## Re-computes the items in this model, and adds the layer height role.
|
||||||
def _recomputeItems(self):
|
def _recomputeItems(self):
|
||||||
|
|
||||||
# Some globals that we can re-use.
|
# Some globals that we can re-use.
|
||||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
if global_container_stack is None:
|
if global_container_stack is None:
|
||||||
|
@ -94,10 +102,12 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
|
|
||||||
# Detecting if the machine has multiple extrusion
|
# Detecting if the machine has multiple extrusion
|
||||||
multiple_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
|
multiple_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1
|
||||||
|
|
||||||
# Get the list of extruders and place the selected extruder at the front of the list.
|
# Get the list of extruders and place the selected extruder at the front of the list.
|
||||||
extruder_manager = ExtruderManager.getInstance()
|
extruder_manager = ExtruderManager.getInstance()
|
||||||
active_extruder = extruder_manager.getActiveExtruderStack()
|
active_extruder = extruder_manager.getActiveExtruderStack()
|
||||||
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
||||||
|
|
||||||
if multiple_extrusion:
|
if multiple_extrusion:
|
||||||
# Place the active extruder at the front of the list.
|
# Place the active extruder at the front of the list.
|
||||||
# This is a workaround checking if there is an active_extruder or not before moving it to the front of the list.
|
# This is a workaround checking if there is an active_extruder or not before moving it to the front of the list.
|
||||||
|
@ -111,8 +121,7 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
extruder_stacks = new_extruder_stacks + extruder_stacks
|
extruder_stacks = new_extruder_stacks + extruder_stacks
|
||||||
|
|
||||||
# Get a list of usable/available qualities for this machine and material
|
# Get a list of usable/available qualities for this machine and material
|
||||||
qualities = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack,
|
qualities = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack, extruder_stacks)
|
||||||
extruder_stacks)
|
|
||||||
|
|
||||||
container_registry = ContainerRegistry.getInstance()
|
container_registry = ContainerRegistry.getInstance()
|
||||||
machine_manager = Application.getInstance().getMachineManager()
|
machine_manager = Application.getInstance().getMachineManager()
|
||||||
|
@ -156,13 +165,23 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
# Now all the containers are set
|
# Now all the containers are set
|
||||||
for item in containers:
|
for item in containers:
|
||||||
profile = container_registry.findContainers(id = item["id"])
|
profile = container_registry.findContainers(id = item["id"])
|
||||||
|
|
||||||
|
# When for some reason there is no profile container in the registry
|
||||||
if not profile:
|
if not profile:
|
||||||
self._setItemLayerHeight(item, "", unit)
|
self._setItemLayerHeight(item, "", "")
|
||||||
item["available"] = False
|
item["available"] = False
|
||||||
yield item
|
yield item
|
||||||
continue
|
continue
|
||||||
|
|
||||||
profile = profile[0]
|
profile = profile[0]
|
||||||
|
|
||||||
|
# When there is a profile but it's an empty quality should. It's shown in the list (they are "Not Supported" profiles)
|
||||||
|
if profile.getId() == "empty_quality":
|
||||||
|
self._setItemLayerHeight(item, "", "")
|
||||||
|
item["available"] = True
|
||||||
|
yield item
|
||||||
|
continue
|
||||||
|
|
||||||
item["available"] = profile in qualities
|
item["available"] = profile in qualities
|
||||||
|
|
||||||
# Easy case: This profile defines its own layer height.
|
# Easy case: This profile defines its own layer height.
|
||||||
|
@ -179,7 +198,8 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
if quality_result["stack"] is global_container_stack:
|
if quality_result["stack"] is global_container_stack:
|
||||||
quality = quality_result["quality"]
|
quality = quality_result["quality"]
|
||||||
break
|
break
|
||||||
else: #No global container stack in the results:
|
else:
|
||||||
|
# No global container stack in the results:
|
||||||
if quality_results:
|
if quality_results:
|
||||||
quality = quality_results[0]["quality"] # Take any of the extruders.
|
quality = quality_results[0]["quality"] # Take any of the extruders.
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -17,9 +17,9 @@ Menu
|
||||||
|
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: model.name + " - " + model.layer_height
|
text: (model.layer_height != "") ? model.name + " - " + model.layer_height : model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: Cura.MachineManager.activeQualityChangesId == "" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
|
checked: Cura.MachineManager.activeQualityId == model.id
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
|
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
|
||||||
visible: model.available
|
visible: model.available
|
||||||
|
|
|
@ -51,27 +51,34 @@ Item
|
||||||
{
|
{
|
||||||
id: globalProfileSelection
|
id: globalProfileSelection
|
||||||
|
|
||||||
text: {
|
text: generateActiveQualityText()
|
||||||
var result = Cura.MachineManager.activeQualityName;
|
|
||||||
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
|
||||||
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">";
|
|
||||||
result += " - ";
|
|
||||||
result += Cura.MachineManager.activeQualityLayerHeight + "mm";
|
|
||||||
result += "</font>";
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
||||||
|
|
||||||
width: Math.floor(parent.width * 0.55)
|
width: Math.floor(parent.width * 0.55)
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
anchors.left: globalProfileLabel.right
|
anchors.left: globalProfileLabel.right
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
tooltip: Cura.MachineManager.activeQualityName
|
tooltip: Cura.MachineManager.activeQualityName
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true
|
||||||
menu: ProfileMenu { }
|
menu: ProfileMenu { }
|
||||||
|
|
||||||
|
function generateActiveQualityText () {
|
||||||
|
var result = catalog.i18nc("@", "No Profile Available") // default text
|
||||||
|
|
||||||
|
if (Cura.MachineManager.isActiveQualitySupported ) {
|
||||||
|
result = Cura.MachineManager.activeQualityName
|
||||||
|
|
||||||
|
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
|
||||||
|
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">"
|
||||||
|
result += " - "
|
||||||
|
result += Cura.MachineManager.activeQualityLayerHeight + "mm"
|
||||||
|
result += "</font>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
UM.SimpleButton
|
UM.SimpleButton
|
||||||
{
|
{
|
||||||
id: customisedSettings
|
id: customisedSettings
|
||||||
|
|
|
@ -245,35 +245,29 @@ Column
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolButton {
|
ToolButton
|
||||||
|
{
|
||||||
id: materialSelection
|
id: materialSelection
|
||||||
|
|
||||||
text: Cura.MachineManager.activeMaterialName
|
text: Cura.MachineManager.activeMaterialName
|
||||||
tooltip: Cura.MachineManager.activeMaterialName
|
tooltip: Cura.MachineManager.activeMaterialName
|
||||||
visible: Cura.MachineManager.hasMaterials
|
visible: Cura.MachineManager.hasMaterials
|
||||||
property var valueError:
|
|
||||||
{
|
|
||||||
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
|
|
||||||
if(data == "False")
|
|
||||||
{
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
|
|
||||||
|
|
||||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||||
|
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
|
menu: MaterialMenu {
|
||||||
|
extruderIndex: base.currentExtruderIndex
|
||||||
|
}
|
||||||
|
|
||||||
menu: MaterialMenu { extruderIndex: base.currentExtruderIndex }
|
property var valueError: !isMaterialSupported()
|
||||||
|
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
|
||||||
|
|
||||||
|
function isMaterialSupported () {
|
||||||
|
return Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible") == "True"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker2_plus
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
material = generic_pp_ultimaker2_plus_0.25_mm
|
|
||||||
weight = 0
|
|
||||||
quality_type = normal
|
|
||||||
setting_version = 3
|
|
||||||
supported = False
|
|
||||||
|
|
||||||
[values]
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker2_plus
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
weight = 0
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_tpu_ultimaker2_plus_0.8_mm
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
weight = 0
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pva_ultimaker3_AA_0.4
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
weight = 0
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pva_ultimaker3_AA_0.8
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
weight = 0
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_pva_ultimaker3_AA_0.8
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_abs_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_abs_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_cpe_plus_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_cpe_plus_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_cpe_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_cpe_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_nylon_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_nylon_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pc_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pla_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_pla_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pp_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_pp_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_tpu_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_tpu_ultimaker3_BB_0.4
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_abs_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_abs_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_cpe_plus_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_cpe_plus_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_cpe_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_cpe_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_nylon_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_nylon_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pc_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_pc_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pla_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_pla_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_pp_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_pp_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = normal
|
|
||||||
material = generic_tpu_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
|
@ -1,14 +0,0 @@
|
||||||
[general]
|
|
||||||
version = 2
|
|
||||||
name = Not Supported
|
|
||||||
definition = ultimaker3
|
|
||||||
|
|
||||||
[metadata]
|
|
||||||
type = quality
|
|
||||||
quality_type = superdraft
|
|
||||||
material = generic_tpu_ultimaker3_BB_0.8
|
|
||||||
weight = 0
|
|
||||||
supported = False
|
|
||||||
setting_version = 3
|
|
||||||
|
|
||||||
[values]
|
|
Loading…
Add table
Add a link
Reference in a new issue