mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Collect user modified settings
- Collect user modified settings in user_changes and quality_changes - Update example data
This commit is contained in:
parent
22ccf074f3
commit
1dd0d794df
2 changed files with 17 additions and 0 deletions
|
@ -95,6 +95,20 @@ class SliceInfo(QObject, Extension):
|
||||||
def setSendSliceInfo(self, enabled: bool):
|
def setSendSliceInfo(self, enabled: bool):
|
||||||
Application.getInstance().getPreferences().setValue("info/send_slice_info", enabled)
|
Application.getInstance().getPreferences().setValue("info/send_slice_info", enabled)
|
||||||
|
|
||||||
|
def _getUserModifiedSettingKeys(self) -> list:
|
||||||
|
application = Application.getInstance()
|
||||||
|
machine_manager = application.getMachineManager()
|
||||||
|
global_stack = machine_manager.activeMachine
|
||||||
|
|
||||||
|
user_modified_setting_keys = set()
|
||||||
|
|
||||||
|
for stack in [global_stack] + list(global_stack.extruders.values()):
|
||||||
|
# Get all settings in user_changes and quality_changes
|
||||||
|
all_keys = stack.userChanges.getAllKeys() | stack.qualityChanges.getAllKeys()
|
||||||
|
user_modified_setting_keys |= all_keys
|
||||||
|
|
||||||
|
return list(sorted(user_modified_setting_keys))
|
||||||
|
|
||||||
def _onWriteStarted(self, output_device):
|
def _onWriteStarted(self, output_device):
|
||||||
try:
|
try:
|
||||||
if not Application.getInstance().getPreferences().getValue("info/send_slice_info"):
|
if not Application.getInstance().getPreferences().getValue("info/send_slice_info"):
|
||||||
|
@ -164,6 +178,8 @@ class SliceInfo(QObject, Extension):
|
||||||
|
|
||||||
data["quality_profile"] = global_stack.quality.getMetaData().get("quality_type")
|
data["quality_profile"] = global_stack.quality.getMetaData().get("quality_type")
|
||||||
|
|
||||||
|
data["user_modified_setting_keys"] = ",".join(self._getUserModifiedSettingKeys())
|
||||||
|
|
||||||
data["models"] = []
|
data["models"] = []
|
||||||
# Listing all files placed on the build plate
|
# Listing all files placed on the build plate
|
||||||
for node in DepthFirstIterator(application.getController().getScene().getRoot()):
|
for node in DepthFirstIterator(application.getController().getScene().getRoot()):
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quality_profile": "fast",
|
"quality_profile": "fast",
|
||||||
|
"user_modified_setting_keys": "layer_height,wall_line_width,infill_sparse_density",
|
||||||
"models": [
|
"models": [
|
||||||
{
|
{
|
||||||
"hash": "b72789b9beb5366dff20b1cf501020c3d4d4df7dc2295ecd0fddd0a6436df070",
|
"hash": "b72789b9beb5366dff20b1cf501020c3d4d4df7dc2295ecd0fddd0a6436df070",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue