Merge branch 'master' into feature-backup-manager

This commit is contained in:
ChrisTerBeke 2018-05-18 17:27:05 +02:00
commit 15ef3d1d10
5 changed files with 6 additions and 14 deletions

View file

@ -160,11 +160,11 @@ class MaterialManager(QObject):
key_data.append(root_material_metadata.get(key)) key_data.append(root_material_metadata.get(key))
key_data = tuple(key_data) key_data = tuple(key_data)
# If the key_data doesn't exist, no matter if the material is read only... # If the key_data doesn't exist, it doesn't matter if the material is read only...
if key_data not in material_group_dict: if key_data not in material_group_dict:
material_group_dict[key_data] = dict() material_group_dict[key_data] = dict()
else: else:
# ...but if key_data exists, we just overrite it if the material is read only, otherwise we skip it # ...but if key_data exists, we just overwrite it if the material is read only, otherwise we skip it
if not machine_node.is_read_only: if not machine_node.is_read_only:
continue continue
approximate_diameter = root_material_metadata.get("approximate_diameter") approximate_diameter = root_material_metadata.get("approximate_diameter")

View file

@ -1,7 +1,6 @@
# Copyright (c) 2018 Ultimaker B.V. # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher. # Cura is released under the terms of the LGPLv3 or higher.
from UM.Application import Application from UM.Application import Application
from UM.Math.Color import Color
from UM.Resources import Resources from UM.Resources import Resources
from UM.View.RenderPass import RenderPass from UM.View.RenderPass import RenderPass
@ -74,7 +73,6 @@ class PreviewPass(RenderPass):
# Create batches to be rendered # Create batches to be rendered
batch = RenderBatch(self._shader) batch = RenderBatch(self._shader)
batch_non_printing = RenderBatch(self._non_printing_shader, type = RenderBatch.RenderType.Transparent)
batch_support_mesh = RenderBatch(self._support_mesh_shader) batch_support_mesh = RenderBatch(self._support_mesh_shader)
# Fill up the batch with objects that can be sliced. ` # Fill up the batch with objects that can be sliced. `
@ -83,7 +81,7 @@ class PreviewPass(RenderPass):
per_mesh_stack = node.callDecoration("getStack") per_mesh_stack = node.callDecoration("getStack")
if node.callDecoration("isNonPrintingMesh"): if node.callDecoration("isNonPrintingMesh"):
# Non printing mesh # Non printing mesh
batch_non_printing.addItem(node.getWorldTransformation(), node.getMeshData(), uniforms = {}) continue
elif per_mesh_stack is not None and per_mesh_stack.getProperty("support_mesh", "value") == True: elif per_mesh_stack is not None and per_mesh_stack.getProperty("support_mesh", "value") == True:
# Support mesh # Support mesh
uniforms = {} uniforms = {}
@ -112,7 +110,6 @@ class PreviewPass(RenderPass):
batch.render(render_camera) batch.render(render_camera)
batch_support_mesh.render(render_camera) batch_support_mesh.render(render_camera)
batch_non_printing.render(render_camera)
self.release() self.release()

View file

@ -6,13 +6,10 @@ from PyQt5 import QtCore
from PyQt5.QtGui import QImage from PyQt5.QtGui import QImage
from cura.PreviewPass import PreviewPass from cura.PreviewPass import PreviewPass
from cura.Scene import ConvexHullNode
from UM.Application import Application from UM.Application import Application
from UM.Math.AxisAlignedBox import AxisAlignedBox
from UM.Math.Matrix import Matrix from UM.Math.Matrix import Matrix
from UM.Math.Vector import Vector from UM.Math.Vector import Vector
from UM.Mesh.MeshData import transformVertices
from UM.Scene.Camera import Camera from UM.Scene.Camera import Camera
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
@ -51,7 +48,7 @@ class Snapshot:
# determine zoom and look at # determine zoom and look at
bbox = None bbox = None
for node in DepthFirstIterator(root): for node in DepthFirstIterator(root):
if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible(): if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible() and not node.callDecoration("isNonPrintingMesh"):
if bbox is None: if bbox is None:
bbox = node.getBoundingBox() bbox = node.getBoundingBox()
else: else:

View file

@ -15,7 +15,7 @@ Column
Label Label
{ {
id: heading id: heading
text: toolbox.viewCategory == "material" ? catalog.i18nc("@label", "Maker Choices") : catalog.i18nc("@label", "Community Plugins") text: toolbox.viewCategory == "material" ? catalog.i18nc("@label", "Community contributions") : catalog.i18nc("@label", "Community plugins")
width: parent.width width: parent.width
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")

View file

@ -354,12 +354,10 @@ Cura.MachineAction
onShowDialog: onShowDialog:
{ {
printerKey = key; printerKey = key;
addressText = address; addressText = address;
manualPrinterDialog.show();
addressField.selectAll(); addressField.selectAll();
addressField.focus = true; addressField.focus = true;
manualPrinterDialog.show();
} }
onAccepted: onAccepted: