Merge branch '3.0' of github.com:Ultimaker/Cura into 3.0

This commit is contained in:
Jaime van Kessel 2017-09-26 11:36:20 +02:00
commit 28aadc1b05
2 changed files with 50 additions and 42 deletions

View File

@ -1,3 +1,6 @@
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Workspace.WorkspaceWriter import WorkspaceWriter
from UM.Application import Application
from UM.Preferences import Preferences
@ -42,9 +45,14 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
self._writeContainerToArchive(container, archive)
# Write preferences to archive
preferences_file = zipfile.ZipInfo("Cura/preferences.cfg")
original_preferences = Preferences.getInstance() #Copy only the preferences that we use to the workspace.
temp_preferences = Preferences()
for preference in {"general/visible_settings", "cura/active_mode", "cura/categories_expanded"}:
temp_preferences.addPreference(preference, None)
temp_preferences.setValue(preference, original_preferences.getValue(preference))
preferences_string = StringIO()
Preferences.getInstance().writeToFile(preferences_string)
temp_preferences.writeToFile(preferences_string)
preferences_file = zipfile.ZipInfo("Cura/preferences.cfg")
archive.writestr(preferences_file, preferences_string.getvalue())
# Save Cura version

View File

@ -3391,46 +3391,6 @@
"settable_per_mesh": false,
"settable_per_extruder": true
},
"support_skip_some_zags": {
"label": "Break Up Support In Chunks",
"description": "Skip some support line connections to make the support structure easier to break away. This setting is applicable to the Zig Zag support infill pattern.",
"type": "bool",
"default_value": false,
"enabled": "support_enable and (support_pattern == 'zigzag')",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false,
"settable_per_extruder": true,
"children": {
"support_skip_zag_per_mm": {
"label": "Support Chunk Size",
"description": "Leave out a connection between support lines once every N millimeter to make the support structure easier to break away.",
"type": "float",
"unit": "mm",
"default_value": 20,
"minimum_value": "0",
"minimum_value_warning": "support_line_distance",
"enabled": "support_enable and (support_pattern == 'zigzag') and support_skip_some_zags",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false,
"settable_per_extruder": true,
"children": {
"support_zag_skip_count": {
"label": "Support Chunk Line Count",
"description": "Skip one in every N connection lines to make the support structure easier to break away.",
"type": "int",
"default_value": 5,
"value": "round(support_skip_zag_per_mm / support_line_distance)",
"minimum_value": "1",
"minimum_value_warning": "3",
"enabled": "support_enable and (support_pattern == 'zigzag') and support_skip_some_zags",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false,
"settable_per_extruder": true
}
}
}
}
},
"support_infill_rate":
{
"label": "Support Density",
@ -5050,6 +5010,46 @@
"default_value": false,
"settable_per_mesh": true
},
"support_skip_some_zags": {
"label": "Break Up Support In Chunks",
"description": "Skip some support line connections to make the support structure easier to break away. This setting is applicable to the Zig Zag support infill pattern.",
"type": "bool",
"default_value": false,
"enabled": "support_enable and (support_pattern == 'zigzag')",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false,
"settable_per_extruder": true,
"children": {
"support_skip_zag_per_mm": {
"label": "Support Chunk Size",
"description": "Leave out a connection between support lines once every N millimeter to make the support structure easier to break away.",
"type": "float",
"unit": "mm",
"default_value": 20,
"minimum_value": "0",
"minimum_value_warning": "support_line_distance",
"enabled": "support_enable and (support_pattern == 'zigzag') and support_skip_some_zags",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false,
"settable_per_extruder": true,
"children": {
"support_zag_skip_count": {
"label": "Support Chunk Line Count",
"description": "Skip one in every N connection lines to make the support structure easier to break away.",
"type": "int",
"default_value": 5,
"value": "round(support_skip_zag_per_mm / support_line_distance)",
"minimum_value": "1",
"minimum_value_warning": "3",
"enabled": "support_enable and (support_pattern == 'zigzag') and support_skip_some_zags",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false,
"settable_per_extruder": true
}
}
}
}
},
"draft_shield_enabled":
{
"label": "Enable Draft Shield",