mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Added CuraVersion to 3mf metadata
This commit is contained in:
parent
d08c1b73bf
commit
e941d417f1
1 changed files with 7 additions and 1 deletions
|
@ -5,7 +5,7 @@ from UM.Mesh.MeshWriter import MeshWriter
|
|||
from UM.Math.Vector import Vector
|
||||
from UM.Logger import Logger
|
||||
from UM.Math.Matrix import Matrix
|
||||
from UM.Settings.SettingRelation import RelationType
|
||||
from UM.Application import Application
|
||||
|
||||
try:
|
||||
import xml.etree.cElementTree as ET
|
||||
|
@ -78,6 +78,12 @@ class ThreeMFWriter(MeshWriter):
|
|||
model_relation_element = ET.SubElement(relations_element, "Relationship", Target = "/3D/3dmodel.model", Id = "rel0", Type = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel")
|
||||
|
||||
model = ET.Element("model", unit = "millimeter", xmlns = self._namespaces["3mf"])
|
||||
|
||||
# Add the version of Cura this was created with. As "CuraVersion" is not a recognised metadata name
|
||||
# by 3mf itself, we place it in our own namespace.
|
||||
version_metadata = ET.SubElement(model, "metadata", xmlns = self._namespaces["cura"], name = "CuraVersion")
|
||||
version_metadata.text = Application.getInstance().getVersion()
|
||||
|
||||
resources = ET.SubElement(model, "resources")
|
||||
build = ET.SubElement(model, "build")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue