mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix code style
This commit is contained in:
parent
3e6d4b9230
commit
711b493ebf
1 changed files with 6 additions and 6 deletions
|
@ -187,7 +187,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
|
|
||||||
Job.yieldThread()
|
Job.yieldThread()
|
||||||
|
|
||||||
# Determine ContainerStack files and ExtruderStack files
|
# Load ContainerStack files and ExtruderStack files
|
||||||
container_stack_files, extruder_stack_files = self._determineGlobalAndExtruderStackFiles(
|
container_stack_files, extruder_stack_files = self._determineGlobalAndExtruderStackFiles(
|
||||||
file_name, cura_file_names)
|
file_name, cura_file_names)
|
||||||
self._resolve_strategies = {"machine": None, "quality_changes": None, "material": None}
|
self._resolve_strategies = {"machine": None, "quality_changes": None, "material": None}
|
||||||
|
@ -296,7 +296,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
definition_container_files = [name for name in cura_file_names if name.endswith(self._definition_container_suffix)]
|
definition_container_files = [name for name in cura_file_names if name.endswith(self._definition_container_suffix)]
|
||||||
for definition_container_file in definition_container_files:
|
for definition_container_file in definition_container_files:
|
||||||
container_id = self._stripFileToId(definition_container_file)
|
container_id = self._stripFileToId(definition_container_file)
|
||||||
definitions = self._container_registry.findDefinitionContainers(id=container_id)
|
definitions = self._container_registry.findDefinitionContainers(id = container_id)
|
||||||
if not definitions:
|
if not definitions:
|
||||||
definition_container = DefinitionContainer(container_id)
|
definition_container = DefinitionContainer(container_id)
|
||||||
definition_container.deserialize(archive.open(definition_container_file).read().decode("utf-8"))
|
definition_container.deserialize(archive.open(definition_container_file).read().decode("utf-8"))
|
||||||
|
@ -313,7 +313,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
material_container_files = [name for name in cura_file_names if name.endswith(self._material_container_suffix)]
|
material_container_files = [name for name in cura_file_names if name.endswith(self._material_container_suffix)]
|
||||||
for material_container_file in material_container_files:
|
for material_container_file in material_container_files:
|
||||||
container_id = self._stripFileToId(material_container_file)
|
container_id = self._stripFileToId(material_container_file)
|
||||||
materials = self._container_registry.findInstanceContainers(id=container_id)
|
materials = self._container_registry.findInstanceContainers(id = container_id)
|
||||||
if not materials:
|
if not materials:
|
||||||
material_container = xml_material_profile(container_id)
|
material_container = xml_material_profile(container_id)
|
||||||
material_container.deserialize(archive.open(material_container_file).read().decode("utf-8"))
|
material_container.deserialize(archive.open(material_container_file).read().decode("utf-8"))
|
||||||
|
@ -346,7 +346,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
Job.yieldThread()
|
Job.yieldThread()
|
||||||
if container_type == "user":
|
if container_type == "user":
|
||||||
# Check if quality changes already exists.
|
# Check if quality changes already exists.
|
||||||
user_containers = self._container_registry.findInstanceContainers(id=container_id)
|
user_containers = self._container_registry.findInstanceContainers(id = container_id)
|
||||||
if not user_containers:
|
if not user_containers:
|
||||||
containers_to_add.append(instance_container)
|
containers_to_add.append(instance_container)
|
||||||
else:
|
else:
|
||||||
|
@ -405,7 +405,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
for extruder_stack_file in extruder_stack_files:
|
for extruder_stack_file in extruder_stack_files:
|
||||||
container_id = self._stripFileToId(extruder_stack_file)
|
container_id = self._stripFileToId(extruder_stack_file)
|
||||||
|
|
||||||
container_stacks = self._container_registry.findContainerStacks(id=container_id)
|
container_stacks = self._container_registry.findContainerStacks(id = container_id)
|
||||||
if container_stacks:
|
if container_stacks:
|
||||||
# this container stack already exists, try to resolve
|
# this container stack already exists, try to resolve
|
||||||
stack = container_stacks[0]
|
stack = container_stacks[0]
|
||||||
|
@ -445,7 +445,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
||||||
container_id = self._stripFileToId(container_stack_file)
|
container_id = self._stripFileToId(container_stack_file)
|
||||||
|
|
||||||
# Check if a stack by this ID already exists;
|
# Check if a stack by this ID already exists;
|
||||||
container_stacks = self._container_registry.findContainerStacks(id=container_id)
|
container_stacks = self._container_registry.findContainerStacks(id = container_id)
|
||||||
if container_stacks:
|
if container_stacks:
|
||||||
stack = container_stacks[0]
|
stack = container_stacks[0]
|
||||||
if self._resolve_strategies["machine"] == "override":
|
if self._resolve_strategies["machine"] == "override":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue