mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Merge branch 'master' into CURA-5595_add_custom_button_to_menu
This commit is contained in:
commit
a1bc2f3ebf
89 changed files with 1210 additions and 436 deletions
|
|
@ -4,15 +4,20 @@ from PyQt5.QtCore import QSize
|
|||
|
||||
from UM.Application import Application
|
||||
|
||||
|
||||
class CameraImageProvider(QQuickImageProvider):
|
||||
def __init__(self):
|
||||
QQuickImageProvider.__init__(self, QQuickImageProvider.Image)
|
||||
super().__init__(QQuickImageProvider.Image)
|
||||
|
||||
## Request a new image.
|
||||
def requestImage(self, id, size):
|
||||
for output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices():
|
||||
try:
|
||||
return output_device.activePrinter.camera.getImage(), QSize(15, 15)
|
||||
image = output_device.activePrinter.camera.getImage()
|
||||
if image.isNull():
|
||||
image = QImage()
|
||||
|
||||
return image, QSize(15, 15)
|
||||
except AttributeError:
|
||||
pass
|
||||
return QImage(), QSize(15, 15)
|
||||
return QImage(), QSize(15, 15)
|
||||
|
|
|
|||
|
|
@ -229,6 +229,8 @@ class CuraApplication(QtApplication):
|
|||
|
||||
self._sidebar_custom_menu_items = [] # type: list # Keeps list of custom menu items for the side bar
|
||||
|
||||
self._plugins_loaded = False
|
||||
|
||||
# Backups
|
||||
self._auto_save = None
|
||||
self._save_data_enabled = True
|
||||
|
|
@ -1609,8 +1611,7 @@ class CuraApplication(QtApplication):
|
|||
self._currently_loading_files.remove(file_name)
|
||||
|
||||
self.fileLoaded.emit(file_name)
|
||||
arrange_objects_on_load = not self.getPreferences().getValue("cura/use_multi_build_plate")
|
||||
target_build_plate = self.getMultiBuildPlateModel().activeBuildPlate if arrange_objects_on_load else -1
|
||||
target_build_plate = self.getMultiBuildPlateModel().activeBuildPlate
|
||||
|
||||
root = self.getController().getScene().getRoot()
|
||||
fixed_nodes = []
|
||||
|
|
@ -1664,7 +1665,7 @@ class CuraApplication(QtApplication):
|
|||
if not child.getDecorator(ConvexHullDecorator):
|
||||
child.addDecorator(ConvexHullDecorator())
|
||||
|
||||
if file_extension != "3mf" and arrange_objects_on_load:
|
||||
if file_extension != "3mf":
|
||||
if node.callDecoration("isSliceable"):
|
||||
# Only check position if it's not already blatantly obvious that it won't fit.
|
||||
if node.getBoundingBox() is None or self._volume.getBoundingBox() is None or node.getBoundingBox().width < self._volume.getBoundingBox().width or node.getBoundingBox().depth < self._volume.getBoundingBox().depth:
|
||||
|
|
|
|||
|
|
@ -267,6 +267,7 @@ class PrintInformation(QObject):
|
|||
new_active_build_plate = self._multi_build_plate_model.activeBuildPlate
|
||||
if new_active_build_plate != self._active_build_plate:
|
||||
self._active_build_plate = new_active_build_plate
|
||||
self._updateJobName()
|
||||
|
||||
self._initVariablesWithBuildPlate(self._active_build_plate)
|
||||
|
||||
|
|
@ -320,6 +321,15 @@ class PrintInformation(QObject):
|
|||
else:
|
||||
self._job_name = base_name
|
||||
|
||||
# In case there are several buildplates, a suffix is attached
|
||||
if self._multi_build_plate_model.maxBuildPlate > 0:
|
||||
connector = "_#"
|
||||
suffix = connector + str(self._active_build_plate + 1)
|
||||
if connector in self._job_name:
|
||||
self._job_name = self._job_name.split(connector)[0] # get the real name
|
||||
if self._active_build_plate != 0:
|
||||
self._job_name += suffix
|
||||
|
||||
self.jobNameChanged.emit()
|
||||
|
||||
@pyqtSlot(str)
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class PrinterOutputModel(QObject):
|
|||
|
||||
@pyqtProperty(QVariant, notify = headPositionChanged)
|
||||
def headPosition(self):
|
||||
return {"x": self._head_position.x, "y": self._head_position.y, "z": self.head_position_z}
|
||||
return {"x": self._head_position.x, "y": self._head_position.y, "z": self.head_position.z}
|
||||
|
||||
def updateHeadPosition(self, x, y, z):
|
||||
if self._head_position.x != x or self._head_position.y != y or self._head_position.z != z:
|
||||
|
|
|
|||
|
|
@ -1455,9 +1455,14 @@ class MachineManager(QObject):
|
|||
if quality_group.node_for_global is None:
|
||||
Logger.log("e", "Could not set quality group [%s] because it has no node_for_global", str(quality_group))
|
||||
return
|
||||
# This is not changing the quality for the active machine !!!!!!!!
|
||||
global_stack.quality = quality_group.node_for_global.getContainer()
|
||||
for extruder_nr, extruder_stack in global_stack.extruders.items():
|
||||
extruder_stack.quality = quality_group.nodes_for_extruders[extruder_nr].getContainer()
|
||||
quality_container = self._empty_quality_container
|
||||
if extruder_nr in quality_group.nodes_for_extruders:
|
||||
container = quality_group.nodes_for_extruders[extruder_nr].getContainer()
|
||||
quality_container = container if container is not None else quality_container
|
||||
extruder_stack.quality = quality_container
|
||||
return
|
||||
|
||||
self.blurSettings.emit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue