mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 13:21:10 -07:00
Set definition by their ID
The new function for setting the definition just adds the ID to the metadata. Contributes to issue CURA-4243.
This commit is contained in:
parent
37935a8a90
commit
ebe766a7c8
9 changed files with 24 additions and 22 deletions
|
|
@ -284,7 +284,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
|
||||
quality_type_criteria = {"quality_type": quality_type}
|
||||
if self._machineHasOwnQualities():
|
||||
profile.setDefinition(self._activeQualityDefinition())
|
||||
profile.setDefinition(self._activeQualityDefinition().getId())
|
||||
if self._machineHasOwnMaterials():
|
||||
active_material_id = self._activeMaterialId()
|
||||
if active_material_id and active_material_id != "empty": # only update if there is an active material
|
||||
|
|
@ -294,7 +294,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
quality_type_criteria["definition"] = profile.getDefinition().getId()
|
||||
|
||||
else:
|
||||
profile.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0])
|
||||
profile.setDefinition(fdmprinter)
|
||||
quality_type_criteria["definition"] = "fdmprinter"
|
||||
|
||||
machine_definition = Application.getInstance().getGlobalContainerStack().getBottom()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue