This happens when the printer is changed, such as when changing the Machine Width in the machine settings dialogue. It updates these menus then and if not all extruders are defined it'll give the following errors:
2020-03-20 16:56:57,839 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/SettingsMenu.qml:51: TypeError: Cannot read property 'isEnabled' of undefined
2020-03-20 16:56:57,840 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/SettingsMenu.qml:44: TypeError: Cannot read property 'isEnabled' of undefined
2020-03-20 16:56:57,841 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/MaterialMenu.qml:26: TypeError: Cannot read property 'isEnabled' of undefined
2020-03-20 16:56:57,841 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/resources/qml/Menus/MaterialMenu.qml:28: TypeError: Cannot read property 'material' of undefined
Done during Turbo Testing and Tooling.
This commit adds a button "Add more materials from Marketplace" in the
menu that pops up in the material list while configuring the materials
into custom ones. The button redirects the user to the Marketplace
materials page (https://marketplace.ultimaker.com/app/cura/materials)
CURA-7027
I was hoping to completely nix the generic materials model (since it's basically just a brand "Generic", but then in the QML it has to be have the same in terms of sub-menus or fold-outs and that looked stupid (Generic -> ABS -> ABS)). So we keep that one for now. It is cleaner though.
Contributes to CURA-5162, CURA-5378
when the extruder stack changes.
- What happen was that when the extruder model needed to update, the
material model was not updated correctly and so when changing a material, the
node was incorrect.
Since the network rewrite, outputdevices no longer have hotends and materials. This functionality may return, but until that time this does a better job at checking if the properties exist, preventing QML errors.
This specialized InstanceContainersModel has an override that makes the model a bit more efficient when non-materials get their metadata updated.
Contributes to issue CURA-4243.
NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string.
This only listens to whether the 'base' XML profile is marked as compatible in its metadata, but since the machine doesn't have its own materials, the base is the only one that exists. This needs to be changed when we change the filtering on fdmprinter, hence the comment in the code.
Contributes to issue CURA-2837.
Updates to InstanceContainerModel are becoming expensive because there are so many instances of that model. The MaterialMenu used three, and the MaterialMenu is instantiated three times for a dual extrusion printer.
CURA-2193