mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
removal of preference to not open the save dialog for ucp again
CURA-11403
This commit is contained in:
parent
3e23ce1c37
commit
0e70b80446
4 changed files with 3 additions and 80 deletions
|
@ -462,40 +462,5 @@ class ThreeMFWriter(MeshWriter):
|
|||
return extra_settings
|
||||
|
||||
def exportUcp(self):
|
||||
preferences = CuraApplication.getInstance().getPreferences()
|
||||
if preferences.getValue("cura/dialog_on_ucp_project_save"):
|
||||
self._config_dialog = UCPDialog()
|
||||
self._config_dialog.show()
|
||||
else:
|
||||
application = CuraApplication.getInstance()
|
||||
workspace_handler = application.getInstance().getWorkspaceFileHandler()
|
||||
|
||||
# Set the model to the workspace writer
|
||||
mesh_writer = workspace_handler.getWriter("3MFWriter")
|
||||
mesh_writer.setExportModel(SettingsExportModel())
|
||||
|
||||
# Open file dialog and write the file
|
||||
device = application.getOutputDeviceManager().getOutputDevice("local_file")
|
||||
nodes = [application.getController().getScene().getRoot()]
|
||||
|
||||
file_name = CuraApplication.getInstance().getPrintInformation().baseName
|
||||
|
||||
try:
|
||||
device.requestWrite(
|
||||
nodes,
|
||||
file_name,
|
||||
["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"],
|
||||
workspace_handler,
|
||||
preferred_mimetype_list="application/vnd.ms-package.3dmanufacturing-3dmodel+xml"
|
||||
)
|
||||
except OutputDeviceError.UserCanceledError:
|
||||
self._onRejected()
|
||||
except Exception as e:
|
||||
message = Message(
|
||||
catalog.i18nc("@info:error", "Unable to write to file: {0}", file_name),
|
||||
title=catalog.i18nc("@info:title", "Error"),
|
||||
message_type=Message.MessageType.ERROR
|
||||
)
|
||||
message.show()
|
||||
Logger.logException("e", "Unable to write to file %s: %s", file_name, e)
|
||||
self._onRejected()
|
||||
self._config_dialog = UCPDialog()
|
||||
self._config_dialog.show()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue