mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Fix quality lookup logic for extruders
CURA-5694 - Add convenience functions into GlobalStack - Use "has_variants" and "has_materials" instead of "has_variant_materials" - Remove "has_variant_materials" - For extruder qualities, skip global qualities if the machine has variants or materials
This commit is contained in:
parent
d3356cdba6
commit
9aea0e5109
6 changed files with 13 additions and 7 deletions
|
@ -13,6 +13,8 @@ from UM.Settings.SettingInstance import InstanceState
|
|||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
from UM.Settings.Interfaces import PropertyEvaluationContext
|
||||
from UM.Logger import Logger
|
||||
from UM.Util import parseBool
|
||||
|
||||
import cura.CuraApplication
|
||||
|
||||
from . import Exceptions
|
||||
|
@ -188,6 +190,12 @@ class GlobalStack(CuraContainerStack):
|
|||
def getHeadAndFansCoordinates(self):
|
||||
return self.getProperty("machine_head_with_fans_polygon", "value")
|
||||
|
||||
def getHasMaterials(self) -> bool:
|
||||
return parseBool(self.getMetaDataEntry("has_materials", False))
|
||||
|
||||
def getHasVariants(self) -> bool:
|
||||
return parseBool(self.getMetaDataEntry("has_variants", False))
|
||||
|
||||
|
||||
## private:
|
||||
global_stack_mime = MimeType(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue