cura_empty_instance_containers.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. import copy
  4. from UM.Settings.constant_instance_containers import EMPTY_CONTAINER_ID, empty_container
  5. # Empty definition changes
  6. EMPTY_DEFINITION_CHANGES_CONTAINER_ID = "empty_definition_changes"
  7. empty_definition_changes_container = copy.deepcopy(empty_container)
  8. empty_definition_changes_container.setMetaDataEntry("id", EMPTY_DEFINITION_CHANGES_CONTAINER_ID)
  9. empty_definition_changes_container.setMetaDataEntry("type", "definition_changes")
  10. # Empty variant
  11. EMPTY_VARIANT_CONTAINER_ID = "empty_variant"
  12. empty_variant_container = copy.deepcopy(empty_container)
  13. empty_variant_container.setMetaDataEntry("id", EMPTY_VARIANT_CONTAINER_ID)
  14. empty_variant_container.setMetaDataEntry("type", "variant")
  15. # Empty material
  16. EMPTY_MATERIAL_CONTAINER_ID = "empty_material"
  17. empty_material_container = copy.deepcopy(empty_container)
  18. empty_material_container.setMetaDataEntry("id", EMPTY_MATERIAL_CONTAINER_ID)
  19. empty_material_container.setMetaDataEntry("type", "material")
  20. # Empty quality
  21. EMPTY_QUALITY_CONTAINER_ID = "empty_quality"
  22. empty_quality_container = copy.deepcopy(empty_container)
  23. empty_quality_container.setMetaDataEntry("id", EMPTY_QUALITY_CONTAINER_ID)
  24. empty_quality_container.setName("Not Supported")
  25. empty_quality_container.setMetaDataEntry("quality_type", "not_supported")
  26. empty_quality_container.setMetaDataEntry("type", "quality")
  27. empty_quality_container.setMetaDataEntry("supported", False)
  28. # Empty quality changes
  29. EMPTY_QUALITY_CHANGES_CONTAINER_ID = "empty_quality_changes"
  30. empty_quality_changes_container = copy.deepcopy(empty_container)
  31. empty_quality_changes_container.setMetaDataEntry("id", EMPTY_QUALITY_CHANGES_CONTAINER_ID)
  32. empty_quality_changes_container.setMetaDataEntry("type", "quality_changes")
  33. empty_quality_changes_container.setMetaDataEntry("quality_type", "not_supported")
  34. __all__ = ["EMPTY_CONTAINER_ID",
  35. "empty_container", # For convenience
  36. "EMPTY_DEFINITION_CHANGES_CONTAINER_ID",
  37. "empty_definition_changes_container",
  38. "EMPTY_VARIANT_CONTAINER_ID",
  39. "empty_variant_container",
  40. "EMPTY_MATERIAL_CONTAINER_ID",
  41. "empty_material_container",
  42. "EMPTY_QUALITY_CHANGES_CONTAINER_ID",
  43. "empty_quality_changes_container",
  44. "EMPTY_QUALITY_CONTAINER_ID",
  45. "empty_quality_container"
  46. ]