mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 21:59:01 +08:00
Better fallbacks if MachineInstance missing profiles
They now fallback to "empty" so that it can still construct a valid instance, albeit with a missing profile (such as material), if some profile is missing from the original machine instance file. Contributes to issue CURA-844.
This commit is contained in:
parent
c01b7091c8
commit
6fbac2f7ee
@ -47,11 +47,11 @@ class MachineInstance:
|
||||
raise UM.VersionUpgrade.InvalidVersionException("The version of this machine instance is wrong. It must be 1.")
|
||||
|
||||
self._type_name = config.get("general", "type")
|
||||
self._variant_name = config.get("general", "variant", fallback = None)
|
||||
self._name = config.get("general", "name")
|
||||
self._variant_name = config.get("general", "variant", fallback = "empty")
|
||||
self._name = config.get("general", "name", fallback = "")
|
||||
self._key = config.get("general", "key", fallback = None)
|
||||
self._active_profile_name = config.get("general", "active_profile", fallback = None)
|
||||
self._active_material_name = config.get("general", "material", fallback = None)
|
||||
self._active_profile_name = config.get("general", "active_profile", fallback = "empty")
|
||||
self._active_material_name = config.get("general", "material", fallback = "empty")
|
||||
|
||||
self._machine_setting_overrides = {}
|
||||
for key, value in config["machine_settings"].items():
|
||||
|
Loading…
x
Reference in New Issue
Block a user