diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index 157aa39bbd..b369717f79 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -8,9 +8,16 @@ from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTex from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") -def show(type, value, tb): - if not hasattr(sys, "frozen"): - traceback.print_exception(type, value, tb) +debug_mode = False + +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() if not application: @@ -34,7 +41,7 @@ def show(type, value, tb): except: 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 = 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) layout.addWidget(buttons) 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")) dialog.exec_() diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 6b3554d2a5..f1d92be9b6 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -61,7 +61,7 @@ class CuraApplication(QtApplication): if not hasattr(sys, "frozen"): 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"))) @@ -125,6 +125,7 @@ class CuraApplication(QtApplication): def addCommandLineOptions(self, parser): super().addCommandLineOptions(parser) 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): self._i18n_catalog = i18nCatalog("cura"); @@ -159,15 +160,16 @@ class CuraApplication(QtApplication): self._physics = PlatformPhysics.PlatformPhysics(controller, self._volume) camera = Camera("3d", root) - camera.setPosition(Vector(-150, 150, 300)) + camera.setPosition(Vector(0, 250, 900)) camera.setPerspective(True) camera.lookAt(Vector(0, 0, 0)) + controller.getScene().setActiveCamera("3d") + + self.getController().getTool("CameraTool").setOrigin(Vector(0, 100, 0)) self._camera_animation = CameraAnimation.CameraAnimation() self._camera_animation.setCameraTool(self.getController().getTool("CameraTool")) - controller.getScene().setActiveCamera("3d") - self.showSplashMessage(self._i18n_catalog.i18nc("@info:progress", "Loading interface...")) self.setMainQml(Resources.getPath(self.ResourceTypes.QmlFiles, "Cura.qml")) @@ -251,16 +253,16 @@ class CuraApplication(QtApplication): ## Remove an object from the scene @pyqtSlot("quint64") 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 - object = Selection.getSelectedObject(0) - - if object: - if object.getParent(): - group_node = object.getParent() + if not node and object_id != 0: #Workaround for tool handles overlapping the selected object + node = Selection.getSelectedObject(0) + + if node: + if node.getParent(): + group_node = node.getParent() if not group_node.callDecoration("isGroup"): - op = RemoveSceneNodeOperation(object) + op = RemoveSceneNodeOperation(node) else: while group_node.getParent().callDecoration("isGroup"): group_node = group_node.getParent() @@ -294,10 +296,15 @@ class CuraApplication(QtApplication): @pyqtSlot("quint64") def centerObject(self, 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 node = Selection.getSelectedObject(0) + + if not node: + return + + if node.getParent() and node.getParent().callDecoration("isGroup"): + node = node.getParent() + if node: op = SetTransformOperation(node, Vector()) op.push() diff --git a/cura_app.py b/cura_app.py index 913270e895..e71fbd6515 100755 --- a/cura_app.py +++ b/cura_app.py @@ -14,9 +14,11 @@ sys.excepthook = exceptHook import cura.CuraApplication if sys.platform == "win32" and hasattr(sys, "frozen"): - from UM.Resources import Resources - sys.stdout = open(Resources.getStoragePath(Resources.Resources, "stdout.log"), "w") - sys.stderr = open(Resources.getStoragePath(Resources.Resources, "stderr.log"), "w") + import os + dirpath = os.path.expanduser("~/AppData/Local/cura/") + 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.run() diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 68d45d0b74..c612a6656c 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -335,6 +335,7 @@ class CuraEngineBackend(Backend): if self._stored_layer_data: job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data) job.start() + self._stored_layer_data = None else: self._layer_view_active = False diff --git a/plugins/CuraEngineBackend/LayerData.py b/plugins/CuraEngineBackend/LayerData.py index 6634867da2..79c4477440 100644 --- a/plugins/CuraEngineBackend/LayerData.py +++ b/plugins/CuraEngineBackend/LayerData.py @@ -107,7 +107,7 @@ class Layer(): def build(self, offset, vertices, colors, indices): result = offset for polygon in self._polygons: - if polygon._type == Polygon.InfillType or polygon._type == Polygon.SupportInfillType: + if polygon._type == Polygon.InfillType: continue polygon.build(result, vertices, colors, indices) diff --git a/resources/machines/ultimaker_original.json b/resources/machines/ultimaker_original.json index ca3ea7f3e3..6ea8d65cee 100644 --- a/resources/machines/ultimaker_original.json +++ b/resources/machines/ultimaker_original.json @@ -71,10 +71,8 @@ }, "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" - } - }, + }, - "overrides": { - "material_bed_temperature": { "visible": false } + "machine_extruder_drive_upgrade": { "default": false } } } diff --git a/resources/profiles/Low+Quality.cfg b/resources/profiles/Low+Quality.cfg index f80ef55db0..159ac5144c 100644 --- a/resources/profiles/Low+Quality.cfg +++ b/resources/profiles/Low+Quality.cfg @@ -1,6 +1,6 @@ [general] version = 1 -name = High Quality +name = Low Quality [settings] layer_height = 0.15 diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 06d144c1e7..93bc311da1 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -373,9 +373,7 @@ UM.MainWindow { id: viewModeButton property bool verticalTooltip: true - property bool activity: Printer.getPlatformActivity; - enabled: viewModeButton.activity anchors { top: parent.top; @@ -467,14 +465,27 @@ UM.MainWindow { //; Remove & re-add the general page as we want to use our own instead of uranium standard. 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 - insertPage(1, catalog.i18nc("@title:tab","View"), "view-preview", Qt.resolvedUrl("./ViewPage.qml")); + insertPage(1, catalog.i18nc("@title:tab","View"), viewPage); //Force refresh setPage(0) } + + Item { + visible: false + GeneralPage + { + id: generalPage + } + + ViewPage + { + id: viewPage + } + } } Actions diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index a8861331e0..e104651ca4 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -245,12 +245,22 @@ Rectangle { anchors.rightMargin: UM.Theme.sizes.default_margin.width width: 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]; style: ButtonStyle { background: Rectangle { 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; } } anchors.left: parent.left anchors.leftMargin: UM.Theme.sizes.save_button_text_margin.width / 2; diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index ffdf0604a0..206fb69261 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -14,7 +14,6 @@ Item { width: buttons.width; height: buttons.height property int activeY - property bool activity: Printer.getPlatformActivity; ColumnLayout { id: buttons; @@ -34,7 +33,7 @@ Item { checkable: true; checked: model.active; - enabled: base.activity + enabled: UM.Selection.hasSelection; style: UM.Theme.styles.tool_button; @@ -43,10 +42,8 @@ Item { MouseArea { anchors.fill: parent; onClicked: { - if (base.activity){ - parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); - base.activeY = parent.y - } + parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); + base.activeY = parent.y } } } diff --git a/resources/qml/WizardPages/SelectUpgradedParts.qml b/resources/qml/WizardPages/SelectUpgradedParts.qml index 167c110a70..4275defdbf 100644 --- a/resources/qml/WizardPages/SelectUpgradedParts.qml +++ b/resources/qml/WizardPages/SelectUpgradedParts.qml @@ -46,21 +46,25 @@ Item id: checkBox text: catalog.i18nc("@option:check","Extruder driver ugrades") checked: true + onClicked: UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true); } CheckBox { text: catalog.i18nc("@option:check","Heated printer bed (standard kit)") y: checkBox.height * 1 + onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) } CheckBox { text: catalog.i18nc("@option:check","Heated printer bed (self built)") y: checkBox.height * 2 + onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) } CheckBox { text: catalog.i18nc("@option:check","Dual extrusion (experimental)") y: checkBox.height * 3 + enabled: false; } } @@ -74,4 +78,4 @@ Item } ExclusiveGroup { id: printerGroup; } -} \ No newline at end of file +}