mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Merge branch 'master' into CURA-7376_full_of_spiders
This commit is contained in:
commit
c8901e3b92
9 changed files with 96 additions and 59 deletions
|
@ -76,8 +76,8 @@ class PreviewPass(RenderPass):
|
|||
Logger.error("Unable to compile shader program: overhang.shader")
|
||||
|
||||
if not self._non_printing_shader:
|
||||
self._non_printing_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "transparent_object.shader"))
|
||||
if self._non_printing_shader:
|
||||
self._non_printing_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "transparent_object.shader"))
|
||||
self._non_printing_shader.setUniformValue("u_diffuseColor", [0.5, 0.5, 0.5, 0.5])
|
||||
self._non_printing_shader.setUniformValue("u_opacity", 0.6)
|
||||
|
||||
|
|
|
@ -1212,9 +1212,8 @@ class MachineManager(QObject):
|
|||
return
|
||||
|
||||
if not available_quality_types:
|
||||
if global_stack.qualityChanges == empty_quality_changes_container:
|
||||
Logger.log("i", "No available quality types found, setting all qualities to empty (Not Supported).")
|
||||
self._setEmptyQuality()
|
||||
Logger.log("i", "No available quality types found, setting all qualities to empty (Not Supported).")
|
||||
self._setEmptyQuality()
|
||||
return
|
||||
|
||||
if current_quality_type in available_quality_types:
|
||||
|
|
|
@ -32,6 +32,7 @@ class SimulationPass(RenderPass):
|
|||
self._current_shader = None # This shader will be the shadow or the normal depending if the user wants to see the paths or the layers
|
||||
self._tool_handle_shader = None
|
||||
self._nozzle_shader = None
|
||||
self._disabled_shader = None
|
||||
self._old_current_layer = 0
|
||||
self._old_current_path = 0
|
||||
self._switching_layers = True # It tracks when the user is moving the layers' slider
|
||||
|
@ -90,9 +91,17 @@ class SimulationPass(RenderPass):
|
|||
self._nozzle_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "color.shader"))
|
||||
self._nozzle_shader.setUniformValue("u_color", Color(*Application.getInstance().getTheme().getColor("layerview_nozzle").getRgb()))
|
||||
|
||||
if not self._disabled_shader:
|
||||
self._disabled_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "striped.shader"))
|
||||
self._disabled_shader.setUniformValue("u_diffuseColor1", Color(*Application.getInstance().getTheme().getColor("model_unslicable").getRgb()))
|
||||
self._disabled_shader.setUniformValue("u_diffuseColor2", Color(*Application.getInstance().getTheme().getColor("model_unslicable_alt").getRgb()))
|
||||
self._disabled_shader.setUniformValue("u_width", 50.0)
|
||||
self._disabled_shader.setUniformValue("u_opacity", 0.6)
|
||||
|
||||
self.bind()
|
||||
|
||||
tool_handle_batch = RenderBatch(self._tool_handle_shader, type = RenderBatch.RenderType.Overlay, backface_cull = True)
|
||||
disabled_batch = RenderBatch(self._disabled_shader)
|
||||
head_position = None # Indicates the current position of the print head
|
||||
nozzle_node = None
|
||||
|
||||
|
@ -105,6 +114,9 @@ class SimulationPass(RenderPass):
|
|||
nozzle_node = node
|
||||
nozzle_node.setVisible(False)
|
||||
|
||||
elif getattr(node, "_outside_buildarea", False) and isinstance(node, SceneNode) and node.getMeshData() and node.isVisible():
|
||||
disabled_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData())
|
||||
|
||||
elif isinstance(node, SceneNode) and (node.getMeshData() or node.callDecoration("isBlockSlicing")) and node.isVisible():
|
||||
layer_data = node.callDecoration("getLayerData")
|
||||
if not layer_data:
|
||||
|
@ -183,6 +195,9 @@ class SimulationPass(RenderPass):
|
|||
nozzle_batch.addItem(nozzle_node.getWorldTransformation(), mesh = nozzle_node.getMeshData())
|
||||
nozzle_batch.render(self._scene.getActiveCamera())
|
||||
|
||||
if len(disabled_batch.items) > 0:
|
||||
disabled_batch.render(self._scene.getActiveCamera())
|
||||
|
||||
# Render toolhandles on top of the layerview
|
||||
if len(tool_handle_batch.items) > 0:
|
||||
tool_handle_batch.render(self._scene.getActiveCamera())
|
||||
|
|
|
@ -282,12 +282,13 @@ Item
|
|||
enabled: !cameraButton.enabled
|
||||
}
|
||||
|
||||
/* //Warning message is commented out because it's factually incorrect. Fix CURA-7637 to allow camera connections via cloud.
|
||||
MonitorInfoBlurb
|
||||
{
|
||||
id: cameraDisabledInfo
|
||||
text: catalog.i18nc("@info", "The webcam is not available because you are monitoring a cloud printer.")
|
||||
target: cameraButton
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Divider
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Copyright (c) 2020 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import os
|
||||
from typing import Dict, List, Optional, Set
|
||||
|
||||
|
@ -37,7 +38,7 @@ class CloudOutputDeviceManager:
|
|||
SYNC_SERVICE_NAME = "CloudOutputDeviceManager"
|
||||
|
||||
# The translation catalog for this device.
|
||||
I18N_CATALOG = i18nCatalog("cura")
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
# Signal emitted when the list of discovered devices changed.
|
||||
discoveredDevicesChanged = Signal()
|
||||
|
@ -221,7 +222,7 @@ class CloudOutputDeviceManager:
|
|||
)
|
||||
|
||||
message = Message(
|
||||
title = self.I18N_CATALOG.i18ncp(
|
||||
title = self.i18n_catalog.i18ncp(
|
||||
"info:status",
|
||||
"New printer detected from your Ultimaker account",
|
||||
"New printers detected from your Ultimaker account",
|
||||
|
@ -234,11 +235,7 @@ class CloudOutputDeviceManager:
|
|||
message.show()
|
||||
|
||||
for idx, device in enumerate(new_devices):
|
||||
message_text = self.I18N_CATALOG.i18nc(
|
||||
"info:status", "Adding printer {} ({}) from your account",
|
||||
device.name,
|
||||
device.printerTypeName
|
||||
)
|
||||
message_text = self.i18n_catalog.i18nc("info:status Filled in with printer name and printer model.", "Adding printer {name} ({model}) from your account").format(name = device.name, model = device.printerTypeName)
|
||||
message.setText(message_text)
|
||||
if len(new_devices) > 1:
|
||||
message.setProgress((idx / len(new_devices)) * 100)
|
||||
|
@ -255,16 +252,12 @@ class CloudOutputDeviceManager:
|
|||
if len(new_devices) > max_disp_devices:
|
||||
num_hidden = len(new_devices) - max_disp_devices
|
||||
device_name_list = ["<li>{} ({})</li>".format(device.name, device.printerTypeName) for device in new_devices[0:max_disp_devices]]
|
||||
device_name_list.append(self.I18N_CATALOG.i18nc("info:hidden list items", "<li>... and {} others</li>", num_hidden))
|
||||
device_name_list.append("<li>" + self.i18n_catalog.i18ncp("info:{0} gets replaced by a number of printers", "... and {0} other", "... and {0} others", num_hidden) + "</li>")
|
||||
device_names = "".join(device_name_list)
|
||||
else:
|
||||
device_names = "".join(["<li>{} ({})</li>".format(device.name, device.printerTypeName) for device in new_devices])
|
||||
|
||||
message_text = self.I18N_CATALOG.i18nc(
|
||||
"info:status",
|
||||
"Printers added from Digital Factory:<ul>{}</ul>",
|
||||
device_names
|
||||
)
|
||||
message_text = self.i18n_catalog.i18nc("info:status", "Printers added from Digital Factory:") + "<ul>" + device_names + "</ul>"
|
||||
message.setText(message_text)
|
||||
|
||||
def _updateOutdatedMachine(self, outdated_machine: GlobalStack, new_cloud_output_device: CloudOutputDevice) -> None:
|
||||
|
@ -318,7 +311,7 @@ class CloudOutputDeviceManager:
|
|||
|
||||
# Generate message
|
||||
self._removed_printers_message = Message(
|
||||
title = self.I18N_CATALOG.i18ncp(
|
||||
title = self.i18n_catalog.i18ncp(
|
||||
"info:status",
|
||||
"A cloud connection is not available for a printer",
|
||||
"A cloud connection is not available for some printers",
|
||||
|
@ -326,27 +319,27 @@ class CloudOutputDeviceManager:
|
|||
)
|
||||
)
|
||||
device_names = "".join(["<li>{} ({})</li>".format(self._um_cloud_printers[device].name, self._um_cloud_printers[device].definition.name) for device in self.reported_device_ids])
|
||||
message_text = self.I18N_CATALOG.i18ncp(
|
||||
message_text = self.i18n_catalog.i18ncp(
|
||||
"info:status",
|
||||
"This printer is not linked to the Digital Factory:",
|
||||
"These printers are not linked to the Digital Factory:",
|
||||
len(self.reported_device_ids)
|
||||
)
|
||||
message_text += "<br/><ul>{}</ul><br/>".format(device_names)
|
||||
digital_factory_string = self.I18N_CATALOG.i18nc("info:name", "Ultimaker Digital Factory")
|
||||
digital_factory_string = self.i18n_catalog.i18nc("info:name", "Ultimaker Digital Factory")
|
||||
|
||||
message_text += self.I18N_CATALOG.i18nc(
|
||||
message_text += self.i18n_catalog.i18nc(
|
||||
"info:status",
|
||||
"To establish a connection, please visit the {website_link}".format(website_link = "<a href='https://digitalfactory.ultimaker.com/'>{}</a>.".format(digital_factory_string))
|
||||
)
|
||||
self._removed_printers_message.setText(message_text)
|
||||
self._removed_printers_message.addAction("keep_printer_configurations_action",
|
||||
name = self.I18N_CATALOG.i18nc("@action:button", "Keep printer configurations"),
|
||||
name = self.i18n_catalog.i18nc("@action:button", "Keep printer configurations"),
|
||||
icon = "",
|
||||
description = "Keep cloud printers in Ultimaker Cura when not connected to your account.",
|
||||
button_align = Message.ActionButtonAlignment.ALIGN_RIGHT)
|
||||
self._removed_printers_message.addAction("remove_printers_action",
|
||||
name = self.I18N_CATALOG.i18nc("@action:button", "Remove printers"),
|
||||
name = self.i18n_catalog.i18nc("@action:button", "Remove printers"),
|
||||
icon = "",
|
||||
description = "Remove cloud printer(s) which aren't linked to your account.",
|
||||
button_style = Message.ActionButtonStyle.SECONDARY,
|
||||
|
@ -423,16 +416,11 @@ class CloudOutputDeviceManager:
|
|||
machine.setMetaDataEntry(self.META_HOST_GUID, device.clusterData.host_guid)
|
||||
machine.setMetaDataEntry("group_name", device.name)
|
||||
machine.setMetaDataEntry("group_size", device.clusterSize)
|
||||
digital_factory_string = self.I18N_CATALOG.i18nc("info:name", "Ultimaker Digital Factory")
|
||||
digital_factory_link = "<a href='https://digitalfactory.ultimaker.com/'>{}</a>".format(digital_factory_string)
|
||||
removal_warning_string = self.I18N_CATALOG.i18nc(
|
||||
"@label ({printer_name} is replaced with the name of the printer",
|
||||
"{printer_name} will be removed until the next account sync. <br> To remove {printer_name} permanently, "
|
||||
"visit {digital_factory_link}"
|
||||
"<br><br>Are you sure you want to remove {printer_name} temporarily?".format(printer_name = device.name,
|
||||
digital_factory_link = digital_factory_link)
|
||||
)
|
||||
|
||||
digital_factory_string = self.i18n_catalog.i18nc("info:name", "Ultimaker Digital Factory")
|
||||
digital_factory_link = "<a href='https://digitalfactory.ultimaker.com/'>{digital_factory_string}</a>".format(digital_factory_string = digital_factory_string)
|
||||
removal_warning_string = self.i18n_catalog.i18nc("@message {printer_name} is replaced with the name of the printer", "{printer_name} will be removed until the next account sync.").format(printer_name = device.name) \
|
||||
+ "<br>" + self.i18n_catalog.i18nc("@message {printer_name} is replaced with the name of the printer", "To remove {printer_name} permanently, visit {digital_factory_link}").format(printer_name = device.name, digital_factory_link = digital_factory_link) \
|
||||
+ "<br><br>" + self.i18n_catalog.i18nc("@message {printer_name} is replaced with the name of the printer", "Are you sure you want to remove {printer_name} temporarily?").format(printer_name = device.name)
|
||||
machine.setMetaDataEntry("removal_warning", removal_warning_string)
|
||||
machine.addConfiguredConnectionType(device.connectionType.value)
|
||||
|
||||
|
@ -469,10 +457,15 @@ class CloudOutputDeviceManager:
|
|||
remove_printers_ids = {self._um_cloud_printers[i].getId() for i in self.reported_device_ids}
|
||||
all_ids = {m.getId() for m in CuraApplication.getInstance().getContainerRegistry().findContainerStacks(type = "machine")}
|
||||
|
||||
question_title = self.I18N_CATALOG.i18nc("@title:window", "Remove printers?")
|
||||
question_content = self.I18N_CATALOG.i18nc("@label", "You are about to remove {} printer(s) from Cura. This action cannot be undone. \nAre you sure you want to continue?".format(len(remove_printers_ids)))
|
||||
question_title = self.i18n_catalog.i18nc("@title:window", "Remove printers?")
|
||||
question_content = self.i18n_catalog.i18ncp(
|
||||
"@label",
|
||||
"You are about to remove {num_printers} printer from Cura. This action cannot be undone.\nAre you sure you want to continue?",
|
||||
"You are about to remove {num_printers} printers from Cura. This action cannot be undone.\nAre you sure you want to continue?",
|
||||
len(remove_printers_ids)
|
||||
).format(num_printers = len(remove_printers_ids))
|
||||
if remove_printers_ids == all_ids:
|
||||
question_content = self.I18N_CATALOG.i18nc("@label", "You are about to remove all printers from Cura. This action cannot be undone. \nAre you sure you want to continue?")
|
||||
question_content = self.i18n_catalog.i18nc("@label", "You are about to remove all printers from Cura. This action cannot be undone.\nAre you sure you want to continue?")
|
||||
result = QMessageBox.question(None, question_title, question_content)
|
||||
if result == QMessageBox.No:
|
||||
return
|
||||
|
|
|
@ -6152,7 +6152,7 @@
|
|||
"infill_mesh_order":
|
||||
{
|
||||
"label": "Mesh Processing Rank",
|
||||
"description": "Determines the priority of this mesh when considering overlapping volumes. Areas where multiple meshes reside will be won by the lower rank mesh. An infill mesh with a higher order will modify the infill of infill meshes with lower order and normal meshes.",
|
||||
"description": "Determines the priority of this mesh when considering multiple overlapping infill meshes. Areas where multiple infill meshes overlap will take on the settings of the mesh with the lowest rank. An infill mesh with a higher order will modify the infill of infill meshes with lower order and normal meshes.",
|
||||
"default_value": 0,
|
||||
"value": "1 if infill_mesh else 0",
|
||||
"minimum_value_warning": "1",
|
||||
|
|
|
@ -1488,12 +1488,12 @@ msgstr "다림질 라인 사이의 거리."
|
|||
#: fdmprinter.def.json
|
||||
msgctxt "ironing_flow label"
|
||||
msgid "Ironing Flow"
|
||||
msgstr "다림질 과정"
|
||||
msgstr "다림질 압출량"
|
||||
|
||||
#: fdmprinter.def.json
|
||||
msgctxt "ironing_flow description"
|
||||
msgid "The amount of material, relative to a normal skin line, to extrude during ironing. Keeping the nozzle filled helps filling some of the crevices of the top surface, but too much results in overextrusion and blips on the side of the surface."
|
||||
msgstr "다림질하는 동안 기본 스킨 라인을 기준으로 한 재료의 양. 노즐을 가득 채우면 윗면의 틈새가 채워서포트만 표면의 과도한 압출과 틈이 너무 많이 생깁니다."
|
||||
msgstr "다림질하는 동안 기본 스킨 라인을 기준으로 한 재료의 압출량. 노즐을 가득 채우면 윗면의 틈새를 채울 수 있지만 표면에 과도한 압출과 필라멘트 덩어리가 생길 수 있습니다."
|
||||
|
||||
#: fdmprinter.def.json
|
||||
msgctxt "ironing_inset label"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2020 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
|
@ -11,7 +11,7 @@ UM.PointingRectangle
|
|||
id: base
|
||||
property real sourceWidth: 0
|
||||
width: UM.Theme.getSize("tooltip").width
|
||||
height: label.height + UM.Theme.getSize("tooltip_margins").height * 2
|
||||
height: textScroll.height + UM.Theme.getSize("tooltip_margins").height * 2
|
||||
color: UM.Theme.getColor("tooltip")
|
||||
|
||||
arrowSize: UM.Theme.getSize("default_arrow").width
|
||||
|
@ -59,22 +59,48 @@ UM.PointingRectangle
|
|||
base.opacity = 0;
|
||||
}
|
||||
|
||||
Label
|
||||
MouseArea
|
||||
{
|
||||
id: label;
|
||||
anchors
|
||||
enabled: parent.opacity > 0
|
||||
visible: enabled
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
hoverEnabled: true
|
||||
onHoveredChanged:
|
||||
{
|
||||
top: parent.top;
|
||||
topMargin: UM.Theme.getSize("tooltip_margins").height;
|
||||
left: parent.left;
|
||||
leftMargin: UM.Theme.getSize("tooltip_margins").width;
|
||||
right: parent.right;
|
||||
rightMargin: UM.Theme.getSize("tooltip_margins").width;
|
||||
if(containsMouse && base.opacity > 0)
|
||||
{
|
||||
base.show(Qt.point(target.x - 1, target.y - UM.Theme.getSize("tooltip_arrow_margins").height / 2)); //Same arrow position as before.
|
||||
}
|
||||
else
|
||||
{
|
||||
base.hide();
|
||||
}
|
||||
}
|
||||
|
||||
ScrollView
|
||||
{
|
||||
id: textScroll
|
||||
width: parent.width
|
||||
height: Math.min(label.height, base.parent.height)
|
||||
|
||||
ScrollBar.horizontal: ScrollBar {
|
||||
active: false //Only allow vertical scrolling. We should grow vertically only, but due to how the label is positioned it allocates space in the ScrollView horizontally.
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: label
|
||||
x: UM.Theme.getSize("tooltip_margins").width
|
||||
y: UM.Theme.getSize("tooltip_margins").height
|
||||
width: base.width - UM.Theme.getSize("tooltip_margins").width * 2
|
||||
|
||||
wrapMode: Text.Wrap;
|
||||
textFormat: Text.RichText
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("tooltip_text");
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
wrapMode: Text.Wrap;
|
||||
textFormat: Text.RichText
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("tooltip_text");
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ fragment =
|
|||
uniform mediump vec4 u_diffuseColor1;
|
||||
uniform mediump vec4 u_diffuseColor2;
|
||||
uniform mediump vec4 u_specularColor;
|
||||
uniform mediump float u_opacity;
|
||||
uniform highp vec3 u_lightPosition;
|
||||
uniform mediump float u_shininess;
|
||||
uniform highp vec3 u_viewPosition;
|
||||
|
@ -65,7 +66,7 @@ fragment =
|
|||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||
|
||||
gl_FragColor = finalColor;
|
||||
gl_FragColor.a = 1.0;
|
||||
gl_FragColor.a = u_opacity;
|
||||
}
|
||||
|
||||
vertex41core =
|
||||
|
@ -100,6 +101,7 @@ fragment41core =
|
|||
uniform mediump vec4 u_diffuseColor1;
|
||||
uniform mediump vec4 u_diffuseColor2;
|
||||
uniform mediump vec4 u_specularColor;
|
||||
uniform mediump float u_opacity;
|
||||
uniform highp vec3 u_lightPosition;
|
||||
uniform mediump float u_shininess;
|
||||
uniform highp vec3 u_viewPosition;
|
||||
|
@ -138,7 +140,7 @@ fragment41core =
|
|||
finalColor += pow(NdotR, u_shininess) * u_specularColor;
|
||||
|
||||
frag_color = finalColor;
|
||||
frag_color.a = 1.0;
|
||||
frag_color.a = u_opacity;
|
||||
}
|
||||
|
||||
[defaults]
|
||||
|
@ -146,6 +148,7 @@ u_ambientColor = [0.3, 0.3, 0.3, 1.0]
|
|||
u_diffuseColor1 = [1.0, 0.5, 0.5, 1.0]
|
||||
u_diffuseColor2 = [0.5, 0.5, 0.5, 1.0]
|
||||
u_specularColor = [0.4, 0.4, 0.4, 1.0]
|
||||
u_opacity = 1.0
|
||||
u_shininess = 20.0
|
||||
u_width = 5.0
|
||||
u_vertical_stripes = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue