16 lines
375 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from typing import Type
from bpy.types import Node
import nodeitems_utils
nodes = []
category_items = {}
def add_node(node_class: Type[Node], category: str):
global nodes
nodes.append(node_class)
if category_items.get(category) is None:
category_items[category] = []
category_items[category].append(nodeitems_utils.NodeItem(node_class.bl_idname))