mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Merge branch '15.10'
* 15.10: Properly clear stored layer data Render SupportInfillType so support is rendered correctly again. Fix issues with crash handler and log file creation on Windows Bump version Make the UMO upgrade selection page work properly Update preference dialog to the changed API Disable crash handler if debug mode is not enabled Prevent crashes when centering an object Also disable output device selection when main save button is disabled Fix name of Low Quality profile Fix stdout/stderr output location so we do not output to UM but to cura
This commit is contained in:
commit
ae3705514f
10 changed files with 70 additions and 29 deletions
|
@ -8,9 +8,16 @@ from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTex
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
catalog = i18nCatalog("cura")
|
catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
def show(type, value, tb):
|
debug_mode = False
|
||||||
if not hasattr(sys, "frozen"):
|
|
||||||
traceback.print_exception(type, value, tb)
|
def show(exception_type, value, tb):
|
||||||
|
if QCoreApplication.instance() and QCoreApplication.instance().getCommandLineOption("debug-mode", False):
|
||||||
|
debug_mode = True
|
||||||
|
|
||||||
|
traceback.print_exception(exception_type, value, tb)
|
||||||
|
|
||||||
|
if not debug_mode:
|
||||||
|
return
|
||||||
|
|
||||||
application = QCoreApplication.instance()
|
application = QCoreApplication.instance()
|
||||||
if not application:
|
if not application:
|
||||||
|
@ -34,7 +41,7 @@ def show(type, value, tb):
|
||||||
except:
|
except:
|
||||||
version = "Unknown"
|
version = "Unknown"
|
||||||
|
|
||||||
trace = "".join(traceback.format_exception(type, value, tb))
|
trace = "".join(traceback.format_exception(exception_type, value, tb))
|
||||||
|
|
||||||
crash_info = "Version: {0}\nPlatform: {1}\nQt: {2}\nPyQt: {3}\n\nException:\n{4}"
|
crash_info = "Version: {0}\nPlatform: {1}\nQt: {2}\nPyQt: {3}\n\nException:\n{4}"
|
||||||
crash_info = crash_info.format(version, platform.platform(), QT_VERSION_STR, PYQT_VERSION_STR, trace)
|
crash_info = crash_info.format(version, platform.platform(), QT_VERSION_STR, PYQT_VERSION_STR, trace)
|
||||||
|
@ -44,7 +51,7 @@ def show(type, value, tb):
|
||||||
buttons = QDialogButtonBox(QDialogButtonBox.Close, dialog)
|
buttons = QDialogButtonBox(QDialogButtonBox.Close, dialog)
|
||||||
layout.addWidget(buttons)
|
layout.addWidget(buttons)
|
||||||
buttons.addButton(catalog.i18nc("@action:button", "Open Web Page"), QDialogButtonBox.HelpRole)
|
buttons.addButton(catalog.i18nc("@action:button", "Open Web Page"), QDialogButtonBox.HelpRole)
|
||||||
buttons.rejected.connect(lambda: dialog.close())
|
buttons.rejected.connect(dialog.close)
|
||||||
buttons.helpRequested.connect(lambda: webbrowser.open("http://github.com/Ultimaker/Cura/issues"))
|
buttons.helpRequested.connect(lambda: webbrowser.open("http://github.com/Ultimaker/Cura/issues"))
|
||||||
|
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
|
|
|
@ -68,7 +68,7 @@ class CuraApplication(QtApplication):
|
||||||
if not hasattr(sys, "frozen"):
|
if not hasattr(sys, "frozen"):
|
||||||
Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), ".."))
|
Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), ".."))
|
||||||
|
|
||||||
super().__init__(name = "cura", version = "15.09.85")
|
super().__init__(name = "cura", version = "15.09.90")
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
|
self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png")))
|
||||||
|
|
||||||
|
@ -132,6 +132,7 @@ class CuraApplication(QtApplication):
|
||||||
def addCommandLineOptions(self, parser):
|
def addCommandLineOptions(self, parser):
|
||||||
super().addCommandLineOptions(parser)
|
super().addCommandLineOptions(parser)
|
||||||
parser.add_argument("file", nargs="*", help="Files to load after starting the application.")
|
parser.add_argument("file", nargs="*", help="Files to load after starting the application.")
|
||||||
|
parser.add_argument("--debug", dest="debug-mode", action="store_true", default=False, help="Enable detailed crash reports.")
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self._i18n_catalog = i18nCatalog("cura");
|
self._i18n_catalog = i18nCatalog("cura");
|
||||||
|
@ -259,16 +260,16 @@ class CuraApplication(QtApplication):
|
||||||
## Remove an object from the scene
|
## Remove an object from the scene
|
||||||
@pyqtSlot("quint64")
|
@pyqtSlot("quint64")
|
||||||
def deleteObject(self, object_id):
|
def deleteObject(self, object_id):
|
||||||
object = self.getController().getScene().findObject(object_id)
|
node = self.getController().getScene().findObject(object_id)
|
||||||
|
|
||||||
if not object and object_id != 0: #Workaround for tool handles overlapping the selected object
|
if not node and object_id != 0: #Workaround for tool handles overlapping the selected object
|
||||||
object = Selection.getSelectedObject(0)
|
node = Selection.getSelectedObject(0)
|
||||||
|
|
||||||
if object:
|
if node:
|
||||||
if object.getParent():
|
if node.getParent():
|
||||||
group_node = object.getParent()
|
group_node = node.getParent()
|
||||||
if not group_node.callDecoration("isGroup"):
|
if not group_node.callDecoration("isGroup"):
|
||||||
op = RemoveSceneNodeOperation(object)
|
op = RemoveSceneNodeOperation(node)
|
||||||
else:
|
else:
|
||||||
while group_node.getParent().callDecoration("isGroup"):
|
while group_node.getParent().callDecoration("isGroup"):
|
||||||
group_node = group_node.getParent()
|
group_node = group_node.getParent()
|
||||||
|
@ -302,10 +303,15 @@ class CuraApplication(QtApplication):
|
||||||
@pyqtSlot("quint64")
|
@pyqtSlot("quint64")
|
||||||
def centerObject(self, object_id):
|
def centerObject(self, object_id):
|
||||||
node = self.getController().getScene().findObject(object_id)
|
node = self.getController().getScene().findObject(object_id)
|
||||||
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
|
||||||
node = node.getParent()
|
|
||||||
if not node and object_id != 0: #Workaround for tool handles overlapping the selected object
|
if not node and object_id != 0: #Workaround for tool handles overlapping the selected object
|
||||||
node = Selection.getSelectedObject(0)
|
node = Selection.getSelectedObject(0)
|
||||||
|
|
||||||
|
if not node:
|
||||||
|
return
|
||||||
|
|
||||||
|
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
||||||
|
node = node.getParent()
|
||||||
|
|
||||||
if node:
|
if node:
|
||||||
op = SetTransformOperation(node, Vector())
|
op = SetTransformOperation(node, Vector())
|
||||||
op.push()
|
op.push()
|
||||||
|
|
|
@ -107,7 +107,7 @@ class Layer():
|
||||||
def build(self, offset, vertices, colors, indices):
|
def build(self, offset, vertices, colors, indices):
|
||||||
result = offset
|
result = offset
|
||||||
for polygon in self._polygons:
|
for polygon in self._polygons:
|
||||||
if polygon._type == Polygon.InfillType or polygon._type == Polygon.SupportInfillType or polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType:
|
if polygon._type == Polygon.InfillType or polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
polygon.build(result, vertices, colors, indices)
|
polygon.build(result, vertices, colors, indices)
|
||||||
|
|
|
@ -14,9 +14,11 @@ sys.excepthook = exceptHook
|
||||||
import cura.CuraApplication
|
import cura.CuraApplication
|
||||||
|
|
||||||
if sys.platform == "win32" and hasattr(sys, "frozen"):
|
if sys.platform == "win32" and hasattr(sys, "frozen"):
|
||||||
from UM.Resources import Resources
|
import os
|
||||||
sys.stdout = open(Resources.getStoragePath(Resources.Resources, "stdout.log"), "w")
|
dirpath = os.path.expanduser("~/AppData/Local/cura/")
|
||||||
sys.stderr = open(Resources.getStoragePath(Resources.Resources, "stderr.log"), "w")
|
os.makedirs(dirpath, exist_ok = True)
|
||||||
|
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
|
||||||
|
sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")
|
||||||
|
|
||||||
app = cura.CuraApplication.CuraApplication.getInstance()
|
app = cura.CuraApplication.CuraApplication.getInstance()
|
||||||
app.run()
|
app.run()
|
||||||
|
|
|
@ -335,6 +335,7 @@ class CuraEngineBackend(Backend):
|
||||||
if self._stored_layer_data:
|
if self._stored_layer_data:
|
||||||
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data)
|
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data)
|
||||||
job.start()
|
job.start()
|
||||||
|
self._stored_layer_data = None
|
||||||
else:
|
else:
|
||||||
self._layer_view_active = False
|
self._layer_view_active = False
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,8 @@
|
||||||
},
|
},
|
||||||
"machine_end_gcode": {
|
"machine_end_gcode": {
|
||||||
"default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning"
|
"default": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning"
|
||||||
}
|
},
|
||||||
},
|
|
||||||
|
|
||||||
"overrides": {
|
"machine_extruder_drive_upgrade": { "default": false }
|
||||||
"material_bed_temperature": { "visible": false }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[general]
|
[general]
|
||||||
version = 1
|
version = 1
|
||||||
name = High Quality
|
name = Low Quality
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
layer_height = 0.15
|
layer_height = 0.15
|
||||||
|
|
|
@ -465,14 +465,27 @@ UM.MainWindow
|
||||||
{
|
{
|
||||||
//; Remove & re-add the general page as we want to use our own instead of uranium standard.
|
//; Remove & re-add the general page as we want to use our own instead of uranium standard.
|
||||||
removePage(0);
|
removePage(0);
|
||||||
insertPage(0, catalog.i18nc("@title:tab","General") , "" , Qt.resolvedUrl("./GeneralPage.qml"));
|
insertPage(0, catalog.i18nc("@title:tab","General"), generalPage);
|
||||||
|
|
||||||
//: View preferences page title
|
//: View preferences page title
|
||||||
insertPage(1, catalog.i18nc("@title:tab","View"), "view-preview", Qt.resolvedUrl("./ViewPage.qml"));
|
insertPage(1, catalog.i18nc("@title:tab","View"), viewPage);
|
||||||
|
|
||||||
//Force refresh
|
//Force refresh
|
||||||
setPage(0)
|
setPage(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
visible: false
|
||||||
|
GeneralPage
|
||||||
|
{
|
||||||
|
id: generalPage
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewPage
|
||||||
|
{
|
||||||
|
id: viewPage
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Actions
|
Actions
|
||||||
|
|
|
@ -245,12 +245,22 @@ Rectangle {
|
||||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width
|
anchors.rightMargin: UM.Theme.sizes.default_margin.width
|
||||||
width: UM.Theme.sizes.save_button_save_to_button.height
|
width: UM.Theme.sizes.save_button_save_to_button.height
|
||||||
height: UM.Theme.sizes.save_button_save_to_button.height
|
height: UM.Theme.sizes.save_button_save_to_button.height
|
||||||
|
enabled: base.progress > 0.99 && base.activity == true
|
||||||
//iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName];
|
//iconSource: UM.Theme.icons[UM.OutputDeviceManager.activeDeviceIconName];
|
||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: deviceSelectionIcon
|
id: deviceSelectionIcon
|
||||||
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
color: {
|
||||||
|
if(!control.enabled){
|
||||||
|
return UM.Theme.colors.button;
|
||||||
|
}
|
||||||
|
else if(control.enabled && control.hovered) {
|
||||||
|
return UM.Theme.colors.load_save_button_hover
|
||||||
|
} else {
|
||||||
|
return UM.Theme.colors.load_save_button
|
||||||
|
}
|
||||||
|
}
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2;
|
anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2;
|
||||||
|
|
|
@ -46,21 +46,25 @@ Item
|
||||||
id: checkBox
|
id: checkBox
|
||||||
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
||||||
checked: true
|
checked: true
|
||||||
|
onClicked: UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
|
||||||
}
|
}
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
||||||
y: checkBox.height * 1
|
y: checkBox.height * 1
|
||||||
|
onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
||||||
}
|
}
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
||||||
y: checkBox.height * 2
|
y: checkBox.height * 2
|
||||||
|
onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
||||||
}
|
}
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@option:check","Dual extrusion (experimental)")
|
text: catalog.i18nc("@option:check","Dual extrusion (experimental)")
|
||||||
y: checkBox.height * 3
|
y: checkBox.height * 3
|
||||||
|
enabled: false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,4 +78,4 @@ Item
|
||||||
}
|
}
|
||||||
|
|
||||||
ExclusiveGroup { id: printerGroup; }
|
ExclusiveGroup { id: printerGroup; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue