mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Merge branch 'master' of github.com:Ultimaker/Cura into CURA-6151-Notify-updates-from-marketplace
This commit is contained in:
commit
1e02a20745
16 changed files with 35 additions and 31 deletions
|
|
@ -123,7 +123,7 @@ UM.Dialog
|
|||
UM.TooltipArea {
|
||||
Layout.fillWidth:true
|
||||
height: childrenRect.height
|
||||
text: catalog.i18nc("@info:tooltip","By default, white pixels represent high points on the mesh and black pixels represent low points on the mesh. Change this option to reverse the behavior such that black pixels represent high points on the mesh and white pixels represent low points on the mesh.")
|
||||
text: catalog.i18nc("@info:tooltip","For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.")
|
||||
Row {
|
||||
width: parent.width
|
||||
|
||||
|
|
@ -134,9 +134,9 @@ UM.Dialog
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
ComboBox {
|
||||
id: image_color_invert
|
||||
objectName: "Image_Color_Invert"
|
||||
model: [ catalog.i18nc("@item:inlistbox","Lighter is higher"), catalog.i18nc("@item:inlistbox","Darker is higher") ]
|
||||
id: lighter_is_higher
|
||||
objectName: "Lighter_Is_Higher"
|
||||
model: [ catalog.i18nc("@item:inlistbox","Darker is higher"), catalog.i18nc("@item:inlistbox","Lighter is higher") ]
|
||||
width: 180 * screenScaleFactor
|
||||
onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ class ImageReader(MeshReader):
|
|||
|
||||
def _read(self, file_name):
|
||||
size = max(self._ui.getWidth(), self._ui.getDepth())
|
||||
return self._generateSceneNode(file_name, size, self._ui.peak_height, self._ui.base_height, self._ui.smoothing, 512, self._ui.image_color_invert)
|
||||
return self._generateSceneNode(file_name, size, self._ui.peak_height, self._ui.base_height, self._ui.smoothing, 512, self._ui.lighter_is_higher)
|
||||
|
||||
def _generateSceneNode(self, file_name, xz_size, peak_height, base_height, blur_iterations, max_size, image_color_invert):
|
||||
def _generateSceneNode(self, file_name, xz_size, peak_height, base_height, blur_iterations, max_size, lighter_is_higher):
|
||||
scene_node = SceneNode()
|
||||
|
||||
mesh = MeshBuilder()
|
||||
|
|
@ -104,7 +104,7 @@ class ImageReader(MeshReader):
|
|||
|
||||
Job.yieldThread()
|
||||
|
||||
if image_color_invert:
|
||||
if not lighter_is_higher:
|
||||
height_data = 1 - height_data
|
||||
|
||||
for _ in range(0, blur_iterations):
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ class ImageReaderUI(QObject):
|
|||
self._width = self.default_width
|
||||
self._depth = self.default_depth
|
||||
|
||||
self.base_height = 1
|
||||
self.peak_height = 10
|
||||
self.base_height = 0.4
|
||||
self.peak_height = 2.5
|
||||
self.smoothing = 1
|
||||
self.image_color_invert = False;
|
||||
self.lighter_is_higher = False;
|
||||
|
||||
self._ui_lock = threading.Lock()
|
||||
self._cancelled = False
|
||||
|
|
@ -143,4 +143,4 @@ class ImageReaderUI(QObject):
|
|||
|
||||
@pyqtSlot(int)
|
||||
def onImageColorInvertChanged(self, value):
|
||||
self.image_color_invert = (value == 1)
|
||||
self.lighter_is_higher = (value == 1)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Item
|
|||
height: (parent.height * 0.4) | 0
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottomcommi
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
}
|
||||
sourceSize.height: height
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ I18N_CATALOG = i18nCatalog("cura")
|
|||
class CloudProgressMessage(Message):
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
text = I18N_CATALOG.i18nc("@info:status", "Sending data to remote cluster"),
|
||||
title = I18N_CATALOG.i18nc("@info:status", "Sending data to remote cluster"),
|
||||
title = I18N_CATALOG.i18nc("@info:status", "Sending Print Job"),
|
||||
text = I18N_CATALOG.i18nc("@info:status", "Uploading via Ultimaker Cloud"),
|
||||
progress = -1,
|
||||
lifetime = 0,
|
||||
dismissable = False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue