mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Merge branch 'master' into CURA-6793_performance
This commit is contained in:
commit
b5c6a0a1e3
34 changed files with 120 additions and 105 deletions
|
@ -58,7 +58,6 @@ class MachineErrorChecker(QObject):
|
||||||
|
|
||||||
# Whenever the machine settings get changed, we schedule an error check.
|
# Whenever the machine settings get changed, we schedule an error check.
|
||||||
self._machine_manager.globalContainerChanged.connect(self.startErrorCheck)
|
self._machine_manager.globalContainerChanged.connect(self.startErrorCheck)
|
||||||
self._machine_manager.globalValueChanged.connect(self.startErrorCheck)
|
|
||||||
|
|
||||||
self._onMachineChanged()
|
self._onMachineChanged()
|
||||||
|
|
||||||
|
|
|
@ -85,9 +85,9 @@ class MachineNode(ContainerNode):
|
||||||
continue
|
continue
|
||||||
quality_groups[quality_type] = QualityGroup(name = global_quality_node.getMetaDataEntry("name", "Unnamed profile"), quality_type = quality_type)
|
quality_groups[quality_type] = QualityGroup(name = global_quality_node.getMetaDataEntry("name", "Unnamed profile"), quality_type = quality_type)
|
||||||
quality_groups[quality_type].node_for_global = global_quality_node
|
quality_groups[quality_type].node_for_global = global_quality_node
|
||||||
for extruder, qualities_per_type in enumerate(qualities_per_type_per_extruder):
|
for extruder_position, qualities_per_type in enumerate(qualities_per_type_per_extruder):
|
||||||
if quality_type in qualities_per_type:
|
if quality_type in qualities_per_type:
|
||||||
quality_groups[quality_type].nodes_for_extruders[extruder] = qualities_per_type[quality_type]
|
quality_groups[quality_type].setExtruderNode(extruder_position, qualities_per_type[quality_type])
|
||||||
|
|
||||||
available_quality_types = set(quality_groups.keys())
|
available_quality_types = set(quality_groups.keys())
|
||||||
for extruder_nr, qualities_per_type in enumerate(qualities_per_type_per_extruder):
|
for extruder_nr, qualities_per_type in enumerate(qualities_per_type_per_extruder):
|
||||||
|
@ -134,6 +134,9 @@ class MachineNode(ContainerNode):
|
||||||
groups_by_name[name] = QualityChangesGroup(name, quality_type = quality_changes["quality_type"],
|
groups_by_name[name] = QualityChangesGroup(name, quality_type = quality_changes["quality_type"],
|
||||||
intent_category = quality_changes.get("intent_category", "default"),
|
intent_category = quality_changes.get("intent_category", "default"),
|
||||||
parent = CuraApplication.getInstance())
|
parent = CuraApplication.getInstance())
|
||||||
|
# CURA-6882
|
||||||
|
# Custom qualities are always available, even if they are based on the "not supported" profile.
|
||||||
|
groups_by_name[name].is_available = True
|
||||||
elif groups_by_name[name].intent_category == "default": # Intent category should be stored as "default" if everything is default or as the intent if any of the extruder have an actual intent.
|
elif groups_by_name[name].intent_category == "default": # Intent category should be stored as "default" if everything is default or as the intent if any of the extruder have an actual intent.
|
||||||
groups_by_name[name].intent_category = quality_changes.get("intent_category", "default")
|
groups_by_name[name].intent_category = quality_changes.get("intent_category", "default")
|
||||||
|
|
||||||
|
@ -142,14 +145,6 @@ class MachineNode(ContainerNode):
|
||||||
else: # Global profile.
|
else: # Global profile.
|
||||||
groups_by_name[name].metadata_for_global = quality_changes
|
groups_by_name[name].metadata_for_global = quality_changes
|
||||||
|
|
||||||
quality_groups = self.getQualityGroups(variant_names, material_bases, extruder_enabled)
|
|
||||||
for quality_changes_group in groups_by_name.values():
|
|
||||||
if quality_changes_group.quality_type not in quality_groups:
|
|
||||||
quality_changes_group.is_available = False
|
|
||||||
else:
|
|
||||||
# Quality changes group is available iff the quality group it depends on is available. Irrespective of whether the intent category is available.
|
|
||||||
quality_changes_group.is_available = quality_groups[quality_changes_group.quality_type].is_available
|
|
||||||
|
|
||||||
return list(groups_by_name.values())
|
return list(groups_by_name.values())
|
||||||
|
|
||||||
## Gets the preferred global quality node, going by the preferred quality
|
## Gets the preferred global quality node, going by the preferred quality
|
||||||
|
|
|
@ -13,6 +13,7 @@ from cura.Settings.ContainerManager import ContainerManager
|
||||||
from cura.Machines.ContainerTree import ContainerTree
|
from cura.Machines.ContainerTree import ContainerTree
|
||||||
from cura.Settings.cura_empty_instance_containers import empty_quality_changes_container
|
from cura.Settings.cura_empty_instance_containers import empty_quality_changes_container
|
||||||
from cura.Settings.IntentManager import IntentManager
|
from cura.Settings.IntentManager import IntentManager
|
||||||
|
from cura.Machines.Models.MachineModelUtils import fetchLayerHeight
|
||||||
|
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
catalog = i18nCatalog("cura")
|
catalog = i18nCatalog("cura")
|
||||||
|
@ -295,6 +296,8 @@ class QualityManagementModel(ListModel):
|
||||||
if not quality_group.is_available:
|
if not quality_group.is_available:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
layer_height = fetchLayerHeight(quality_group)
|
||||||
|
|
||||||
item = {"name": quality_group.name,
|
item = {"name": quality_group.name,
|
||||||
"is_read_only": True,
|
"is_read_only": True,
|
||||||
"quality_group": quality_group,
|
"quality_group": quality_group,
|
||||||
|
@ -302,10 +305,11 @@ class QualityManagementModel(ListModel):
|
||||||
"quality_changes_group": None,
|
"quality_changes_group": None,
|
||||||
"intent_category": "default",
|
"intent_category": "default",
|
||||||
"section_name": catalog.i18nc("@label", "Default"),
|
"section_name": catalog.i18nc("@label", "Default"),
|
||||||
|
"layer_height": layer_height, # layer_height is only used for sorting
|
||||||
}
|
}
|
||||||
item_list.append(item)
|
item_list.append(item)
|
||||||
# Sort by quality names
|
# Sort by layer_height for built-in qualities
|
||||||
item_list = sorted(item_list, key = lambda x: x["name"].upper())
|
item_list = sorted(item_list, key = lambda x: x["layer_height"])
|
||||||
|
|
||||||
# Create intent items (non-default)
|
# Create intent items (non-default)
|
||||||
available_intent_list = IntentManager.getInstance().getCurrentAvailableIntents()
|
available_intent_list = IntentManager.getInstance().getCurrentAvailableIntents()
|
||||||
|
|
|
@ -84,7 +84,7 @@ class VariantNode(ContainerNode):
|
||||||
return material_node
|
return material_node
|
||||||
# First fallback: Choose any material with matching diameter.
|
# First fallback: Choose any material with matching diameter.
|
||||||
for material_node in self.materials.values():
|
for material_node in self.materials.values():
|
||||||
if approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")):
|
if material_node.getMetaDataEntry("approximate_diameter") and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")):
|
||||||
return material_node
|
return material_node
|
||||||
fallback = next(iter(self.materials.values())) # Should only happen with empty material node.
|
fallback = next(iter(self.materials.values())) # Should only happen with empty material node.
|
||||||
Logger.log("w", "Could not find preferred material {preferred_material} with diameter {diameter} for variant {variant_id}, falling back to {fallback}.".format(
|
Logger.log("w", "Could not find preferred material {preferred_material} with diameter {diameter} for variant {variant_id}, falling back to {fallback}.".format(
|
||||||
|
|
|
@ -34,3 +34,11 @@ class MaterialOutputModel(QObject):
|
||||||
@pyqtProperty(str, constant = True)
|
@pyqtProperty(str, constant = True)
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
if self is other:
|
||||||
|
return True
|
||||||
|
if type(other) is not MaterialOutputModel:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return self.guid == other.guid and self.type == other.type and self.brand == other.brand and self.color == other.color and self.name == other.name
|
||||||
|
|
|
@ -131,6 +131,14 @@ class GlobalStack(CuraContainerStack):
|
||||||
return "machine_stack"
|
return "machine_stack"
|
||||||
return configuration_type
|
return configuration_type
|
||||||
|
|
||||||
|
def getIntentCategory(self) -> str:
|
||||||
|
intent_category = "default"
|
||||||
|
for extruder in self.extruderList:
|
||||||
|
category = extruder.intent.getMetaDataEntry("intent_category", "default")
|
||||||
|
if category != "default" and category != intent_category:
|
||||||
|
intent_category = category
|
||||||
|
return intent_category
|
||||||
|
|
||||||
def getBuildplateName(self) -> Optional[str]:
|
def getBuildplateName(self) -> Optional[str]:
|
||||||
name = None
|
name = None
|
||||||
if self.variant.getId() != "empty_variant":
|
if self.variant.getId() != "empty_variant":
|
||||||
|
|
|
@ -95,7 +95,6 @@ class MachineManager(QObject):
|
||||||
extruder_manager.activeExtruderChanged.connect(self.activeQualityChanged)
|
extruder_manager.activeExtruderChanged.connect(self.activeQualityChanged)
|
||||||
|
|
||||||
self.globalContainerChanged.connect(self.activeStackChanged)
|
self.globalContainerChanged.connect(self.activeStackChanged)
|
||||||
self.globalValueChanged.connect(self.activeStackValueChanged)
|
|
||||||
ExtruderManager.getInstance().activeExtruderChanged.connect(self.activeStackChanged)
|
ExtruderManager.getInstance().activeExtruderChanged.connect(self.activeStackChanged)
|
||||||
self.activeStackChanged.connect(self.activeStackValueChanged)
|
self.activeStackChanged.connect(self.activeStackValueChanged)
|
||||||
|
|
||||||
|
@ -143,7 +142,6 @@ class MachineManager(QObject):
|
||||||
activeStackChanged = pyqtSignal() # Emitted whenever the active extruder stack is changed (ie: when changing between extruders, changing a profile, but not when changing a value)
|
activeStackChanged = pyqtSignal() # Emitted whenever the active extruder stack is changed (ie: when changing between extruders, changing a profile, but not when changing a value)
|
||||||
extruderChanged = pyqtSignal()
|
extruderChanged = pyqtSignal()
|
||||||
|
|
||||||
globalValueChanged = pyqtSignal() # Emitted whenever a value inside global container is changed.
|
|
||||||
activeStackValueChanged = pyqtSignal() # Emitted whenever a value inside the active stack is changed.
|
activeStackValueChanged = pyqtSignal() # Emitted whenever a value inside the active stack is changed.
|
||||||
activeStackValidationChanged = pyqtSignal() # Emitted whenever a validation inside active container is changed
|
activeStackValidationChanged = pyqtSignal() # Emitted whenever a validation inside active container is changed
|
||||||
stacksValidationChanged = pyqtSignal() # Emitted whenever a validation is changed
|
stacksValidationChanged = pyqtSignal() # Emitted whenever a validation is changed
|
||||||
|
@ -156,7 +154,6 @@ class MachineManager(QObject):
|
||||||
printerConnectedStatusChanged = pyqtSignal() # Emitted every time the active machine change or the outputdevices change
|
printerConnectedStatusChanged = pyqtSignal() # Emitted every time the active machine change or the outputdevices change
|
||||||
|
|
||||||
rootMaterialChanged = pyqtSignal()
|
rootMaterialChanged = pyqtSignal()
|
||||||
discoveredPrintersChanged = pyqtSignal()
|
|
||||||
|
|
||||||
def setInitialActiveMachine(self) -> None:
|
def setInitialActiveMachine(self) -> None:
|
||||||
active_machine_id = self._application.getPreferences().getValue("cura/active_machine")
|
active_machine_id = self._application.getPreferences().getValue("cura/active_machine")
|
||||||
|
@ -182,9 +179,11 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
# Create the configuration model with the current data in Cura
|
# Create the configuration model with the current data in Cura
|
||||||
self._current_printer_configuration.printerType = self._global_container_stack.definition.getName()
|
self._current_printer_configuration.printerType = self._global_container_stack.definition.getName()
|
||||||
self._current_printer_configuration.extruderConfigurations = []
|
|
||||||
for extruder in self._global_container_stack.extruderList:
|
if len(self._current_printer_configuration.extruderConfigurations) != len(self._global_container_stack.extruderList):
|
||||||
extruder_configuration = ExtruderConfigurationModel()
|
self._current_printer_configuration.extruderConfigurations = [ExtruderConfigurationModel() for extruder in self._global_container_stack.extruderList]
|
||||||
|
|
||||||
|
for extruder, extruder_configuration in zip(self._global_container_stack.extruderList, self._current_printer_configuration.extruderConfigurations):
|
||||||
# For compare just the GUID is needed at this moment
|
# For compare just the GUID is needed at this moment
|
||||||
mat_type = extruder.material.getMetaDataEntry("material") if extruder.material != empty_material_container else None
|
mat_type = extruder.material.getMetaDataEntry("material") if extruder.material != empty_material_container else None
|
||||||
mat_guid = extruder.material.getMetaDataEntry("GUID") if extruder.material != empty_material_container else None
|
mat_guid = extruder.material.getMetaDataEntry("GUID") if extruder.material != empty_material_container else None
|
||||||
|
@ -196,7 +195,6 @@ class MachineManager(QObject):
|
||||||
extruder_configuration.position = int(extruder.getMetaDataEntry("position"))
|
extruder_configuration.position = int(extruder.getMetaDataEntry("position"))
|
||||||
extruder_configuration.material = material_model
|
extruder_configuration.material = material_model
|
||||||
extruder_configuration.hotendID = extruder.variant.getName() if extruder.variant != empty_variant_container else None
|
extruder_configuration.hotendID = extruder.variant.getName() if extruder.variant != empty_variant_container else None
|
||||||
self._current_printer_configuration.extruderConfigurations.append(extruder_configuration)
|
|
||||||
|
|
||||||
# An empty build plate configuration from the network printer is presented as an empty string, so use "" for an
|
# An empty build plate configuration from the network printer is presented as an empty string, so use "" for an
|
||||||
# empty build plate.
|
# empty build plate.
|
||||||
|
@ -623,7 +621,10 @@ class MachineManager(QObject):
|
||||||
global_container_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
global_container_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||||
if not global_container_stack:
|
if not global_container_stack:
|
||||||
return False
|
return False
|
||||||
return Util.parseBool(global_container_stack.quality.getMetaDataEntry("is_experimental", False))
|
active_quality_group = self.activeQualityGroup()
|
||||||
|
if active_quality_group is None:
|
||||||
|
return False
|
||||||
|
return active_quality_group.is_experimental
|
||||||
|
|
||||||
@pyqtProperty(str, notify = activeIntentChanged)
|
@pyqtProperty(str, notify = activeIntentChanged)
|
||||||
def activeIntentCategory(self) -> str:
|
def activeIntentCategory(self) -> str:
|
||||||
|
@ -631,13 +632,7 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
if not global_container_stack:
|
if not global_container_stack:
|
||||||
return ""
|
return ""
|
||||||
intent_category = "default"
|
return global_container_stack.getIntentCategory()
|
||||||
for extruder in global_container_stack.extruderList:
|
|
||||||
category = extruder.intent.getMetaDataEntry("intent_category", "default")
|
|
||||||
if category != "default" and category != intent_category:
|
|
||||||
intent_category = category
|
|
||||||
|
|
||||||
return intent_category
|
|
||||||
|
|
||||||
# Provies a list of extruder positions that have a different intent from the active one.
|
# Provies a list of extruder positions that have a different intent from the active one.
|
||||||
@pyqtProperty("QStringList", notify=activeIntentChanged)
|
@pyqtProperty("QStringList", notify=activeIntentChanged)
|
||||||
|
@ -1115,21 +1110,6 @@ class MachineManager(QObject):
|
||||||
def currentRootMaterialId(self) -> Dict[str, str]:
|
def currentRootMaterialId(self) -> Dict[str, str]:
|
||||||
return self._current_root_material_id
|
return self._current_root_material_id
|
||||||
|
|
||||||
## Return the variant names in the extruder stack(s).
|
|
||||||
## For the variant in the global stack, use activeVariantBuildplateName
|
|
||||||
@pyqtProperty("QVariant", notify = activeVariantChanged)
|
|
||||||
def activeVariantNames(self) -> Dict[str, str]:
|
|
||||||
result = {}
|
|
||||||
|
|
||||||
active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
|
||||||
for stack in active_stacks:
|
|
||||||
variant_container = stack.variant
|
|
||||||
position = stack.getMetaDataEntry("position")
|
|
||||||
if variant_container and variant_container != empty_variant_container:
|
|
||||||
result[position] = variant_container.getName()
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
# Sets all quality and quality_changes containers to empty_quality and empty_quality_changes containers
|
# Sets all quality and quality_changes containers to empty_quality and empty_quality_changes containers
|
||||||
# for all stacks in the currently active machine.
|
# for all stacks in the currently active machine.
|
||||||
#
|
#
|
||||||
|
@ -1456,6 +1436,8 @@ class MachineManager(QObject):
|
||||||
else:
|
else:
|
||||||
machine_node = ContainerTree.getInstance().machines.get(self._global_container_stack.definition.getId())
|
machine_node = ContainerTree.getInstance().machines.get(self._global_container_stack.definition.getId())
|
||||||
variant_node = machine_node.variants.get(extruder_configuration.hotendID)
|
variant_node = machine_node.variants.get(extruder_configuration.hotendID)
|
||||||
|
if variant_node is None:
|
||||||
|
continue
|
||||||
self._setVariantNode(position, variant_node)
|
self._setVariantNode(position, variant_node)
|
||||||
|
|
||||||
# Find the material profile that the printer has stored.
|
# Find the material profile that the printer has stored.
|
||||||
|
@ -1536,7 +1518,8 @@ class MachineManager(QObject):
|
||||||
if self._global_container_stack is None:
|
if self._global_container_stack is None:
|
||||||
return
|
return
|
||||||
machine_definition_id = self._global_container_stack.definition.id
|
machine_definition_id = self._global_container_stack.definition.id
|
||||||
variant_node = self._variant_manager.getVariantNode(machine_definition_id, variant_name)
|
machine_node = ContainerTree.getInstance().machines.get(machine_definition_id)
|
||||||
|
variant_node = machine_node.variants.get(variant_name)
|
||||||
self.setVariant(position, variant_node)
|
self.setVariant(position, variant_node)
|
||||||
|
|
||||||
@pyqtSlot(str, "QVariant")
|
@pyqtSlot(str, "QVariant")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2019 fieldOfView
|
# Copyright (c) 2019 fieldOfView, Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
# This AMF parser is based on the AMF parser in legacy cura:
|
# This AMF parser is based on the AMF parser in legacy cura:
|
||||||
|
@ -39,9 +39,9 @@ class AMFReader(MeshReader):
|
||||||
|
|
||||||
MimeTypeDatabase.addMimeType(
|
MimeTypeDatabase.addMimeType(
|
||||||
MimeType(
|
MimeType(
|
||||||
name="application/x-amf",
|
name = "application/x-amf",
|
||||||
comment="AMF",
|
comment = "AMF",
|
||||||
suffixes=["amf"]
|
suffixes = ["amf"]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class AMFReader(MeshReader):
|
||||||
if t.tag == "x":
|
if t.tag == "x":
|
||||||
v[0] = float(t.text) * scale
|
v[0] = float(t.text) * scale
|
||||||
elif t.tag == "y":
|
elif t.tag == "y":
|
||||||
v[2] = float(t.text) * scale
|
v[2] = -float(t.text) * scale
|
||||||
elif t.tag == "z":
|
elif t.tag == "z":
|
||||||
v[1] = float(t.text) * scale
|
v[1] = float(t.text) * scale
|
||||||
amf_mesh_vertices.append(v)
|
amf_mesh_vertices.append(v)
|
||||||
|
@ -114,7 +114,7 @@ class AMFReader(MeshReader):
|
||||||
f[2] = int(t.text)
|
f[2] = int(t.text)
|
||||||
indices.append(f)
|
indices.append(f)
|
||||||
|
|
||||||
mesh = trimesh.base.Trimesh(vertices=numpy.array(amf_mesh_vertices, dtype=numpy.float32), faces=numpy.array(indices, dtype=numpy.int32))
|
mesh = trimesh.base.Trimesh(vertices = numpy.array(amf_mesh_vertices, dtype = numpy.float32), faces = numpy.array(indices, dtype = numpy.int32))
|
||||||
mesh.merge_vertices()
|
mesh.merge_vertices()
|
||||||
mesh.remove_unreferenced_vertices()
|
mesh.remove_unreferenced_vertices()
|
||||||
mesh.fix_normals()
|
mesh.fix_normals()
|
||||||
|
@ -123,7 +123,7 @@ class AMFReader(MeshReader):
|
||||||
new_node = CuraSceneNode()
|
new_node = CuraSceneNode()
|
||||||
new_node.setSelectable(True)
|
new_node.setSelectable(True)
|
||||||
new_node.setMeshData(mesh_data)
|
new_node.setMeshData(mesh_data)
|
||||||
new_node.setName(base_name if len(nodes)==0 else "%s %d" % (base_name, len(nodes)))
|
new_node.setName(base_name if len(nodes) == 0 else "%s %d" % (base_name, len(nodes)))
|
||||||
new_node.addDecorator(BuildPlateDecorator(CuraApplication.getInstance().getMultiBuildPlateModel().activeBuildPlate))
|
new_node.addDecorator(BuildPlateDecorator(CuraApplication.getInstance().getMultiBuildPlateModel().activeBuildPlate))
|
||||||
new_node.addDecorator(SliceableObjectDecorator())
|
new_node.addDecorator(SliceableObjectDecorator())
|
||||||
|
|
||||||
|
@ -165,9 +165,9 @@ class AMFReader(MeshReader):
|
||||||
indices.append(face)
|
indices.append(face)
|
||||||
face_count += 1
|
face_count += 1
|
||||||
|
|
||||||
vertices = numpy.asarray(vertices, dtype=numpy.float32)
|
vertices = numpy.asarray(vertices, dtype = numpy.float32)
|
||||||
indices = numpy.asarray(indices, dtype=numpy.int32)
|
indices = numpy.asarray(indices, dtype = numpy.int32)
|
||||||
normals = calculateNormalsFromIndexedVertices(vertices, indices, face_count)
|
normals = calculateNormalsFromIndexedVertices(vertices, indices, face_count)
|
||||||
|
|
||||||
mesh_data = MeshData(vertices=vertices, indices=indices, normals=normals)
|
mesh_data = MeshData(vertices = vertices, indices = indices, normals = normals)
|
||||||
return mesh_data
|
return mesh_data
|
||||||
|
|
|
@ -174,6 +174,7 @@ class SliceInfo(QObject, Extension):
|
||||||
extruder_dict["extruder_settings"] = extruder_settings
|
extruder_dict["extruder_settings"] = extruder_settings
|
||||||
data["extruders"].append(extruder_dict)
|
data["extruders"].append(extruder_dict)
|
||||||
|
|
||||||
|
data["intent_category"] = global_stack.getIntentCategory()
|
||||||
data["quality_profile"] = global_stack.quality.getMetaData().get("quality_type")
|
data["quality_profile"] = global_stack.quality.getMetaData().get("quality_type")
|
||||||
|
|
||||||
data["user_modified_setting_keys"] = self._getUserModifiedSettingKeys()
|
data["user_modified_setting_keys"] = self._getUserModifiedSettingKeys()
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<b>Operating System:</b> Windows 10<br/>
|
<b>Operating System:</b> Windows 10<br/>
|
||||||
<b>Language:</b> en_US<br/>
|
<b>Language:</b> en_US<br/>
|
||||||
<b>Machine Type:</b> Ultimaker S5<br/>
|
<b>Machine Type:</b> Ultimaker S5<br/>
|
||||||
|
<b>Intent Profile:</b> Default<br/>
|
||||||
<b>Quality Profile:</b> Fast<br/>
|
<b>Quality Profile:</b> Fast<br/>
|
||||||
<b>Using Custom Settings:</b> No
|
<b>Using Custom Settings:</b> No
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
container.metaDataChanged.emit(container)
|
container.metaDataChanged.emit(container)
|
||||||
for k, v in new_setting_values_dict.items():
|
for k, v in new_setting_values_dict.items():
|
||||||
self.setProperty(k, "value", v)
|
self.setProperty(k, "value", v)
|
||||||
return
|
|
||||||
|
|
||||||
## Overridden from InstanceContainer, similar to setMetaDataEntry.
|
## Overridden from InstanceContainer, similar to setMetaDataEntry.
|
||||||
# without this function the setName would only set the name of the specific nozzle / material / machine combination container
|
# without this function the setName would only set the name of the specific nozzle / material / machine combination container
|
||||||
|
|
|
@ -209,10 +209,10 @@
|
||||||
"enabled": false
|
"enabled": false
|
||||||
},
|
},
|
||||||
"prime_tower_position_x": {
|
"prime_tower_position_x": {
|
||||||
"default_value": 185
|
"value": "185"
|
||||||
},
|
},
|
||||||
"prime_tower_position_y": {
|
"prime_tower_position_y": {
|
||||||
"default_value": 160
|
"value": "160"
|
||||||
},
|
},
|
||||||
"machine_disallowed_areas": {
|
"machine_disallowed_areas": {
|
||||||
"default_value": [
|
"default_value": [
|
||||||
|
|
|
@ -85,10 +85,10 @@
|
||||||
"default_value": 2
|
"default_value": 2
|
||||||
},
|
},
|
||||||
"prime_tower_position_x": {
|
"prime_tower_position_x": {
|
||||||
"default_value": 50
|
"value": "50"
|
||||||
},
|
},
|
||||||
"prime_tower_position_y": {
|
"prime_tower_position_y": {
|
||||||
"default_value": 50
|
"value": "50"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,8 @@
|
||||||
"speed_wall_0": { "value": "math.ceil(speed_wall * 20 / 25)" },
|
"speed_wall_0": { "value": "math.ceil(speed_wall * 20 / 25)" },
|
||||||
"speed_wall_x": { "value": "speed_wall" },
|
"speed_wall_x": { "value": "speed_wall" },
|
||||||
|
|
||||||
"prime_tower_position_x": { "default_value": 175 },
|
"prime_tower_position_x": { "value": "175" },
|
||||||
"prime_tower_position_y": { "default_value": 178 },
|
"prime_tower_position_y": { "value": "178" },
|
||||||
"prime_tower_wipe_enabled": { "default_value": false },
|
"prime_tower_wipe_enabled": { "default_value": false },
|
||||||
"prime_tower_min_volume": { "default_value": 50 },
|
"prime_tower_min_volume": { "default_value": 50 },
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@
|
||||||
"speed_wall_0": { "value": "math.ceil(speed_wall * 20 / 25)" },
|
"speed_wall_0": { "value": "math.ceil(speed_wall * 20 / 25)" },
|
||||||
"speed_wall_x": { "value": "speed_wall" },
|
"speed_wall_x": { "value": "speed_wall" },
|
||||||
|
|
||||||
"prime_tower_position_x": { "default_value": 175 },
|
"prime_tower_position_x": { "value": "175" },
|
||||||
"prime_tower_position_y": { "default_value": 178 },
|
"prime_tower_position_y": { "value": "178" },
|
||||||
"prime_tower_wipe_enabled": { "default_value": false },
|
"prime_tower_wipe_enabled": { "default_value": false },
|
||||||
"prime_tower_min_volume": { "default_value": 50 },
|
"prime_tower_min_volume": { "default_value": 50 },
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
"speed_wall_0": { "value": "math.ceil(speed_wall * 20 / 25)" },
|
"speed_wall_0": { "value": "math.ceil(speed_wall * 20 / 25)" },
|
||||||
"speed_wall_x": { "value": "speed_wall" },
|
"speed_wall_x": { "value": "speed_wall" },
|
||||||
|
|
||||||
"prime_tower_position_x": { "default_value": 175 },
|
"prime_tower_position_x": { "value": "175" },
|
||||||
"prime_tower_position_y": { "default_value": 178 },
|
"prime_tower_position_y": { "value": "178" },
|
||||||
"prime_tower_wipe_enabled": { "default_value": false },
|
"prime_tower_wipe_enabled": { "default_value": false },
|
||||||
"prime_tower_min_volume": { "default_value": 50 },
|
"prime_tower_min_volume": { "default_value": 50 },
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@
|
||||||
"prime_tower_enable": { "default_value": false },
|
"prime_tower_enable": { "default_value": false },
|
||||||
"prime_tower_min_volume": { "value": "0.7" },
|
"prime_tower_min_volume": { "value": "0.7" },
|
||||||
"prime_tower_size": { "value": 24.0 },
|
"prime_tower_size": { "value": 24.0 },
|
||||||
"prime_tower_position_x": { "value": 125 },
|
"prime_tower_position_x": { "value": "125" },
|
||||||
"prime_tower_position_y": { "value": 70 },
|
"prime_tower_position_y": { "value": "70" },
|
||||||
"prime_blob_enable": { "default_value": false },
|
"prime_blob_enable": { "default_value": false },
|
||||||
"machine_max_feedrate_z": { "default_value": 20 },
|
"machine_max_feedrate_z": { "default_value": 20 },
|
||||||
"machine_disallowed_areas": { "default_value": [
|
"machine_disallowed_areas": { "default_value": [
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"machine_name": { "default_value": "Creawsome Base Printer" },
|
"machine_name": { "default_value": "Creawsome Base Printer" },
|
||||||
"machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n" },
|
"machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n" },
|
||||||
"machine_end_gcode": { "default_value": "G91 ;Relative positionning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\n\nG1 X0 Y{machine_depth} ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
|
"machine_end_gcode": { "default_value": "G91 ;Relative positioning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\n\nG1 X0 Y{machine_depth} ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
|
||||||
|
|
||||||
"machine_max_feedrate_x": { "value": 500 },
|
"machine_max_feedrate_x": { "value": 500 },
|
||||||
"machine_max_feedrate_y": { "value": 500 },
|
"machine_max_feedrate_y": { "value": 500 },
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"inherits": "creality_base",
|
"inherits": "creality_base",
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"machine_name": { "default_value": "Creality Ender-5" },
|
"machine_name": { "default_value": "Creality Ender-5" },
|
||||||
"machine_end_gcode": { "default_value": "G91 ;Relative positionning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\n\nG1 X0 Y0 ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
|
"machine_end_gcode": { "default_value": "G91 ;Relative positioning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\n\nG1 X0 Y0 ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
|
||||||
"machine_width": { "default_value": 220 },
|
"machine_width": { "default_value": 220 },
|
||||||
"machine_depth": { "default_value": 220 },
|
"machine_depth": { "default_value": 220 },
|
||||||
"machine_height": { "default_value": 300 },
|
"machine_height": { "default_value": 300 },
|
||||||
|
|
|
@ -76,10 +76,10 @@
|
||||||
"default_value": 2
|
"default_value": 2
|
||||||
},
|
},
|
||||||
"prime_tower_position_x": {
|
"prime_tower_position_x": {
|
||||||
"default_value": 195
|
"value": "195"
|
||||||
},
|
},
|
||||||
"prime_tower_position_y": {
|
"prime_tower_position_y": {
|
||||||
"default_value": 149
|
"value": "149"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,10 +76,10 @@
|
||||||
"default_value": 2
|
"default_value": 2
|
||||||
},
|
},
|
||||||
"prime_tower_position_x": {
|
"prime_tower_position_x": {
|
||||||
"default_value": 195
|
"value": "195"
|
||||||
},
|
},
|
||||||
"prime_tower_position_y": {
|
"prime_tower_position_y": {
|
||||||
"default_value": 149
|
"value": "149"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,10 +72,10 @@
|
||||||
"default_value": "M107\nM1002\nM104 S0 T1\nM104 S0 T0\nM140 S0\nM117 Print Complete.\nG28 X0 Y0\nG91\nG1 Z10\nG90\nM84"
|
"default_value": "M107\nM1002\nM104 S0 T1\nM104 S0 T0\nM140 S0\nM117 Print Complete.\nG28 X0 Y0\nG91\nG1 Z10\nG90\nM84"
|
||||||
},
|
},
|
||||||
"prime_tower_position_x": {
|
"prime_tower_position_x": {
|
||||||
"default_value": 195
|
"value": "195"
|
||||||
},
|
},
|
||||||
"prime_tower_position_y": {
|
"prime_tower_position_y": {
|
||||||
"default_value": 149
|
"value": "149"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,10 +72,10 @@
|
||||||
"default_value": "M107\nM1002\nM104 S0 T1\nM104 S0 T0\nM140 S0\nM117 Print Complete.\nG28 X0 Y0\nG91\nG1 Z10\nG90\nM84"
|
"default_value": "M107\nM1002\nM104 S0 T1\nM104 S0 T0\nM140 S0\nM117 Print Complete.\nG28 X0 Y0\nG91\nG1 Z10\nG90\nM84"
|
||||||
},
|
},
|
||||||
"prime_tower_position_x": {
|
"prime_tower_position_x": {
|
||||||
"default_value": 195
|
"value": "195"
|
||||||
},
|
},
|
||||||
"prime_tower_position_y": {
|
"prime_tower_position_y": {
|
||||||
"default_value": 149
|
"value": "149"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,8 @@
|
||||||
"extruder_prime_pos_abs": { "default_value": true },
|
"extruder_prime_pos_abs": { "default_value": true },
|
||||||
"machine_start_gcode": { "default_value": "" },
|
"machine_start_gcode": { "default_value": "" },
|
||||||
"machine_end_gcode": { "default_value": "" },
|
"machine_end_gcode": { "default_value": "" },
|
||||||
"prime_tower_position_x": { "default_value": 345 },
|
"prime_tower_position_x": { "value": "345" },
|
||||||
"prime_tower_position_y": { "default_value": 222.5 },
|
"prime_tower_position_y": { "value": "222.5" },
|
||||||
"prime_blob_enable": { "enabled": true, "default_value": false },
|
"prime_blob_enable": { "enabled": true, "default_value": false },
|
||||||
|
|
||||||
"speed_travel":
|
"speed_travel":
|
||||||
|
|
|
@ -70,8 +70,8 @@
|
||||||
"extruder_prime_pos_abs": { "default_value": true },
|
"extruder_prime_pos_abs": { "default_value": true },
|
||||||
"machine_start_gcode": { "default_value": "" },
|
"machine_start_gcode": { "default_value": "" },
|
||||||
"machine_end_gcode": { "default_value": "" },
|
"machine_end_gcode": { "default_value": "" },
|
||||||
"prime_tower_position_x": { "default_value": 345 },
|
"prime_tower_position_x": { "value": "345" },
|
||||||
"prime_tower_position_y": { "default_value": 222.5 },
|
"prime_tower_position_y": { "value": "222.5" },
|
||||||
"prime_blob_enable": { "enabled": true, "default_value": false },
|
"prime_blob_enable": { "enabled": true, "default_value": false },
|
||||||
|
|
||||||
"speed_travel":
|
"speed_travel":
|
||||||
|
|
|
@ -148,8 +148,18 @@ UM.Dialog
|
||||||
{
|
{
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
property string variantName: Cura.MachineManager.activeVariantNames[modelData] !== undefined ? Cura.MachineManager.activeVariantNames[modelData]: ""
|
property string variantName:
|
||||||
property string materialName: Cura.MachineManager.getExtruder(modelData).material.name !== undefined ? Cura.MachineManager.getExtruder(modelData).material.name : ""
|
{
|
||||||
|
var extruder = Cura.MachineManager.activeMachine.extruderList[modelData]
|
||||||
|
var variant_name = extruder.variant.name
|
||||||
|
return (variant_name !== undefined) ? variant_name : ""
|
||||||
|
}
|
||||||
|
property string materialName:
|
||||||
|
{
|
||||||
|
var extruder = Cura.MachineManager.activeMachine.extruderList[modelData]
|
||||||
|
var material_name = extruder.material.name
|
||||||
|
return (material_name !== undefined) ? material_name : ""
|
||||||
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: {
|
text: {
|
||||||
|
|
|
@ -221,6 +221,7 @@ Item
|
||||||
|
|
||||||
OldControls.CheckBox
|
OldControls.CheckBox
|
||||||
{
|
{
|
||||||
|
id: enabledCheckbox
|
||||||
checked: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.isEnabled : false
|
checked: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.isEnabled : false
|
||||||
enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder.
|
enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder.
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
@ -265,6 +266,7 @@ Item
|
||||||
|
|
||||||
text: Cura.MachineManager.activeStack !== null ? Cura.MachineManager.activeStack.material.name : ""
|
text: Cura.MachineManager.activeStack !== null ? Cura.MachineManager.activeStack.material.name : ""
|
||||||
tooltip: text
|
tooltip: text
|
||||||
|
enabled: enabledCheckbox.checked
|
||||||
|
|
||||||
width: selectors.controlWidth
|
width: selectors.controlWidth
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
@ -324,7 +326,8 @@ Item
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: selectors.controlWidth
|
width: selectors.controlWidth
|
||||||
style: UM.Theme.styles.print_setup_header_button
|
style: UM.Theme.styles.print_setup_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true
|
||||||
|
enabled: enabledCheckbox.checked
|
||||||
|
|
||||||
menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex }
|
menu: Cura.NozzleMenu { extruderIndex: Cura.ExtruderManager.activeExtruderIndex }
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ Menu
|
||||||
{
|
{
|
||||||
text: model.brand + " " + model.name
|
text: model.brand + " " + model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled
|
||||||
checked: model.root_material_id === menu.currentRootMaterialId
|
checked: model.root_material_id === menu.currentRootMaterialId
|
||||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||||
exclusiveGroup: favoriteGroup // One favorite and one item from the others can be active at the same time.
|
exclusiveGroup: favoriteGroup // One favorite and one item from the others can be active at the same time.
|
||||||
|
@ -72,6 +73,7 @@ Menu
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled
|
||||||
checked: model.root_material_id === menu.currentRootMaterialId
|
checked: model.root_material_id === menu.currentRootMaterialId
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||||
|
@ -110,6 +112,7 @@ Menu
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
|
enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled
|
||||||
checked: model.id === menu.activeMaterialId
|
checked: model.id === menu.activeMaterialId
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) 2017 Ultimaker B.V.
|
// Copyright (c) 2017 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
|
@ -28,10 +28,11 @@ Menu
|
||||||
text: model.hotend_name
|
text: model.hotend_name
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: {
|
checked: {
|
||||||
return Cura.MachineManager.activeVariantNames[extruderIndex] == model.hotend_name
|
var extruder = Cura.MachineManager.activeMachine.extruderList[extruderIndex]
|
||||||
|
return extruder.variant.name == model.hotend_name
|
||||||
}
|
}
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
|
enabled: Cura.MachineManager.activeMachine.extruderList[extruderIndex].isEnabled
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node);
|
Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,11 +59,14 @@ Item
|
||||||
onCurrentItemChanged:
|
onCurrentItemChanged:
|
||||||
{
|
{
|
||||||
forceActiveFocus()
|
forceActiveFocus()
|
||||||
materialDetailsPanel.currentItem = currentItem
|
if(materialDetailsPanel.currentItem != currentItem)
|
||||||
// CURA-6679 If the current item is gone after the model update, reset the current item to the active material.
|
|
||||||
if (currentItem == null)
|
|
||||||
{
|
{
|
||||||
resetExpandedActiveMaterial()
|
materialDetailsPanel.currentItem = currentItem
|
||||||
|
// CURA-6679 If the current item is gone after the model update, reset the current item to the active material.
|
||||||
|
if (currentItem == null)
|
||||||
|
{
|
||||||
|
resetExpandedActiveMaterial()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ TabView
|
||||||
property QtObject properties
|
property QtObject properties
|
||||||
property var currentMaterialNode: null
|
property var currentMaterialNode: null
|
||||||
|
|
||||||
property bool editingEnabled: false;
|
property bool editingEnabled: false
|
||||||
property string currency: UM.Preferences.getValue("cura/currency") ? UM.Preferences.getValue("cura/currency") : "€"
|
property string currency: UM.Preferences.getValue("cura/currency") ? UM.Preferences.getValue("cura/currency") : "€"
|
||||||
property real firstColumnWidth: (width * 0.50) | 0
|
property real firstColumnWidth: (width * 0.50) | 0
|
||||||
property real secondColumnWidth: (width * 0.40) | 0
|
property real secondColumnWidth: (width * 0.40) | 0
|
||||||
|
|
|
@ -531,8 +531,12 @@ Item
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
text: base.currentItemDisplayName
|
text: base.currentItemDisplayName
|
||||||
font: UM.Theme.getFont("large_bold")
|
font: UM.Theme.getFont("large_bold")
|
||||||
|
elide: Text.ElideRight
|
||||||
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,11 @@ Item
|
||||||
resultSuffix += " (Experimental)"
|
resultSuffix += " (Experimental)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Cura.MachineManager.isActiveQualityCustom)
|
||||||
|
{
|
||||||
|
result = resultMain
|
||||||
|
}
|
||||||
|
|
||||||
if (Cura.MachineManager.isActiveQualitySupported)
|
if (Cura.MachineManager.isActiveQualitySupported)
|
||||||
{
|
{
|
||||||
if (Cura.MachineManager.activeQualityLayerHeight > 0)
|
if (Cura.MachineManager.activeQualityLayerHeight > 0)
|
||||||
|
|
|
@ -99,18 +99,6 @@ def test_allActiveMaterialIds(machine_manager, extruder_manager):
|
||||||
assert machine_manager.allActiveMaterialIds == {"extruder_1": "material_1", "extruder_2": "material_2"}
|
assert machine_manager.allActiveMaterialIds == {"extruder_1": "material_1", "extruder_2": "material_2"}
|
||||||
|
|
||||||
|
|
||||||
def test_activeVariantNames(machine_manager, extruder_manager):
|
|
||||||
extruder_1 = createMockedExtruder("extruder_1")
|
|
||||||
extruder_2 = createMockedExtruder("extruder_2")
|
|
||||||
extruder_1.getMetaDataEntry = MagicMock(return_value = "0")
|
|
||||||
extruder_2.getMetaDataEntry = MagicMock(return_value= "2")
|
|
||||||
extruder_1.variant = createMockedInstanceContainer("variant_1", "variant_name_1")
|
|
||||||
extruder_2.variant = createMockedInstanceContainer("variant_2", "variant_name_2")
|
|
||||||
extruder_manager.getActiveExtruderStacks = MagicMock(return_value=[extruder_1, extruder_2])
|
|
||||||
|
|
||||||
assert machine_manager.activeVariantNames == {"0": "variant_name_1", "2": "variant_name_2"}
|
|
||||||
|
|
||||||
|
|
||||||
def test_globalVariantName(machine_manager, application):
|
def test_globalVariantName(machine_manager, application):
|
||||||
global_stack = application.getGlobalContainerStack()
|
global_stack = application.getGlobalContainerStack()
|
||||||
global_stack.variant = createMockedInstanceContainer("beep", "zomg")
|
global_stack.variant = createMockedInstanceContainer("beep", "zomg")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue