Files
Leenkx_Examples/dev_logicnode/Libraries/mynodes/blender.py
2026-05-06 17:52:45 -07:00

39 lines
1.2 KiB
Python

from bpy.types import Node
from lnx.logicnode.lnx_nodes import *
import lnx.nodes_logic
class TestNode(LnxLogicTreeNode):
"""Test node"""
bl_idname = 'LNTestNode'
bl_label = 'Test'
# Use this as a tooltip in the add node menu.
# If `bl_description` does not exist, the docstring of this node is used instead.
bl_description = 'This is a test node'
# The category in which this node is listed in the user interface
lnx_category = 'Custom Nodes'
# Set the version of this node. If you update the node's Python
# code later, increment this version so that older projects get
# updated automatically.
# See https://github.com/leenkx3d/leenkx/wiki/logicnodes#node-versioning
lnx_version = 0
def init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_output('LnxNodeSocketAction', 'Out')
def register():
"""This function is called when Leenkx loads this library."""
# Add a new category of nodes in which we will put the TestNode.
# This step is optional, you can also add nodes to Leenkx's default
# categories.
add_category('Custom Nodes', icon='EVENT_C')
# Register the TestNode
TestNode.on_register()