Merge branch '5.7' into CURA-11465-addprinter-window-jumps-to-cloud-printer

This commit is contained in:
Saumya Jain 2024-03-28 10:06:48 +01:00 committed by GitHub
commit 3e5edaa442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 247 additions and 65 deletions

View file

@ -49,7 +49,7 @@ class MachineErrorChecker(QObject):
self._keys_to_check = set() # type: Set[str]
self._num_keys_to_check_per_update = 10
self._num_keys_to_check_per_update = 1
def initialize(self) -> None:
self._error_check_timer.timeout.connect(self._rescheduleCheck)

View file

@ -1,6 +1,6 @@
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import List, Optional, TYPE_CHECKING
from typing import List, Optional, Set, TYPE_CHECKING
from PyQt6.QtCore import QObject, QTimer, pyqtProperty, pyqtSignal
from UM.FlameProfiler import pyqtSlot
@ -168,37 +168,26 @@ class SettingInheritanceManager(QObject):
def settingsWithInheritanceWarning(self) -> List[str]:
return self._settings_with_inheritance_warning
def _settingIsOverwritingInheritance(self, key: str, stack: ContainerStack = None) -> bool:
"""Check if a setting has an inheritance function that is overwritten"""
def _userSettingIsOverwritingInheritance(self, key: str, stack: ContainerStack, all_keys: Set[str] = set()) -> bool:
"""Check if a setting known as having a User state has an inheritance function that is overwritten"""
has_setting_function = False
if not stack:
stack = self._active_container_stack
if not stack: # No active container stack yet!
return False
if self._active_container_stack is None:
return False
all_keys = self._active_container_stack.getAllKeys()
containers = [] # type: List[ContainerInterface]
has_user_state = stack.getProperty(key, "state") == InstanceState.User
"""Check if the setting has a user state. If not, it is never overwritten."""
if not has_user_state:
return False
# If a setting is not enabled, don't label it as overwritten (It's never visible anyway).
if not stack.getProperty(key, "enabled"):
return False
user_container = stack.getTop()
"""Also check if the top container is not a setting function (this happens if the inheritance is restored)."""
# Also check if the top container is not a setting function (this happens if the inheritance is restored).
if user_container and isinstance(user_container.getProperty(key, "value"), SettingFunction):
return False
if not all_keys:
all_keys = self._active_container_stack.getAllKeys()
## Mash all containers for all the stacks together.
while stack:
containers.extend(stack.getContainers())
@ -229,17 +218,35 @@ class SettingInheritanceManager(QObject):
break # There is a setting function somewhere, stop looking deeper.
return has_setting_function and has_non_function_value
def _settingIsOverwritingInheritance(self, key: str, stack: ContainerStack = None) -> bool:
"""Check if a setting has an inheritance function that is overwritten"""
if not stack:
stack = self._active_container_stack
if not stack: # No active container stack yet!
return False
if self._active_container_stack is None:
return False
has_user_state = stack.getProperty(key, "state") == InstanceState.User
if not has_user_state:
return False
return self._userSettingIsOverwritingInheritance(key, stack)
def _update(self) -> None:
self._settings_with_inheritance_warning = [] # Reset previous data.
# Make sure that the GlobalStack is not None. sometimes the globalContainerChanged signal gets here late.
if self._global_container_stack is None:
if self._global_container_stack is None or self._active_container_stack is None:
return
# Check all setting keys that we know of and see if they are overridden.
for setting_key in self._global_container_stack.getAllKeys():
override = self._settingIsOverwritingInheritance(setting_key)
if override:
# Check all user setting keys that we know of and see if they are overridden.
all_keys = self._active_container_stack.getAllKeys()
for setting_key in self._active_container_stack.getAllKeysWithUserState():
if self._userSettingIsOverwritingInheritance(setting_key, self._active_container_stack, all_keys):
self._settings_with_inheritance_warning.append(setting_key)
# Check all the categories if any of their children have their inheritance overwritten.

View file

@ -1303,6 +1303,24 @@
}
}
},
"GenericPETCF": {
"package_info": {
"package_id": "GenericPETCF",
"package_type": "material",
"display_name": "Generic PETCF",
"description": "The generic PET-CF profile which other profiles can be based upon.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://github.com/Ultimaker/fdm_materials",
"author": {
"author_id": "Generic",
"display_name": "Generic",
"email": "materials@ultimaker.com",
"website": "https://github.com/Ultimaker/fdm_materials",
"description": "Professional 3D printing made accessible."
}
}
},
"GenericPETG": {
"package_info": {
"package_id": "GenericPETG",
@ -1657,14 +1675,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/abs",
"website": "https://ultimaker.com/materials/s-series-abs/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-abs/printing-guidelines"
}
}
},
@ -1676,14 +1694,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/breakaway",
"website": "https://ultimaker.com/materials/s-series-breakaway/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-breakaway/printing-guidelines"
}
}
},
@ -1695,14 +1713,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/abs",
"website": "https://ultimaker.com/materials/s-series-cpe/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-cpe/printing-guidelines"
}
}
},
@ -1714,14 +1732,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/cpe",
"website": "https://ultimaker.com/materials/s-series-cpe-plus/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-cpe-plus/printing-guidelines"
}
}
},
@ -1733,14 +1751,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/abs",
"website": "https://ultimaker.com/materials/s-series-nylon/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-nylon/printing-guidelines"
}
}
},
@ -1752,14 +1770,52 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/pc",
"website": "https://ultimaker.com/materials/s-series-pc/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-pc/printing-guidelines"
}
}
},
"UltimakerPETCF": {
"package_info": {
"package_id": "UltimakerPETCF",
"package_type": "material",
"display_name": "Ultimaker PETCF",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/s-series-pet-carbon-fiber/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-pet-cf/printing-guidelines"
}
}
},
"UltimakerPETG": {
"package_info": {
"package_id": "UltimakerPETG",
"package_type": "material",
"display_name": "Ultimaker PETG",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/s-series-petg/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-petg/printing-guidelines"
}
}
},
@ -1771,14 +1827,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/abs",
"website": "https://ultimaker.com/materials/s-series-pla/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-pla/printing-guidelines"
}
}
},
@ -1790,14 +1846,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/pp",
"website": "https://ultimaker.com/materials/s-series-pp/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-pp/printing-guidelines"
}
}
},
@ -1809,33 +1865,14 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/abs",
"website": "https://ultimaker.com/materials/s-series-pva/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
}
}
},
"UltimakerTPU": {
"package_info": {
"package_id": "UltimakerTPU",
"package_type": "material",
"display_name": "Ultimaker TPU 95A",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/tpu-95a",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-pva/printing-guidelines"
}
}
},
@ -1847,14 +1884,147 @@
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/products/materials/tough-pla",
"website": "https://ultimaker.com/materials/s-series-tough-pla/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/en/resources/troubleshooting/materials"
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-tough-pla/printing-guidelines"
}
}
},
"UltimakerTPU": {
"package_info": {
"package_id": "UltimakerTPU",
"package_type": "material",
"display_name": "Ultimaker TPU 95A",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "1.4.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/s-series-tpu-95a/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://ultimaker.com/in/cura/materials/ultimaker-tpu-95a/printing-guidelines"
}
}
},
"ULTIMAKERBASCFMETHOD": {
"package_info": {
"package_id": "ULTIMAKERBASCFMETHOD",
"package_type": "material",
"display_name": "Ultimaker ABS-CF",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "2.0.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/method-series-abs-carbon-fiber/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://support.ultimaker.com/s/article/How-to-print-with-Method-ABS-CF"
}
}
},
"ULTIMAKERABSRMETHOD": {
"package_info": {
"package_id": "ULTIMAKERABSRMETHOD",
"package_type": "material",
"display_name": "Ultimaker ABS-R",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "2.0.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/method-series-abs-r/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://support.ultimaker.com/s/article/How-to-print-with-Method-ABS-R"
}
}
},
"ULTIMAKERASAMETHOD": {
"package_info": {
"package_id": "ULTIMAKERASAMETHOD",
"package_type": "material",
"display_name": "Ultimaker ASA",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "2.0.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/method-series-asa/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://support.ultimaker.com/s/article/How-to-print-with-Method-ASA"
}
}
},
"ULTIMAKERNYLON12CFMETHOD": {
"package_info": {
"package_id": "ULTIMAKERNYLON12CFMETHOD",
"package_type": "material",
"display_name": "Ultimaker Nylon12 Carbon Fiber",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "2.0.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/method-series-nylon-12-carbon-fiber/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://support.ultimaker.com/s/article/How-to-print-with-Method-Nylon12-CF"
}
}
},
"ULTIMAKERRAPIDRINSEMETHOD": {
"package_info": {
"package_id": "ULTIMAKERRAPIDRINSEMETHOD",
"package_type": "material",
"display_name": "Ultimaker RapidRinse",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "2.0.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/method-series-rapidrinse/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://support.ultimaker.com/s/article/How-to-print-with-Method-RapidRinse"
}
}
},
"ULTIMAKERSR30METHOD": {
"package_info": {
"package_id": "ULTIMAKERSR30METHOD",
"package_type": "material",
"display_name": "Ultimaker SR-30",
"description": "Example package for material and quality profiles for Ultimaker materials.",
"package_version": "2.0.0",
"sdk_version": "8.6.0",
"website": "https://ultimaker.com/materials/method-series-sr-30/",
"author": {
"author_id": "UltimakerPackages",
"display_name": "UltiMaker",
"email": "materials@ultimaker.com",
"website": "https://ultimaker.com",
"description": "Professional 3D printing made accessible.",
"support_website": "https://support.ultimaker.com/s/article/How-to-print-with-Method-SR-30"
}
}
},

View file

@ -56,7 +56,7 @@ RecommendedSettingSection
width: parent.width
settingName: "support_structure"
propertyRemoveUnusedValue: false
updateAllExtruders: true
updateAllExtruders: false
defaultExtruderIndex: supportExtruderProvider.properties.value
}
},
@ -73,7 +73,12 @@ RecommendedSettingSection
settingControl: Cura.SingleSettingExtruderSelectorBar
{
extruderSettingName: "support_extruder_nr"
onSelectedIndexChanged: support.forceUpdateSettings()
onSelectedIndexChanged:
{
support.updateAllExtruders = true
support.forceUpdateSettings()
support.updateAllExtruders = false
}
}
},
RecommendedSettingItem