Rename all_root_materials to all_base_files

This naming is more consistent with the naming of the metadata entry and most of the other code.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-09-18 14:26:41 +02:00
parent 84e5114566
commit a3e9316f48
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -69,9 +69,9 @@ class SendMaterialJob(Job):
def _sendMaterials(self, materials_to_send: Set[str]) -> None:
container_registry = CuraApplication.getInstance().getContainerRegistry()
all_materials = container_registry.findInstanceContainersMetadata(type = "material")
all_root_materials = {material["base_file"] for material in all_materials if "base_file" in material} # Filters out uniques by making it a set. Don't include files without base file (i.e. empty material).
all_base_files = {material["base_file"] for material in all_materials if "base_file" in material} # Filters out uniques by making it a set. Don't include files without base file (i.e. empty material).
for root_material_id in all_root_materials:
for root_material_id in all_base_files:
if root_material_id not in materials_to_send:
# If the material does not have to be sent we skip it.
continue