Filter on 'material' metadata instead of material_id

This is consistent with how the material is stored in other profiles, such as quality profiles.

Contributes to issue CURA-6597.
This commit is contained in:
Ghostkeeper 2019-07-04 09:09:22 +02:00
parent c75b83be21
commit 951b91e3d8
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -43,7 +43,7 @@ class IntentManager(QObject):
# an empty list if nothing was found. # an empty list if nothing was found.
def intentMetadatas(self, definition_id: str, nozzle_name: str, material_id: str) -> List[Dict[str, Any]]: def intentMetadatas(self, definition_id: str, nozzle_name: str, material_id: str) -> List[Dict[str, Any]]:
registry = cura.CuraApplication.CuraApplication.getInstance().getContainerRegistry() registry = cura.CuraApplication.CuraApplication.getInstance().getContainerRegistry()
return registry.findContainersMetadata(definition = definition_id, variant = nozzle_name, material_id = material_id) return registry.findContainersMetadata(definition = definition_id, variant = nozzle_name, material = material_id)
## Collects and returns all intent categories available for the given ## Collects and returns all intent categories available for the given
# parameters. Note that the 'default' category is always available. # parameters. Note that the 'default' category is always available.