Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2016-11-14 19:45:30 +0300
committerJaime van Kessel <nallath@gmail.com>2016-11-14 19:45:30 +0300
commit8640b2b787d78c8e54b344ceeb9e4af775fe1314 (patch)
treedbbfb303bd7f2cb84dbdb4867c8d76202e0eab77 /plugins/3MFWriter/ThreeMFWriter.py
parent1db2d06e0655ae34cc8030527158397e855e55a0 (diff)
Saving an empty buildplate as a workspace is now possible
CURA-1263
Diffstat (limited to 'plugins/3MFWriter/ThreeMFWriter.py')
-rw-r--r--plugins/3MFWriter/ThreeMFWriter.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py
index acf1421655..d86b119276 100644
--- a/plugins/3MFWriter/ThreeMFWriter.py
+++ b/plugins/3MFWriter/ThreeMFWriter.py
@@ -57,10 +57,6 @@ class ThreeMFWriter(MeshWriter):
return self._archive
def write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode):
- try:
- MeshWriter._meshNodes(nodes).__next__()
- except StopIteration:
- return False #Don't write anything if there is no mesh data.
self._archive = None # Reset archive
archive = zipfile.ZipFile(stream, "w", compression = zipfile.ZIP_DEFLATED)
try:
@@ -86,7 +82,7 @@ class ThreeMFWriter(MeshWriter):
build = ET.SubElement(model, "build")
added_nodes = []
-
+ index = 0 # Ensure index always exists (even if there are no nodes to write)
# Write all nodes with meshData to the file as objects inside the resource tag
for index, n in enumerate(MeshWriter._meshNodes(nodes)):
added_nodes.append(n) # Save the nodes that have mesh data