mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Merge branch 'master' into CURA-7438_Show_cloud_connection_not_available_printer_removed_from_account
This commit is contained in:
commit
9e891c201b
10 changed files with 57 additions and 161 deletions
|
@ -112,9 +112,6 @@ class Account(QObject):
|
||||||
:param service_name: A unique name for your service, such as `plugins` or `backups`
|
:param service_name: A unique name for your service, such as `plugins` or `backups`
|
||||||
:param state: One of SyncState
|
:param state: One of SyncState
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Logger.info("Service {service} enters sync state {state}", service = service_name, state = state)
|
|
||||||
|
|
||||||
prev_state = self._sync_state
|
prev_state = self._sync_state
|
||||||
|
|
||||||
self._sync_services[service_name] = state
|
self._sync_services[service_name] = state
|
||||||
|
|
|
@ -62,7 +62,6 @@ class CloudPackageChecker(QObject):
|
||||||
|
|
||||||
def _getUserSubscribedPackages(self) -> None:
|
def _getUserSubscribedPackages(self) -> None:
|
||||||
self._application.getCuraAPI().account.setSyncState(self.SYNC_SERVICE_NAME, SyncState.SYNCING)
|
self._application.getCuraAPI().account.setSyncState(self.SYNC_SERVICE_NAME, SyncState.SYNCING)
|
||||||
Logger.debug("Requesting subscribed packages metadata from server.")
|
|
||||||
url = CloudApiModel.api_url_user_packages
|
url = CloudApiModel.api_url_user_packages
|
||||||
self._application.getHttpRequestManager().get(url,
|
self._application.getHttpRequestManager().get(url,
|
||||||
callback = self._onUserPackagesRequestFinished,
|
callback = self._onUserPackagesRequestFinished,
|
||||||
|
|
|
@ -125,9 +125,6 @@ class ClusterPrintJobStatus(BaseModel):
|
||||||
model.updateOwner(self.owner)
|
model.updateOwner(self.owner)
|
||||||
model.updateState(self.status)
|
model.updateState(self.status)
|
||||||
model.setCompatibleMachineFamilies(self.compatible_machine_families)
|
model.setCompatibleMachineFamilies(self.compatible_machine_families)
|
||||||
model.updateTimeTotal(self.time_total)
|
|
||||||
model.updateTimeElapsed(self.time_elapsed)
|
|
||||||
model.updateOwner(self.owner)
|
|
||||||
|
|
||||||
status_set_by_impediment = False
|
status_set_by_impediment = False
|
||||||
for impediment in self.impediments_to_printing:
|
for impediment in self.impediments_to_printing:
|
||||||
|
|
|
@ -54,4 +54,4 @@ class ClusterPrinterConfigurationMaterial(BaseModel):
|
||||||
"name": "Empty" if self.material == "empty" else "Unknown"
|
"name": "Empty" if self.material == "empty" else "Unknown"
|
||||||
}
|
}
|
||||||
|
|
||||||
return MaterialOutputModel(guid = self.guid, type = material_metadata["material"], brand = material_metadata["brand"], color = material_metadata["color_code"], name = material_metadata["name"])
|
return MaterialOutputModel(guid = self.guid, type = material_metadata["material"], brand = material_metadata["brand"], color = material_metadata.get("color_code", "#ffc924"), name = material_metadata["name"])
|
||||||
|
|
|
@ -21,6 +21,15 @@ def getMetaData() -> Dict[str, Any]:
|
||||||
("quality_changes", 4000011): ("quality_changes", 4000013, upgrade.upgradeInstanceContainer),
|
("quality_changes", 4000011): ("quality_changes", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
("quality", 4000011): ("quality", 4000013, upgrade.upgradeInstanceContainer),
|
("quality", 4000011): ("quality", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
("user", 4000011): ("user", 4000013, upgrade.upgradeInstanceContainer),
|
("user", 4000011): ("user", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
|
|
||||||
|
# Setting version 12 was also used during the 4.6 beta, but had no changes.
|
||||||
|
("preferences", 6000012): ("preferences", 6000013, upgrade.upgradePreferences),
|
||||||
|
("machine_stack", 4000012): ("machine_stack", 4000013, upgrade.upgradeStack),
|
||||||
|
("extruder_train", 4000012): ("extruder_train", 4000013, upgrade.upgradeStack),
|
||||||
|
("definition_changes", 4000012): ("definition_changes", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
|
("quality_changes", 4000012): ("quality_changes", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
|
("quality", 4000012): ("quality", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
|
("user", 4000012): ("user", 4000013, upgrade.upgradeInstanceContainer),
|
||||||
},
|
},
|
||||||
"sources": {
|
"sources": {
|
||||||
"preferences": {
|
"preferences": {
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
# Copyright (c) 2020 Ultimaker B.V.
|
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
|
||||||
|
|
||||||
import configparser
|
|
||||||
from typing import Tuple, List
|
|
||||||
import io
|
|
||||||
from UM.VersionUpgrade import VersionUpgrade
|
|
||||||
|
|
||||||
class VersionUpgrade46bto46(VersionUpgrade):
|
|
||||||
def getCfgVersion(self, serialised: str) -> int:
|
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
|
||||||
parser.read_string(serialised)
|
|
||||||
format_version = int(parser.get("general", "version")) # Explicitly give an exception when this fails. That means that the file format is not recognised.
|
|
||||||
setting_version = int(parser.get("metadata", "setting_version", fallback = "0"))
|
|
||||||
return format_version * 1000000 + setting_version
|
|
||||||
|
|
||||||
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
|
||||||
"""
|
|
||||||
Upgrades preferences to have the new version number.
|
|
||||||
:param serialized: The original contents of the preferences file.
|
|
||||||
:param filename: The file name of the preferences file.
|
|
||||||
:return: A list of new file names, and a list of the new contents for
|
|
||||||
those files.
|
|
||||||
"""
|
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
|
||||||
parser.read_string(serialized)
|
|
||||||
|
|
||||||
# Update version number.
|
|
||||||
parser["metadata"]["setting_version"] = "13"
|
|
||||||
|
|
||||||
result = io.StringIO()
|
|
||||||
parser.write(result)
|
|
||||||
return [filename], [result.getvalue()]
|
|
||||||
|
|
||||||
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
|
||||||
"""
|
|
||||||
Upgrades instance containers to have the new version number.
|
|
||||||
|
|
||||||
This changes the maximum deviation setting if that setting was present
|
|
||||||
in the profile.
|
|
||||||
:param serialized: The original contents of the instance container.
|
|
||||||
:param filename: The original file name of the instance container.
|
|
||||||
:return: A list of new file names, and a list of the new contents for
|
|
||||||
those files.
|
|
||||||
"""
|
|
||||||
parser = configparser.ConfigParser(interpolation = None, comment_prefixes = ())
|
|
||||||
parser.read_string(serialized)
|
|
||||||
|
|
||||||
# Update version number.
|
|
||||||
parser["metadata"]["setting_version"] = "13"
|
|
||||||
|
|
||||||
if "values" in parser:
|
|
||||||
# Maximum Deviation's effect was corrected. Previously the deviation
|
|
||||||
# ended up being only half of what the user had entered. This was
|
|
||||||
# fixed in Cura 4.7 so there we need to halve the deviation that the
|
|
||||||
# user had entered.
|
|
||||||
if "meshfix_maximum_deviation" in parser["values"]:
|
|
||||||
maximum_deviation = parser["values"]["meshfix_maximum_deviation"]
|
|
||||||
if maximum_deviation.startswith("="):
|
|
||||||
maximum_deviation = maximum_deviation[1:]
|
|
||||||
maximum_deviation = "=(" + maximum_deviation + ") / 2"
|
|
||||||
parser["values"]["meshfix_maximum_deviation"] = maximum_deviation
|
|
||||||
|
|
||||||
result = io.StringIO()
|
|
||||||
parser.write(result)
|
|
||||||
return [filename], [result.getvalue()]
|
|
||||||
|
|
||||||
def upgradeStack(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
|
||||||
"""
|
|
||||||
Upgrades stacks to have the new version number.
|
|
||||||
:param serialized: The original contents of the stack.
|
|
||||||
:param filename: The original file name of the stack.
|
|
||||||
:return: A list of new file names, and a list of the new contents for
|
|
||||||
those files.
|
|
||||||
"""
|
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
|
||||||
parser.read_string(serialized)
|
|
||||||
|
|
||||||
# Update version number.
|
|
||||||
if "metadata" not in parser:
|
|
||||||
parser["metadata"] = {}
|
|
||||||
parser["metadata"]["setting_version"] = "13"
|
|
||||||
|
|
||||||
result = io.StringIO()
|
|
||||||
parser.write(result)
|
|
||||||
return [filename], [result.getvalue()]
|
|
|
@ -1,59 +0,0 @@
|
||||||
# Copyright (c) 2020 Ultimaker B.V.
|
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
|
||||||
|
|
||||||
from typing import Any, Dict, TYPE_CHECKING
|
|
||||||
|
|
||||||
from . import VersionUpgrade46bto46
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from UM.Application import Application
|
|
||||||
|
|
||||||
upgrade = VersionUpgrade46bto46.VersionUpgrade46bto46()
|
|
||||||
|
|
||||||
def getMetaData() -> Dict[str, Any]:
|
|
||||||
return {
|
|
||||||
"version_upgrade": {
|
|
||||||
# From To Upgrade function
|
|
||||||
("preferences", 6000012): ("preferences", 6000013, upgrade.upgradePreferences),
|
|
||||||
("machine_stack", 4000012): ("machine_stack", 4000013, upgrade.upgradeStack),
|
|
||||||
("extruder_train", 4000012): ("extruder_train", 4000013, upgrade.upgradeStack),
|
|
||||||
("definition_changes", 4000012): ("definition_changes", 4000013, upgrade.upgradeInstanceContainer),
|
|
||||||
("quality_changes", 4000012): ("quality_changes", 4000013, upgrade.upgradeInstanceContainer),
|
|
||||||
("quality", 4000012): ("quality", 4000013, upgrade.upgradeInstanceContainer),
|
|
||||||
("user", 4000012): ("user", 4000013, upgrade.upgradeInstanceContainer),
|
|
||||||
},
|
|
||||||
"sources": {
|
|
||||||
"preferences": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"."}
|
|
||||||
},
|
|
||||||
"machine_stack": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"./machine_instances"}
|
|
||||||
},
|
|
||||||
"extruder_train": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"./extruders"}
|
|
||||||
},
|
|
||||||
"definition_changes": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"./definition_changes"}
|
|
||||||
},
|
|
||||||
"quality_changes": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"./quality_changes"}
|
|
||||||
},
|
|
||||||
"quality": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"./quality"}
|
|
||||||
},
|
|
||||||
"user": {
|
|
||||||
"get_version": upgrade.getCfgVersion,
|
|
||||||
"location": {"./user"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def register(app: "Application") -> Dict[str, Any]:
|
|
||||||
return {"version_upgrade": upgrade}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Version Upgrade 4.6-beta to 4.6.0",
|
|
||||||
"author": "Ultimaker B.V.",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "Upgrades configurations from Cura 4.6-BETA to Cura 4.6.",
|
|
||||||
"api": "7.2.0",
|
|
||||||
"i18n-catalog": "cura"
|
|
||||||
}
|
|
|
@ -219,6 +219,16 @@
|
||||||
"settable_per_extruder": false,
|
"settable_per_extruder": false,
|
||||||
"settable_per_meshgroup": false
|
"settable_per_meshgroup": false
|
||||||
},
|
},
|
||||||
|
"machine_always_write_active_tool":
|
||||||
|
{
|
||||||
|
"label": "Always Write Active Tool",
|
||||||
|
"description": "Write active tool after sending temp commands to inactive tool. Required for Dual Extruder printing with Smoothie or other firmware with modal tool commands.",
|
||||||
|
"default_value": false,
|
||||||
|
"type": "bool",
|
||||||
|
"settable_per_mesh": false,
|
||||||
|
"settable_per_extruder": false,
|
||||||
|
"settable_per_meshgroup": false
|
||||||
|
},
|
||||||
"machine_center_is_zero":
|
"machine_center_is_zero":
|
||||||
{
|
{
|
||||||
"label": "Is Center Origin",
|
"label": "Is Center Origin",
|
||||||
|
|
37
resources/definitions/smoothie.def.json
Normal file
37
resources/definitions/smoothie.def.json
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"name": "Smoothie Custom Printer",
|
||||||
|
"inherits": "fdmprinter",
|
||||||
|
"metadata": {
|
||||||
|
"visible": true,
|
||||||
|
"author": "grk3010",
|
||||||
|
"manufacturer": "Custom",
|
||||||
|
"file_formats": "text/x-gcode",
|
||||||
|
"machine_extruder_trains":
|
||||||
|
{
|
||||||
|
"0": "custom_extruder_1",
|
||||||
|
"1": "custom_extruder_2",
|
||||||
|
"2": "custom_extruder_3",
|
||||||
|
"3": "custom_extruder_4",
|
||||||
|
"4": "custom_extruder_5",
|
||||||
|
"5": "custom_extruder_6",
|
||||||
|
"6": "custom_extruder_7",
|
||||||
|
"7": "custom_extruder_8"
|
||||||
|
},
|
||||||
|
"first_start_actions": ["MachineSettingsAction"]
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"machine_gcode_flavor": {
|
||||||
|
"default_value": "RepRap (Marlin/Sprinter)"
|
||||||
|
},
|
||||||
|
"machine_always_write_active_tool": {
|
||||||
|
"default_value": true
|
||||||
|
},
|
||||||
|
"machine_start_gcode": {
|
||||||
|
"default_value": "G28 X0 Y0 ; Home X Y\nM375; Load Bed Leveling Grid\nG1 X300 Y275 F15000 ; Move to bed center\nM280 S3.0 ; Deploy probe pin\n## NOTE: Adjust \"ZX.XX\" after G30 to be the Z-offset (in mm) between the probe and the nozzle\n## This is how you adjust nozzle printing height!\nG30 Z1.25 ; Move down to find bed & set Z home offset\nM280 S7.0 ; Retract probe\nG1 Z15.0 F600 ; move extruder up 15mm\nT0; Activate Extruder 1"
|
||||||
|
},
|
||||||
|
"machine_end_gcode": {
|
||||||
|
"default_value": "G28 X0 Y0; Home X and Y\nM104 S0 ; turn off extruder\nM140 S0 ; turn off bed\nM107; turn off fans\nM84 ; disable motors"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue