-
-
Notifications
You must be signed in to change notification settings - Fork 70
/
__init__.py
35 lines (27 loc) · 946 Bytes
/
__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
29
30
31
32
33
34
35
# Copyright (c) 2022 Aldo Hoeben / fieldOfView
# OctoPrintPlugin is released under the terms of the AGPLv3 or higher.
import os, json
from . import OctoPrintOutputDevicePlugin
from . import DiscoverOctoPrintAction
from . import NetworkMJPGImage
from UM.Version import Version
from UM.Application import Application
from UM.Logger import Logger
try:
from cura.ApplicationMetadata import CuraSDKVersion
except ImportError: # Cura <= 3.6
CuraSDKVersion = "6.0.0"
if CuraSDKVersion >= "8.0.0":
from PyQt6.QtQml import qmlRegisterType
else:
from PyQt5.QtQml import qmlRegisterType
def getMetaData():
return {}
def register(app):
qmlRegisterType(
NetworkMJPGImage.NetworkMJPGImage, "OctoPrintPlugin", 1, 0, "NetworkMJPGImage"
)
return {
"output_device": OctoPrintOutputDevicePlugin.OctoPrintOutputDevicePlugin(),
"machine_action": DiscoverOctoPrintAction.DiscoverOctoPrintAction(),
}