From 06ec77e0120dab132a0cdfd3090d0c712b9514b2 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 15 Feb 2018 15:23:17 +0100 Subject: [PATCH 1/3] Better readability in PreviewPass --- cura/PreviewPass.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/PreviewPass.py b/cura/PreviewPass.py index b5b46f447c..de21a5dc86 100644 --- a/cura/PreviewPass.py +++ b/cura/PreviewPass.py @@ -19,13 +19,14 @@ if MYPY: # Make color brighter by normalizing it (maximum factor 2.5 brighter) -def prettier_color(l): - maximum = max(l[:3]) +# color_list is a list of 4 elements: [r, g, b, a], each element is a float 0..1 +def prettier_color(color_list): + maximum = max(color_list[:3]) if maximum > 0: factor = min(1 / maximum, 2.5) else: factor = 1.0 - return [min(i * factor, 1.0) for i in l] + return [min(i * factor, 1.0) for i in color_list] ## A render pass subclass that renders slicable objects with default parameters. From c508e77fe2e18152d4af056d7a6b835856955a44 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 15 Feb 2018 15:49:06 +0100 Subject: [PATCH 2/3] Improved the text --- cura/CrashHandler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index 4d8cb6f54d..24df54b74e 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -13,9 +13,8 @@ import ssl import urllib.request import urllib.error import shutil -import sys -from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR +from PyQt5.QtCore import QT_VERSION_STR, PYQT_VERSION_STR, QFile from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTextEdit, QGroupBox, QCheckBox, QPushButton from UM.Application import Application @@ -23,6 +22,7 @@ from UM.Logger import Logger from UM.View.GL.OpenGL import OpenGL from UM.i18n import i18nCatalog from UM.Platform import Platform +from UM.Resources import Resources catalog = i18nCatalog("cura") @@ -91,6 +91,7 @@ class CrashHandler: label = QLabel() label.setText(catalog.i18nc("@label crash message", """

A fatal error has occurred.

Unfortunately, Cura encountered an unrecoverable error during start up. It was possibly caused by some incorrect configuration files. We suggest to backup and reset your configuration.

+

Your backup can be found in your Configuration folder.

Please send us this Crash Report to fix the problem.

""")) label.setWordWrap(True) From 86b31c3a6c31632af75b8a1071831081e4c38afb Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Fri, 16 Feb 2018 09:12:42 +0100 Subject: [PATCH 3/3] Fix: in 3.0 version we did not save quality type under extruder.cfg in project for custom fdm pritners. For this case during deserializing share quality stack between global and extruder's stacks CURA-4966 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index a2e02fa9d4..8291ca3b52 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -775,6 +775,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader): # Ensure a unique ID and name stack.setMetaDataEntry("id", new_id) + # Keep same quality between extruders and global stack + stack.quality = global_stack.quality + self._container_registry.addContainer(stack) extruder_stacks_added.append(stack) containers_added.append(stack)