mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Added active mode to sliceinfo
CURA-3858
This commit is contained in:
parent
d69736ac34
commit
a1413e8162
1 changed files with 7 additions and 3 deletions
|
@ -62,7 +62,13 @@ class SliceInfo(Extension):
|
|||
data["time_stamp"] = time.time()
|
||||
data["schema_version"] = 0
|
||||
data["cura_version"] = Application.getInstance().getVersion()
|
||||
data["active_mode"] = "" # TODO
|
||||
|
||||
active_mode = Preferences.getInstance().getValue("cura/active_mode")
|
||||
if active_mode == 0:
|
||||
data["active_mode"] = "recommended"
|
||||
else:
|
||||
data["active_mode"] = "custom"
|
||||
|
||||
data["machine_settings_changed_by_user"] = global_container_stack.definitionChanges.getId() != "empty"
|
||||
data["language"] = Preferences.getInstance().getValue("general/language")
|
||||
data["os"] = {"type": platform.system(), "version": platform.version()}
|
||||
|
@ -117,7 +123,6 @@ class SliceInfo(Extension):
|
|||
extruder_position = node.callDecoration("getActiveExtruderPosition")
|
||||
model["extruder"] = 0 if extruder_position is None else extruder_position
|
||||
|
||||
|
||||
model_settings = dict()
|
||||
model_stack = node.callDecoration("getStack")
|
||||
if model_stack:
|
||||
|
@ -138,7 +143,6 @@ class SliceInfo(Extension):
|
|||
model_settings["infill_pattern"] = model_stack.getProperty("infill_pattern", "value")
|
||||
model_settings["gradual_infill_steps"] = model_stack.getProperty("gradual_infill_steps", "value")
|
||||
|
||||
|
||||
model["model_settings"] = model_settings
|
||||
|
||||
data["models"].append(model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue