diff --git a/plugins/BlackBeltPlugin/FlavorParserPatches.py b/plugins/BlackBeltPlugin/FlavorParserPatches.py index fc54df7f83..58bb16f36d 100644 --- a/plugins/BlackBeltPlugin/FlavorParserPatches.py +++ b/plugins/BlackBeltPlugin/FlavorParserPatches.py @@ -17,7 +17,7 @@ class FlavorParserPatches(): def processGCodeStream(self, stream: str) -> Optional[CuraSceneNode]: scene_node = self.__processGCodeStream(stream) if not scene_node: - return + return None root = CuraApplication.getInstance().getController().getScene().getRoot() root.callDecoration("calculateTransformData") diff --git a/plugins/BlackBeltPlugin/PatchedMaterialManager.py b/plugins/BlackBeltPlugin/PatchedMaterialManager.py index 6aee5d7db5..9d6c01745f 100644 --- a/plugins/BlackBeltPlugin/PatchedMaterialManager.py +++ b/plugins/BlackBeltPlugin/PatchedMaterialManager.py @@ -63,7 +63,8 @@ class PatchedMaterialManager(MaterialManager): # Do not exclude other materials that are of the same type. for material_id, node in current_node.material_map.items(): ### START PATCH - if machine_limit_materials and node.getContainer().getId() == material_id: + node_container = node.getContainer() + if machine_limit_materials and node_container and node_container.getId() == material_id: # For the materials we want Cura creates a variant-specific InstanceContainer # If the InstanceContainer is not variant-specific then we are not interested continue