mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Merge branch 'main'
This commit is contained in:
commit
b1138e12d9
5455 changed files with 203722 additions and 208531 deletions
|
@ -9,7 +9,7 @@ import pkgutil
|
|||
import sys
|
||||
from typing import Dict, Type, TYPE_CHECKING, List, Optional, cast
|
||||
|
||||
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot
|
||||
from PyQt6.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Extension import Extension
|
||||
|
|
|
@ -19,7 +19,7 @@ UM.Dialog
|
|||
height: 500 * screenScaleFactor
|
||||
minimumWidth: 400 * screenScaleFactor
|
||||
minimumHeight: 250 * screenScaleFactor
|
||||
|
||||
backgroundColor: UM.Theme.getColor("main_background")
|
||||
onVisibleChanged:
|
||||
{
|
||||
// Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack.
|
||||
|
@ -143,14 +143,12 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
UM.ColorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
|
||||
source: UM.Theme.getIcon("ChevronSingleDown")
|
||||
}
|
||||
|
@ -175,14 +173,12 @@ UM.Dialog
|
|||
}
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
UM.ColorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled")
|
||||
source: UM.Theme.getIcon("ChevronSingleUp")
|
||||
}
|
||||
|
@ -200,14 +196,12 @@ UM.Dialog
|
|||
onClicked: manager.removeScriptByIndex(index)
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
UM.ColorImage
|
||||
{
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: UM.Theme.getColor("text")
|
||||
source: UM.Theme.getIcon("Cancel")
|
||||
}
|
||||
|
@ -237,8 +231,8 @@ UM.Dialog
|
|||
onTriggered: manager.addScriptToList(modelData.toString())
|
||||
}
|
||||
|
||||
onObjectAdded: scriptsMenu.insertItem(index, object)
|
||||
onObjectRemoved: scriptsMenu.removeItem(object)
|
||||
onObjectAdded: function(index, object) { scriptsMenu.insertItem(index, object)}
|
||||
onObjectRemoved: function(index, object) { scriptsMenu.removeItem(object) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,7 +245,7 @@ UM.Dialog
|
|||
height: parent.height
|
||||
id: settingsPanel
|
||||
|
||||
Label
|
||||
UM.Label
|
||||
{
|
||||
id: scriptSpecsHeader
|
||||
text: manager.selectedScriptIndex == -1 ? catalog.i18nc("@label", "Settings") : base.activeScriptName
|
||||
|
@ -268,7 +262,6 @@ UM.Dialog
|
|||
elide: Text.ElideRight
|
||||
height: 20 * screenScaleFactor
|
||||
font: UM.Theme.getFont("large_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
|
||||
ListView
|
||||
|
@ -293,6 +286,7 @@ UM.Dialog
|
|||
{
|
||||
id: definitionsModel
|
||||
containerId: manager.selectedScriptDefinitionId
|
||||
onContainerIdChanged: definitionsModel.setAllVisible(true)
|
||||
showAll: true
|
||||
}
|
||||
|
||||
|
@ -481,7 +475,7 @@ UM.Dialog
|
|||
}
|
||||
toolTipContentAlignment: UM.Enums.ContentAlignment.AlignLeft
|
||||
onClicked: dialog.show()
|
||||
iconSource: "Script.svg"
|
||||
iconSource: Qt.resolvedUrl("Script.svg")
|
||||
fixedWidthMode: false
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Post Processing",
|
||||
"author": "Ultimaker",
|
||||
"version": "2.2.1",
|
||||
"api": 7,
|
||||
"api": 8,
|
||||
"description": "Extension that allows for user created scripts for post processing",
|
||||
"catalog": "cura"
|
||||
}
|
|
@ -2,7 +2,7 @@ import base64
|
|||
|
||||
from UM.Logger import Logger
|
||||
from cura.Snapshot import Snapshot
|
||||
from PyQt5.QtCore import QByteArray, QIODevice, QBuffer
|
||||
from PyQt6.QtCore import QByteArray, QIODevice, QBuffer
|
||||
|
||||
from ..Script import Script
|
||||
|
||||
|
@ -22,7 +22,7 @@ class CreateThumbnail(Script):
|
|||
Logger.log("d", "Encoding thumbnail image...")
|
||||
try:
|
||||
thumbnail_buffer = QBuffer()
|
||||
thumbnail_buffer.open(QBuffer.ReadWrite)
|
||||
thumbnail_buffer.open(QBuffer.OpenModeFlag.ReadWrite)
|
||||
thumbnail_image = snapshot
|
||||
thumbnail_image.save(thumbnail_buffer, "PNG")
|
||||
base64_bytes = base64.b64encode(thumbnail_buffer.data())
|
||||
|
|
|
@ -358,7 +358,7 @@ class PauseAtHeight(Script):
|
|||
|
||||
current_height = current_z - layer_0_z
|
||||
if current_height < pause_height:
|
||||
continue # Scan the enitre layer, z-changes are not always on the same/first line.
|
||||
continue # Scan the entire layer, z-changes are not always on the same/first line.
|
||||
|
||||
# Pause at layer
|
||||
else:
|
||||
|
|
|
@ -432,7 +432,7 @@ class Stretcher:
|
|||
"""
|
||||
dist_palp = self.line_width # Palpation distance to seek for a wall
|
||||
mrot = np.array([[0, -1], [1, 0]]) # Rotation matrix for a quarter turn
|
||||
for i in range(len(orig_seq)):
|
||||
for i, _ in enumerate(orig_seq):
|
||||
ibeg = i # Index of the first point of the segment
|
||||
iend = i + 1 # Index of the last point of the segment
|
||||
if iend == len(orig_seq):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue