mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Fix coding style
CURA-6915
This commit is contained in:
parent
c64cff9a47
commit
72310919c3
1 changed files with 21 additions and 24 deletions
|
@ -70,8 +70,7 @@ class UFPWriter(MeshWriter):
|
|||
return False
|
||||
gcode = archive.getStream("/3D/model.gcode")
|
||||
gcode.write(gcode_textio.getvalue().encode("UTF-8"))
|
||||
archive.addRelation(virtual_path="/3D/model.gcode",
|
||||
relation_type="http://schemas.ultimaker.org/package/2018/relationships/gcode")
|
||||
archive.addRelation(virtual_path = "/3D/model.gcode", relation_type = "http://schemas.ultimaker.org/package/2018/relationships/gcode")
|
||||
|
||||
self._createSnapshot()
|
||||
|
||||
|
@ -123,8 +122,7 @@ class UFPWriter(MeshWriter):
|
|||
material_root_id = material.getMetaDataEntry("base_file")
|
||||
material_root_query = container_registry.findContainers(id = material_root_id)
|
||||
if not material_root_query:
|
||||
Logger.log("e",
|
||||
"Cannot find material container with root id {root_id}".format(root_id=material_root_id))
|
||||
Logger.log("e", "Cannot find material container with root id {root_id}".format(root_id = material_root_id))
|
||||
return False
|
||||
material_container = material_root_query[0]
|
||||
|
||||
|
@ -162,13 +160,13 @@ class UFPWriter(MeshWriter):
|
|||
object_metas = []
|
||||
|
||||
for item in objects_model.items:
|
||||
object_metas.extend(UFPWriter._getObjectMetas(item["node"]))
|
||||
object_metas.extend(UFPWriter._getObjectMetadata(item["node"]))
|
||||
|
||||
data = {METADATA_OBJECTS_PATH: object_metas}
|
||||
archive.setMetadata(data)
|
||||
|
||||
@staticmethod
|
||||
def _getObjectMetas(node: SceneNode) -> List[Dict[str, str]]:
|
||||
def _getObjectMetadata(node: SceneNode) -> List[Dict[str, str]]:
|
||||
"""Get object metadata to write for a Node.
|
||||
|
||||
:return: List of object metadata dictionaries.
|
||||
|
@ -178,5 +176,4 @@ class UFPWriter(MeshWriter):
|
|||
|
||||
return [{"name": item.getName()}
|
||||
for item in DepthFirstIterator(node)
|
||||
if item.getMeshData() is not None and not item.callDecoration("isNonPrintingMesh")
|
||||
]
|
||||
if item.getMeshData() is not None and not item.callDecoration("isNonPrintingMesh")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue