It is not entirely accurate in the translated version, since the new current_settings is not machine-dependent any more. However, without information on the original file name, this is as good as it gets, since that instance profile there only mentions the machine it is dependent on in the file name.
Contributes to issue CURA-844.
Two big things had to happen for this: The resource types of quality and machine stack have to be defined before the initialisation of the version upgrade manager, since the version upgrade manager needs to know those storage locations at initialisation. But the storage location is still prefaced with '.config/UM' at this point, so instead we pass on the resource type (but the resource type still has to be defined before the init).
The other big change is that we now have to name the configuration type 'quality' and 'machine_stack' instead of 'instance_container' and 'container_stack' to coincide with the resource type. This allows us to be more consistent in later plug-ins when we also have to upgrade other instance container types.
Contributes to issue CURA-844.
They might not exist any more because the relation of profiles to printers changed from 2.1 to 2.2 for some machines (notably the UM2+ variants). But then it'll just make it empty when loading.
Contributes to issue CURA-844.
Lots of things have changed in how this works. Sadly, I can't translate things like the material, from PLA to ultimaker2_plus_0.4mm_pla. Not without implementing the entire container registry in the plug-in anyway.
Contributes to issue CURA-844.
Machine instances have the exact same file structure as preferences, except that machine instances require a name field (was already correctly implemented), but preferences didn't require it. This now forbids preferences to have a name field, so that the distinction between the two can be made.
Contributes to issue CURA-844.
I just couldn't stand it...
'I have to sort my books', she cried
With self-indulgent glee
With senseless, narcissistic pride:
'I'm just so OCD'
'How random, guys', I smiled and said
Then left without a peep
And washed my hands until they bled
And cried myself to sleep
Contributes to issue CURA-844.
This code is basically moved from Uranium to here. This is needed to allow for upgrade plug-ins to define their own configuration types.
Contributes to issue CURA-844.
After settings rework, we decided to make the upgrade plug-ins define their own configuration types. This is basically the definition for these configuration types. Only the get_version function is not yet implemented.
Contributes to issue CURA-844.
They no longer mention the version number in their function names. I'd rather have named them import/export but that gave a name clash with Python's 'import' keyword.
Contributes to issue CURA-844.
This works more or less the same as for machine instances. The code was copied from version 2.1 of the unserialise function of profiles, and optimised a bit. The output function is written from scratch. It has some code duplication. Maybe we have to do something about that.
Contributes to issue CURA-844.
Machine instances are translucently translated from version 1 to version 2. No setting changes are applied yet, nor has the format itself changed.
Contributes to issue CURA-844.
This plug-in does nothing at the moment. It merely says that it is able to upgrade configuration from version 2.1 to 2.2, but then raises exceptions when you actually try to use it. This is by design. I will now implement the functions that do the conversion.
Contributes to issue CURA-844.