mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add support for global quality profiles
Instead of using one of the extruder profiles as global quality, use proper global qualities. Contributes to CURA-2646
This commit is contained in:
parent
2bff94ba9f
commit
e82b2c0f80
2 changed files with 11 additions and 5 deletions
|
@ -82,8 +82,9 @@ class QualityManager:
|
|||
# \param material_containers (Optional) \type{List[ContainerInstance]} If nothing is specified then
|
||||
# the current set of selected materials is used.
|
||||
# \return the matching quality container \type{ContainerInstance}
|
||||
def findQualityByQualityType(self, quality_type, machine_definition=None, material_containers=None):
|
||||
criteria = {"type": "quality"}
|
||||
def findQualityByQualityType(self, quality_type, machine_definition=None, material_containers=None, **kwargs):
|
||||
criteria = kwargs
|
||||
criteria["type"] = "quality"
|
||||
if quality_type:
|
||||
criteria["quality_type"] = quality_type
|
||||
result = self._getFilteredContainersForStack(machine_definition, material_containers, **criteria)
|
||||
|
@ -218,7 +219,7 @@ class QualityManager:
|
|||
result = []
|
||||
for container in containers:
|
||||
# If the machine specifies we should filter by material, exclude containers that do not match any active material.
|
||||
if filter_by_material and container.getMetaDataEntry("material") not in material_ids:
|
||||
if filter_by_material and container.getMetaDataEntry("material") not in material_ids and not "global_quality" in kwargs:
|
||||
continue
|
||||
result.append(container)
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue