Allow for saving multiple scene nodes at the same time

The selection saving saves the entire current selection and their child nodes.

Contributes to issue CURA-2617.
This commit is contained in:
Ghostkeeper 2016-10-17 15:50:35 +02:00
parent b3e3053323
commit 96e516c676
No known key found for this signature in database
GPG key ID: 701948C5954A7385
4 changed files with 44 additions and 14 deletions

View file

@ -46,7 +46,17 @@ class GCodeWriter(MeshWriter):
def __init__(self):
super().__init__()
def write(self, stream, node, mode = MeshWriter.OutputMode.TextMode):
## Writes the g-code for the entire scene to a stream.
#
# Note that even though the function accepts a collection of nodes, the
# entire scene is always written to the file since it is not possible to
# separate the g-code for just specific nodes.
#
# \param stream The stream to write the g-code to.
# \param nodes This is ignored.
# \param mode Additional information on how to format the g-code in the
# file. This must always be text mode.
def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode):
if mode != MeshWriter.OutputMode.TextMode:
Logger.log("e", "GCode Writer does not support non-text mode.")
return False