mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06: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
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue