13 lines
310 B
Python
13 lines
310 B
Python
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
|
|
|
|
def register_node(display_name: str):
|
|
def decorator(cls: type):
|
|
identifier = cls.__name__
|
|
NODE_CLASS_MAPPINGS[identifier] = cls
|
|
NODE_DISPLAY_NAME_MAPPINGS[identifier] = display_name
|
|
return cls
|
|
|
|
return decorator
|