mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Use plugin Id instead of __file__ for XmlMaterialProfile
CURA-6255
This commit is contained in:
parent
49b93db6df
commit
128bfa987e
3 changed files with 22 additions and 2 deletions
15
plugins/XmlMaterialProfile/PluginInfo.py
Normal file
15
plugins/XmlMaterialProfile/PluginInfo.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from UM.PluginObject import PluginObject
|
||||
|
||||
|
||||
class PluginInfo(PluginObject):
|
||||
__instance = None # type: PluginInfo
|
||||
|
||||
def __init__(self, *args, **kwags):
|
||||
super().__init__(*args, **kwags)
|
||||
if PluginInfo.__instance is not None:
|
||||
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
||||
PluginInfo.__instance = self
|
||||
|
||||
@classmethod
|
||||
def getInstance(cls, *args, **kwargs) -> "USBPrinterOutputDeviceManager":
|
||||
return cls.__instance
|
Loading…
Add table
Add a link
Reference in a new issue