I want to make a custom node in Blender 4.1
This is what I have so far but it doesn’t seen to work as I can’t find it.
import bpy
# Custom node type
class MyCustomNode(bpy.types.Node):
bl_idname = "MyCustomNodeType"
bl_label = "My Custom Node"
bl_icon = "NODE"
def init(self, context):
self.inputs.new("NodeSocketFloat", "Input")
self.outputs.new("NodeSocketFloat", "Output")
# Register and unregister functions
def register():
bpy.utils.register_class(MyCustomNode)
def unregister():
bpy.utils.unregister_class(MyCustomNodeTree)
if __name__ == "__main__":
register()
Eventually I want this node to do something but I want to get this right for now.
also I could prefer the node to appear in input/constant.
If someone could help me with that. I will appreciate it.