From bb1316fc8840c7a105ce072241e22edf285b2b65 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 14 Aug 2017 08:48:07 +0200 Subject: [PATCH 1/2] Check if a material is being used based on base_file CURA-4129 --- cura/Settings/ContainerManager.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 9cbd93555a..74d5d5f53a 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -333,16 +333,15 @@ class ContainerManager(QObject): @pyqtSlot(str, result = bool) def isContainerUsed(self, container_id): Logger.log("d", "Checking if container %s is currently used", container_id) - # check if this is a material container. If so, check if any material with the same GUID is being used by any + # check if this is a material container. If so, check if any material with the same base is being used by any # stacks. container_ids_to_check = [container_id] container_results = self._container_registry.findInstanceContainers(id = container_id, type = "material") if container_results: this_container = container_results[0] - container_guid = this_container.getMetaDataEntry("GUID") - # check all material container IDs with the same GUID - material_containers = self._container_registry.findInstanceContainers(id = container_id, - GUID = container_guid, + material_base_file = this_container.getMetaDataEntry("base_file", this_container.getId()) + # check all material container IDs with the same base + material_containers = self._container_registry.findInstanceContainers(base_file = material_base_file, type = "material") if material_containers: container_ids_to_check = [container.getId() for container in material_containers] From 70a0a6ef1c78a1548bc813d96766d1128c753027 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 14 Aug 2017 11:02:32 +0200 Subject: [PATCH 2/2] Fix infill before walls check This could be dependent on either the inner or the outer wall, depending on how many walls you have. However usually it will be the inner wall. Contributes to issue CURA-4145. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index d876127d28..ad03a8e704 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1514,7 +1514,7 @@ "description": "Print the infill before printing the walls. Printing the walls first may lead to more accurate walls, but overhangs print worse. Printing the infill first leads to sturdier walls, but the infill pattern might sometimes show through the surface.", "type": "bool", "default_value": true, - "enabled": "infill_sparse_density > 0 and wall_extruder_nr == infill_extruder_nr", + "enabled": "infill_sparse_density > 0 and wall_x_extruder_nr == infill_extruder_nr", "settable_per_mesh": true }, "min_infill_area":