mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 08:47:50 -06:00
Some fixes regarding submodules and imports.
This commit is contained in:
parent
d4619da358
commit
38a7ffa7da
2 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ import os
|
||||||
import os.path
|
import os.path
|
||||||
import io
|
import io
|
||||||
|
|
||||||
from UM import Resources
|
from UM.Resources import Resources
|
||||||
from UM.VersionUpgrade import VersionUpgrade # Superclass of the plugin.
|
from UM.VersionUpgrade import VersionUpgrade # Superclass of the plugin.
|
||||||
|
|
||||||
class VersionUpgrade22to24(VersionUpgrade):
|
class VersionUpgrade22to24(VersionUpgrade):
|
||||||
|
|
|
@ -72,7 +72,7 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
super().setDirty(dirty)
|
super().setDirty(dirty)
|
||||||
base_file = self.getMetaDataEntry("base_file", None)
|
base_file = self.getMetaDataEntry("base_file", None)
|
||||||
if base_file is not None and base_file != self._id:
|
if base_file is not None and base_file != self._id:
|
||||||
containers = UM.Settings.ContainerRegistry.getInstance().findContainers(id=base_file)
|
containers = ContainerRegistry.getInstance().findContainers(id=base_file)
|
||||||
if containers:
|
if containers:
|
||||||
base_container = containers[0]
|
base_container = containers[0]
|
||||||
if not base_container.isReadOnly():
|
if not base_container.isReadOnly():
|
||||||
|
@ -479,7 +479,7 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
new_material_id = self.id + "_" + machine_id
|
new_material_id = self.id + "_" + machine_id
|
||||||
|
|
||||||
# It could be that we are overwriting, so check if the ID already exists.
|
# It could be that we are overwriting, so check if the ID already exists.
|
||||||
materials = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=new_material_id)
|
materials = ContainerRegistry.getInstance().findInstanceContainers(id=new_material_id)
|
||||||
if materials:
|
if materials:
|
||||||
new_material = materials[0]
|
new_material = materials[0]
|
||||||
new_material.clearData()
|
new_material.clearData()
|
||||||
|
@ -533,7 +533,7 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
|
|
||||||
# It could be that we are overwriting, so check if the ID already exists.
|
# It could be that we are overwriting, so check if the ID already exists.
|
||||||
new_hotend_id = self.id + "_" + machine_id + "_" + hotend_id.replace(" ", "_")
|
new_hotend_id = self.id + "_" + machine_id + "_" + hotend_id.replace(" ", "_")
|
||||||
materials = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id=new_hotend_id)
|
materials = ContainerRegistry.getInstance().findInstanceContainers(id=new_hotend_id)
|
||||||
if materials:
|
if materials:
|
||||||
new_hotend_material = materials[0]
|
new_hotend_material = materials[0]
|
||||||
new_hotend_material.clearData()
|
new_hotend_material.clearData()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue