Intiial work on 'Singing of Plugins and Material Packages'.

Most of the work is in Uranium right now -- especially since the plugins part is picked up first, and there are already plugins at Uraniums level.

part of CURA-6856
This commit is contained in:
Remco Burema 2019-10-24 17:31:53 +02:00
parent b9b086a8c0
commit 7780d76eb6
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
2 changed files with 7 additions and 0 deletions

View file

@ -42,6 +42,11 @@ try:
except ImportError: except ImportError:
CuraDebugMode = DEFAULT_CURA_DEBUG_MODE CuraDebugMode = DEFAULT_CURA_DEBUG_MODE
try:
from cura.CuraVersion import CuraIsEnterpriseVersion # type: ignore
except ImportError:
CuraIsEnterpriseVersion = True # (DEFAULT_CURA_BUILD_TYPE != "")
# Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for # Each release has a fixed SDK version coupled with it. It doesn't make sense to make it configurable because, for
# example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the # example Cura 3.2 with SDK version 6.1 will not work. So the SDK version is hard-coded here and left out of the
# CuraVersion.py.in template. # CuraVersion.py.in template.

View file

@ -719,6 +719,8 @@ class CuraApplication(QtApplication):
## Handle loading of all plugin types (and the backend explicitly) ## Handle loading of all plugin types (and the backend explicitly)
# \sa PluginRegistry # \sa PluginRegistry
def _loadPlugins(self) -> None: def _loadPlugins(self) -> None:
self._plugin_registry.setCheckIfTrusted(ApplicationMetadata.CuraIsEnterpriseVersion)
self._plugin_registry.addType("profile_reader", self._addProfileReader) self._plugin_registry.addType("profile_reader", self._addProfileReader)
self._plugin_registry.addType("profile_writer", self._addProfileWriter) self._plugin_registry.addType("profile_writer", self._addProfileWriter)