diff --git a/cura.desktop.in b/cura.desktop.in index fe61b47217..fbe8b30fed 100644 --- a/cura.desktop.in +++ b/cura.desktop.in @@ -13,6 +13,6 @@ TryExec=@CMAKE_INSTALL_FULL_BINDIR@/cura Icon=cura-icon Terminal=false Type=Application -MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml; +MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml; Categories=Graphics; Keywords=3D;Printing;Slicer; diff --git a/cura.sharedmimeinfo b/cura.sharedmimeinfo index 9629aef5df..23d38795eb 100644 --- a/cura.sharedmimeinfo +++ b/cura.sharedmimeinfo @@ -6,7 +6,7 @@ - + Computer-aided design and manufacturing format diff --git a/cura/API/Account.py b/cura/API/Account.py index c30b8d4586..e28f943009 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -36,11 +36,11 @@ class Account(QObject): OAUTH_SERVER_URL= self._oauth_root, CALLBACK_PORT=self._callback_port, CALLBACK_URL="http://localhost:{}/callback".format(self._callback_port), - CLIENT_ID="um---------------ultimaker_cura", - CLIENT_SCOPES="user.read drive.backups.read drive.backups.write client.package.download", + CLIENT_ID="um---------------ultimaker_cura_drive_plugin", + CLIENT_SCOPES="user.read drive.backups.read drive.backups.write", AUTH_DATA_PREFERENCE_KEY="general/ultimaker_auth_data", AUTH_SUCCESS_REDIRECT="{}/auth-success".format(self._cloud_api_root), - AUTH_FAILED_REDIRECT="{}//auth-error".format(self._cloud_api_root) + AUTH_FAILED_REDIRECT="{}/auth-error".format(self._cloud_api_root) ) self._authorization_service = AuthorizationService(Application.getInstance().getPreferences(), self._oauth_settings) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index cd0cfb95d6..5ff4161fea 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -83,7 +83,6 @@ from cura.Settings.SettingInheritanceManager import SettingInheritanceManager from cura.Settings.SimpleModeSettingsManager import SimpleModeSettingsManager from cura.Machines.VariantManager import VariantManager -from plugins.SliceInfoPlugin.SliceInfo import SliceInfo from .SingleInstance import SingleInstance from .AutoSave import AutoSave @@ -1722,7 +1721,7 @@ class CuraApplication(QtApplication): @pyqtSlot() def showMoreInformationDialogForAnonymousDataCollection(self): try: - slice_info = cast(SliceInfo, self._plugin_registry.getPluginObject("SliceInfoPlugin")) + slice_info = self._plugin_registry.getPluginObject("SliceInfoPlugin") slice_info.showMoreInfoDialog() except PluginNotFoundError: Logger.log("w", "Plugin SliceInfo was not found, so not able to show the info dialog.") diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index dd6376b5e3..0ca9047620 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -337,6 +337,7 @@ class MaterialManager(QObject): machine_exclude_materials = machine_definition.getMetaDataEntry("exclude_materials", []) material_id_metadata_dict = dict() # type: Dict[str, MaterialNode] + excluded_materials = set() for current_node in nodes_to_check: if current_node is None: continue @@ -345,13 +346,15 @@ class MaterialManager(QObject): # Do not exclude other materials that are of the same type. for material_id, node in current_node.material_map.items(): if material_id in machine_exclude_materials: - Logger.log("d", "Exclude material [%s] for machine [%s]", - material_id, machine_definition.getId()) + excluded_materials.add(material_id) continue if material_id not in material_id_metadata_dict: material_id_metadata_dict[material_id] = node + if excluded_materials: + Logger.log("d", "Exclude materials {excluded_materials} for machine {machine_definition_id}".format(excluded_materials = ", ".join(excluded_materials), machine_definition_id = machine_definition_id)) + return material_id_metadata_dict # diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index c8d1d9e370..0ec95e2e41 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -291,7 +291,7 @@ class CuraContainerStack(ContainerStack): # Helper to make sure we emit a PyQt signal on container changes. def _onContainersChanged(self, container: Any) -> None: - self.pyqtContainersChanged.emit() + Application.getInstance().callLater(self.pyqtContainersChanged.emit) # Helper that can be overridden to get the "machine" definition, that is, the definition that defines the machine # and its properties rather than, for example, the extruder. Defaults to simply returning the definition property. diff --git a/plugins/SimulationView/layers3d.shader b/plugins/SimulationView/layers3d.shader index 03e279e9eb..de2b9335d8 100644 --- a/plugins/SimulationView/layers3d.shader +++ b/plugins/SimulationView/layers3d.shader @@ -256,6 +256,7 @@ fragment41core = out vec4 frag_color; uniform mediump vec4 u_ambientColor; + uniform mediump vec4 u_minimumAlbedo; uniform highp vec3 u_lightPosition; void main() @@ -263,7 +264,7 @@ fragment41core = mediump vec4 finalColor = vec4(0.0); float alpha = f_color.a; - finalColor.rgb += f_color.rgb * 0.3; + finalColor.rgb += f_color.rgb * 0.2 + u_minimumAlbedo.rgb; highp vec3 normal = normalize(f_normal); highp vec3 light_dir = normalize(u_lightPosition - f_vertex); @@ -285,6 +286,7 @@ u_extruder_opacity = [1.0, 1.0, 1.0, 1.0] u_specularColor = [0.4, 0.4, 0.4, 1.0] u_ambientColor = [0.3, 0.3, 0.3, 0.0] u_diffuseColor = [1.0, 0.79, 0.14, 1.0] +u_minimumAlbedo = [0.1, 0.1, 0.1, 1.0] u_shininess = 20.0 u_show_travel_moves = 0 diff --git a/resources/definitions/creality_cr10.def.json b/resources/definitions/creality_cr10.def.json index b727834db3..fb63867163 100644 --- a/resources/definitions/creality_cr10.def.json +++ b/resources/definitions/creality_cr10.def.json @@ -37,7 +37,7 @@ "top_bottom_thickness": { "default_value": 0.6 }, - "top_bottom_pattern": { + "top_bottom_pattern_0": { "default_value": "concentric" }, "infill_pattern": { diff --git a/resources/qml/Menus/SettingVisibilityPresetsMenu.qml b/resources/qml/Menus/SettingVisibilityPresetsMenu.qml index 2175cfa402..c34dc2a484 100644 --- a/resources/qml/Menus/SettingVisibilityPresetsMenu.qml +++ b/resources/qml/Menus/SettingVisibilityPresetsMenu.qml @@ -29,7 +29,6 @@ Menu onTriggered: { settingVisibilityPresetsModel.setActivePreset(model.id); - showSettingVisibilityProfile(); } } diff --git a/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml b/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml index f72d93aff3..92970f40e2 100644 --- a/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml +++ b/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml @@ -27,9 +27,20 @@ Item function updateMaterialPropertiesObject() { + // DRAGON WARNING!!! DO NOT TOUCH THIS IF YOU DON'T KNOW. + // TL;DR: Always update "container_id" first! + // + // Other widgets such as MaterialsView have bindings towards "materialProperties" and its properties. Here the + // properties are updated one by one, and each change can trigger a reaction on those widgets that have + // connections to the property gets changed, and some reactions will use functions such as + // ContainerManager.getContainerMetaDataEntry() to fetch data using the "container_id" as the reference. + // We need to change "container_id" first so any underlying triggers will use the correct "container_id" to + // fetch data. Or, for example, if we change GUID first, which triggered the weight widget to fetch weight + // before we can update "container_id", so it will fetch weight with the wrong (old) "container_id". + materialProperties.container_id = currentItem.id + materialProperties.name = currentItem.name || "Unknown" materialProperties.guid = currentItem.GUID - materialProperties.container_id = currentItem.id materialProperties.brand = currentItem.brand || "Unknown" materialProperties.material = currentItem.material || "Unknown" materialProperties.color_name = currentItem.color_name || "Yellow" diff --git a/resources/qml/Preferences/Materials/MaterialsList.qml b/resources/qml/Preferences/Materials/MaterialsList.qml index cb5de685e2..00bead9650 100644 --- a/resources/qml/Preferences/Materials/MaterialsList.qml +++ b/resources/qml/Preferences/Materials/MaterialsList.qml @@ -17,9 +17,23 @@ Item // Children UM.I18nCatalog { id: catalog; name: "cura"; } - Cura.MaterialBrandsModel { id: materialsModel } - Cura.FavoriteMaterialsModel { id: favoriteMaterialsModel } - Cura.GenericMaterialsModel { id: genericMaterialsModel } + Cura.MaterialBrandsModel + { + id: materialsModel + extruderPosition: Cura.ExtruderManager.activeExtruderIndex + } + + Cura.FavoriteMaterialsModel + { + id: favoriteMaterialsModel + extruderPosition: Cura.ExtruderManager.activeExtruderIndex + } + + Cura.GenericMaterialsModel + { + id: genericMaterialsModel + extruderPosition: Cura.ExtruderManager.activeExtruderIndex + } property var currentType: null property var currentBrand: null