mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 03:37:48 -06:00
Hide materials belong to a to-be-removed package
This commit is contained in:
parent
5255d6ca2a
commit
76417b7fb2
6 changed files with 46 additions and 10 deletions
|
@ -63,6 +63,7 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
|
||||
# Prevent recursion
|
||||
if not apply_to_all:
|
||||
super().addMetaDataEntry(key, value)
|
||||
super().setMetaDataEntry(key, value)
|
||||
return
|
||||
|
||||
|
@ -74,12 +75,14 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
# Update the root material container
|
||||
root_material_container = material_group.root_material_node.getContainer()
|
||||
if root_material_container is not None:
|
||||
root_material_container.addMetaDataEntry(key, value)
|
||||
root_material_container.setMetaDataEntry(key, value, apply_to_all = False)
|
||||
|
||||
# Update all containers derived from it
|
||||
for node in material_group.derived_material_node_list:
|
||||
container = node.getContainer()
|
||||
if container is not None:
|
||||
container.addMetaDataEntry(key, value)
|
||||
container.setMetaDataEntry(key, value, apply_to_all = False)
|
||||
|
||||
## Overridden from InstanceContainer, similar to setMetaDataEntry.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue