diff options
author | Ghostkeeper <rubend@tutanota.com> | 2022-06-15 15:37:39 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2022-06-15 15:37:39 +0300 |
commit | 20607b219ac8df4fb59c431a24e5572aa59564c7 (patch) | |
tree | 7f5a24669c7e3119589b65d0c799509bc70c529a /plugins/RemovableDriveOutputDevice | |
parent | 68fde8d051c6226fbf7da0b60d808a759cf04f78 (diff) | |
parent | d7c24f8bea29fd161b600a2a78751cda06af163a (diff) |
Merge branch 'split-removable-output-write-function' of https://github.com/zxc8027/Cura into zxc8027-split-removable-output-write-function
Diffstat (limited to 'plugins/RemovableDriveOutputDevice')
-rw-r--r-- | plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index 067773d988..e93473c25f 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -80,6 +80,18 @@ class RemovableDriveOutputDevice(OutputDevice): if extension: # Not empty string. extension = "." + extension file_name = os.path.join(self.getId(), file_name + extension) + self._performWrite(file_name, preferred_format, writer, nodes) + + def _performWrite(self, file_name, preferred_format, writer, nodes): + """Writes the specified nodes to the removable drive. This is split from + requestWrite to allow interception in other plugins. See Ultimaker/Cura#10917. + + :param file_name: File path to write to. + :param preferred_format: Preferred file format to write to. + :param writer: Writer for writing to the file. + :param nodes: A collection of scene nodes that should be written to the + file. + """ try: Logger.log("d", "Writing to %s", file_name) |