forked from Ultimaker/UraniumExampleToolPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
28 lines (25 loc) · 1.09 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) 2017 Ultimaker B.V.
# This example is released under the terms of the AGPLv3 or higher.
from . import ExampleTool
## Defines additional metadata for the plug-in.
#
# Tool plug-ins can have a button in the interface. This has some metadata
# that describes the tool and provides an image.
def getMetaData():
return {
"tool": {
"name": "Example Tool",
"description": "This is an example tool to illustrate to plug-in developers how tool plug-ins are created.", #Typically displayed when hovering over the tool icon.
"icon": "magnifying_glass.svg" #Displayed on the button.
}
}
## Lets Uranium know that this plug-in exists.
#
# This is called when starting the application to find out which plug-ins
# exist and what their types are. We need to return a dictionary mapping from
# strings representing plug-in types (in this case "tool") to objects that
# inherit from PluginObject.
#
# \param app The application that the plug-in needs to register with.
def register(app):
return {"tool": ExampleTool.ExampleTool()}