mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Revert "Write a list of object names to the global metadata of ufp files"
This was accidentally committed to master
This reverts commit 67836851
This commit is contained in:
parent
6783685126
commit
f660755b07
1 changed files with 0 additions and 17 deletions
|
@ -18,9 +18,6 @@ from cura.Snapshot import Snapshot
|
|||
from cura.Utils.Threading import call_on_qt_thread
|
||||
|
||||
from UM.i18n import i18nCatalog
|
||||
|
||||
METADATA_OBJECTS_PATH = "metadata/objects"
|
||||
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
|
@ -56,8 +53,6 @@ class UFPWriter(MeshWriter):
|
|||
archive = VirtualFile()
|
||||
archive.openStream(stream, "application/x-ufp", OpenMode.WriteOnly)
|
||||
|
||||
self._writeObjectList(archive)
|
||||
|
||||
#Store the g-code from the scene.
|
||||
archive.addContentType(extension = "gcode", mime_type = "text/x-gcode")
|
||||
gcode_textio = StringIO() #We have to convert the g-code into bytes.
|
||||
|
@ -144,15 +139,3 @@ class UFPWriter(MeshWriter):
|
|||
Logger.error(error_msg)
|
||||
return False
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def _writeObjectList(archive):
|
||||
"""Write a json list of object names to the METADATA_OBJECTS_PATH metadata field
|
||||
|
||||
To retrieve, use: `archive.getMetadata(METADATA_OBJECTS_PATH)`
|
||||
"""
|
||||
objectsModel = CuraApplication.getInstance().getObjectsModel()
|
||||
objectMetas = [{"name": item["name"]} for item in objectsModel.items]
|
||||
|
||||
data = {METADATA_OBJECTS_PATH: objectMetas}
|
||||
archive.setMetadata(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue