Some more documentation

This commit is contained in:
Arjen Hiemstra 2017-04-19 14:41:32 +02:00
parent 7a907aa713
commit ab1044de7b
2 changed files with 12 additions and 2 deletions

View file

@ -426,8 +426,6 @@ class CuraContainerStack(ContainerStack):
# - Otherwise, if the machine definition has a metadata entry "preferred_material", try to find a material that matches the specified ID.
#
# \return The container that should be used as default, or None if nothing was found or the machine does not use materials.
#
#
def findDefaultMaterial(self) -> Optional[ContainerInterface]:
definition = self._getMachineDefinition()
if not definition.getMetaDataEntry("has_materials"):
@ -467,6 +465,12 @@ class CuraContainerStack(ContainerStack):
Logger.log("w", "Could not find a valid material for stack {stack}", stack = self.id)
return None
## Find the quality that should be used as "default" quality.
#
# This will search for qualities that match the current definition and pick the preferred one,
# if specified by the machine definition.
#
# \return The container that should be used as default, or None if nothing was found.
def findDefaultQuality(self) -> Optional[ContainerInterface]:
definition = self._getMachineDefinition()
registry = ContainerRegistry.getInstance()