mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Add the slicemetadata.json file into the makerbot file archive
CURA-12005
This commit is contained in:
parent
378873a0ff
commit
7ba48bfa97
3 changed files with 67 additions and 56 deletions
|
@ -137,6 +137,9 @@ class MakerbotWriter(MeshWriter):
|
|||
for png_file in png_files:
|
||||
file, data = png_file["file"], png_file["data"]
|
||||
zip_stream.writestr(file, data)
|
||||
api = CuraApplication.getInstance().getCuraAPI()
|
||||
slice_metadata = json.dumps(api.interface.settings.getSliceMetadata(), separators=(", ", ": "), indent=4)
|
||||
zip_stream.writestr("slicemetadata.json", slice_metadata)
|
||||
except (IOError, OSError, BadZipFile) as ex:
|
||||
Logger.log("e", f"Could not write to (.makerbot) file because: '{ex}'.")
|
||||
self.setInformation(catalog.i18nc("@error", "MakerbotWriter could not save to the designated path."))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue