Turns out that the material profiles deserialise the variant to the 'variant_name' metadata entry, not just 'variant'. This caused it to find no variant-specific material profiles at all anywhere. It would always fall back to the machine-specific names.
Contributes to issue CURA-6831.
It's not behaving as expected here. For instance, Ultimaker 3 wasn't specifying has_machine_materials and thus only the base materials would get loaded, but clearly the Ultimaker 3 has materials specialised for it.
Whether or not a printer has materials specialised for it is now determined by whether the specialisations exist in the material files. So we don't need the metadata entry any more. It seemed to have not been in use anyway, except by one printer which specified that has_machine_materials is true. I've now made it behave as if it's always true.
Contributes to issue CURA-6831.
You can now be assured that there is ALWAYS at least one child node, except for child nodes of intent profiles which don't exist.
Contributes to issue CURA-6600.
This sets up a few new classes, subclasses of ContainerNode.
This is intended to simplify the current structure in the QualityManager.
Contributes to issue CURA-6600.