mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 16:57:51 -06:00
PAP adding save dialog before filesave window
CURA-11403
This commit is contained in:
parent
ab1d1407fb
commit
ec871782c7
7 changed files with 46 additions and 49 deletions
|
@ -4,6 +4,8 @@
|
|||
import os
|
||||
|
||||
from PyQt6.QtCore import pyqtSignal, QObject
|
||||
|
||||
import UM
|
||||
from UM.FlameProfiler import pyqtSlot
|
||||
from UM.i18n import i18nCatalog
|
||||
|
||||
|
@ -44,6 +46,16 @@ class UCPDialog(QObject):
|
|||
@pyqtSlot()
|
||||
def _onAccepted(self):
|
||||
self._accepted = True
|
||||
mesh_writer = CuraApplication.getInstance().getMeshFileHandler().getWriter("3MFWriter")
|
||||
mesh_writer.custom_data = "My custom data"
|
||||
|
||||
device = CuraApplication.getInstance().getOutputDeviceManager().getOutputDevice("local_file")
|
||||
file_handler = UM.Qt.QtApplication.QtApplication.getInstance().getWorkspaceFileHandler()
|
||||
nodes = [CuraApplication.getInstance().getController().getScene().getRoot()]
|
||||
device.requestWrite(nodes, "test.3mf", ["application/x-ucp"], file_handler,
|
||||
preferred_mimetype_list="application/x-ucp")
|
||||
#TODO: update _export_model in threeMFWorkspacewriter and set is_ucp is true
|
||||
# = self._config_dialog.getModel()
|
||||
self._onFinished()
|
||||
|
||||
@pyqtSlot()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue