diff options
author | Jaime van Kessel <nallath@gmail.com> | 2016-06-17 16:45:10 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2016-06-17 16:45:10 +0300 |
commit | af3e4e3a15fb116a4dc2cc47b575ddfc6657788a (patch) | |
tree | df313ca051fc161520fd1132b595e75c87cfbf48 /cura/MachineActionManager.py | |
parent | 4beec2982e8386b5ce0606ee2ef9541c14ae7fd6 (diff) |
Machine actions can now be used as a plugin type for Cura
CURA-1385
Diffstat (limited to 'cura/MachineActionManager.py')
-rw-r--r-- | cura/MachineActionManager.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cura/MachineActionManager.py b/cura/MachineActionManager.py index 37993e252f..d2ebfc6799 100644 --- a/cura/MachineActionManager.py +++ b/cura/MachineActionManager.py @@ -2,6 +2,8 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.Logger import Logger +from UM.PluginRegistry import PluginRegistry # So MachineAction can be added as plugin type + ## Raised when trying to add an unknown machine action as a required action class UnknownMachineAction(Exception): @@ -27,6 +29,8 @@ class MachineActionManager: ## Dict of all actions that need to be done when first added by machine reference. self._first_start_actions = {} + PluginRegistry.addType("machine_action", self.addMachineAction) + ## Add a required action to a machine # Raises an exception when the action is not recognised. def addRequiredAction(self, machine, action_key): |