mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Extruder stacks are no longer renamed when loading from workspace
CURA-1263
This commit is contained in:
parent
2e4b430cf8
commit
3245c2fe32
1 changed files with 7 additions and 3 deletions
|
@ -213,13 +213,17 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
stack = ContainerStack(new_id)
|
||||
stack.deserialize(archive.open(container_stack_file).read().decode("utf-8"))
|
||||
|
||||
# Ensure a unique ID and name
|
||||
stack._id = new_id
|
||||
|
||||
# Extruder stacks are "bound" to a machine. If we add the machine as a new one, the id of the
|
||||
# bound machine also needs to change.
|
||||
if stack.getMetaDataEntry("machine", None):
|
||||
stack.setMetaDataEntry("machine", self.getNewId(stack.getMetaDataEntry("machine")))
|
||||
# Ensure a unique ID and name
|
||||
stack._id = new_id
|
||||
stack.setName(self._container_registry.uniqueName(stack.getName()))
|
||||
|
||||
if stack.getMetaDataEntry("type") != "extruder_train":
|
||||
# Only machines need a new name, stacks may be non-unique
|
||||
stack.setName(self._container_registry.uniqueName(stack.getName()))
|
||||
self._container_registry.addContainer(stack)
|
||||
else:
|
||||
Logger.log("w", "Resolve strategy of %s for machine is not supported", self._resolve_strategies["machine"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue