NodeCustomGroup class

I’m getting crazy trying to build a custom NodeCustom group
I want to build B like A
but inheriting from NodeCustomGroup

class TestCustomNode(NodeCustomGroup,ShaderNodeTree):
bl_idname = ‘TestCustomNodeType’
bl_label = “TEST Custom Node”
bl_icon = ‘SOUND’

def init(self, context):

    self.node_tree ='testGroup', 'ShaderNodeTree')
    group_inputs ='NodeGroupInput')
    group_inputs.location = (-350,0)'NodeSocketFloat','in_to_greater')'NodeSocketFloat','in_to_less')

    # create group outputs
    group_outputs ='NodeGroupOutput')
    group_outputs.location = (300,0)'NodeSocketFloat','out_result')

    # create three math nodes in a group
    node_add ='ShaderNodeMath')
    node_add.operation = 'ADD'
    node_add.location = (100,0)

    node_greater ='ShaderNodeMath')
    node_greater.operation = 'GREATER_THAN'
    node_greater.label = 'greater'
    node_greater.location = (-100,100)

    node_less ='ShaderNodeMath')
    node_less.operation = 'LESS_THAN'
    node_less.label = 'less'
    node_less.location = (-100,-100)

    # link nodes together[0], node_greater.outputs[0])[1], node_less.outputs[0])

    # link inputs['in_to_greater'], node_greater.inputs[0])['in_to_less'], node_less.inputs[0])


How can I build a custom NodeCustomGroup using the proper class?

You’d have to inherit from a more specialized class, like ShaderNodeCustomGroup.

you can cheat off some example nodes i have github

that’s nice thanks
How did you build something like the ShaderNodebonus_hexagon… there are many links and nodes
is it possible to visually see the nodes in some way?
or you simply create a group manually in Blender and after you code it?

Bricktricks used an early version of oslpy that compiled into addons rather than dynamically at runtime, you can find the original osl shader code for that one (and all others in bricktricks) in the examples folder.