After a lot of discussion and finding out what the hell was going on,
we figured out we made a pretty big derp by only setting a single connection_type
in the metadata of the machine. What it's actually doing is describing what connection types
have been configured (and not just randomly displaying whatever output device set the value last)
The extruder model gets updated way to much (for all material changes) but we only need the
number and names of the extruders, since the other menu's do this by themselves
CURA-5694
For a machine, if it has extruder-specific qualities, when we look up
extruder qualities, we should NOT fall back to use the global qualities.
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
The 'parent' parameter was unused, so I removed it. But I didn't remove all things that called it, apparently. I just removed some. I didn't try the stackbuilder.
Contributes to issue CURA-5330.
CURA-4358
Using the context for override the extruderValues() and resolveOrValue()
functions, for getting the correct values. Also indicate in the context
to skip the first container in the stacks (user container)
CURA-3975
GlobalStack has metadata type "machine", which is different from what is
registered in the VersionUpgradeManager "machine_stack". This commit
makes sure that Cura can find the correct upgrade route for the
GlobalStack files.
We do not load the extruders in a fixed order, thus we cannot assume
that addExtruder is called in the right order. This means that index 0
of the extruders is not necessarily the extruder with position 0. So
instead, use the extruder position as a dict key.
Contributes to CURA-3738
With limit_to_extruder, we always try to get the value of a setting from
an extruder. However, if the setting is not settable_per_extruder we
bypass the extruder and go directly to the global stack. This would
cause an infinite recursion.
Contributes to CURA-3738
This is to ensure that Global stacks are loaded before extruders, so once the extruders are deseralized, they can always find the next (global) stack
CURA-3497