mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Added **kwargs option to request write
CURA-3496
This commit is contained in:
parent
ea3acd6c35
commit
7993d9e95e
3 changed files with 6 additions and 3 deletions
|
@ -37,7 +37,8 @@ class RemovableDriveOutputDevice(OutputDevice):
|
||||||
# meshes.
|
# meshes.
|
||||||
# \param limit_mimetypes Should we limit the available MIME types to the
|
# \param limit_mimetypes Should we limit the available MIME types to the
|
||||||
# MIME types available to the currently active machine?
|
# MIME types available to the currently active machine?
|
||||||
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
|
#
|
||||||
|
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
|
||||||
filter_by_machine = True # This plugin is indended to be used by machine (regardless of what it was told to do)
|
filter_by_machine = True # This plugin is indended to be used by machine (regardless of what it was told to do)
|
||||||
if self._writing:
|
if self._writing:
|
||||||
raise OutputDeviceError.DeviceBusyError()
|
raise OutputDeviceError.DeviceBusyError()
|
||||||
|
|
|
@ -601,7 +601,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
# This is ignored.
|
# This is ignored.
|
||||||
# \param filter_by_machine Whether to filter MIME types by machine. This
|
# \param filter_by_machine Whether to filter MIME types by machine. This
|
||||||
# is ignored.
|
# is ignored.
|
||||||
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
|
# \param kwargs Keyword arguments.
|
||||||
|
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
|
||||||
if self._printer_state != "idle":
|
if self._printer_state != "idle":
|
||||||
self._error_message = Message(
|
self._error_message = Message(
|
||||||
i18n_catalog.i18nc("@info:status", "Unable to start a new print job, printer is busy. Current printer status is %s.") % self._printer_state)
|
i18n_catalog.i18nc("@info:status", "Unable to start a new print job, printer is busy. Current printer status is %s.") % self._printer_state)
|
||||||
|
|
|
@ -443,7 +443,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
# This is ignored.
|
# This is ignored.
|
||||||
# \param filter_by_machine Whether to filter MIME types by machine. This
|
# \param filter_by_machine Whether to filter MIME types by machine. This
|
||||||
# is ignored.
|
# is ignored.
|
||||||
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
|
# \param kwargs Keyword arguments.
|
||||||
|
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
|
||||||
container_stack = Application.getInstance().getGlobalContainerStack()
|
container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
|
||||||
if container_stack.getProperty("machine_gcode_flavor", "value") == "UltiGCode":
|
if container_stack.getProperty("machine_gcode_flavor", "value") == "UltiGCode":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue