mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Don't serialize "definition" for material profile
CURA-5787
This commit is contained in:
parent
164e721c42
commit
9a1d8ea5f9
1 changed files with 1 additions and 11 deletions
|
@ -141,23 +141,13 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
# setting_version is derived from the "version" tag in the schema, so don't serialize it into a file
|
||||
if ignored_metadata_keys is None:
|
||||
ignored_metadata_keys = set()
|
||||
ignored_metadata_keys |= {"setting_version"}
|
||||
ignored_metadata_keys |= {"setting_version", "definition", "status", "variant", "type", "base_file", "approximate_diameter", "id", "container_type", "name"}
|
||||
# remove the keys that we want to ignore in the metadata
|
||||
for key in ignored_metadata_keys:
|
||||
if key in metadata:
|
||||
del metadata[key]
|
||||
properties = metadata.pop("properties", {})
|
||||
|
||||
# Metadata properties that should not be serialized.
|
||||
metadata.pop("status", "")
|
||||
metadata.pop("variant", "")
|
||||
metadata.pop("type", "")
|
||||
metadata.pop("base_file", "")
|
||||
metadata.pop("approximate_diameter", "")
|
||||
metadata.pop("id", "")
|
||||
metadata.pop("container_type", "")
|
||||
metadata.pop("name", "")
|
||||
|
||||
## Begin Name Block
|
||||
builder.start("name") # type: ignore
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue