[core] desc.node: Add reference to containing plugin in desc.BaseNode

This commit is contained in:
Candice Bentéjac 2025-06-10 14:42:44 +02:00
parent c8671ded0e
commit 3857daa4e4
2 changed files with 4 additions and 2 deletions

View file

@ -78,8 +78,9 @@ class BaseNode(object):
outputs = [] outputs = []
size = StaticNodeSize(1) size = StaticNodeSize(1)
parallelization = None parallelization = None
documentation = '' documentation = ""
category = 'Other' category = "Other"
plugin = None
def __init__(self): def __init__(self):
super(BaseNode, self).__init__() super(BaseNode, self).__init__()

View file

@ -193,6 +193,7 @@ class NodePlugin(BaseObject):
self.plugin: Plugin = plugin self.plugin: Plugin = plugin
self.path: str = Path(getfile(nodeDesc)).resolve().as_posix() self.path: str = Path(getfile(nodeDesc)).resolve().as_posix()
self.nodeDescriptor: desc.Node = nodeDesc self.nodeDescriptor: desc.Node = nodeDesc
self.nodeDescriptor.plugin = self
self.status: NodePluginStatus = NodePluginStatus.NOT_LOADED self.status: NodePluginStatus = NodePluginStatus.NOT_LOADED
self.errors: list[str] = validateNodeDesc(nodeDesc) self.errors: list[str] = validateNodeDesc(nodeDesc)