Fix typing issues

This commit is contained in:
fieldOfView 2018-11-15 23:08:46 +01:00
parent aa0a4aa616
commit b6b7ec8de8
2 changed files with 3 additions and 2 deletions

View file

@ -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")

View file

@ -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