I have this code:
import bpy
import random
max_number = 5
nodes = []
with_fade_out = 2
try:
tree = bpy.context.scene.node_tree
except:
bpy.context.scene.use_nodes = True
group = bpy.data.node_groups.new(type="CompositorNodeTree", name="MultipleSwitch")
group.inputs.new("NodeSocketRGBA", "Default Image")
for i in range(0,max_number):
group.inputs.new("NodeSocketRGBA", ("Variation - " + str(i+1)))
input_node = group.nodes.new("NodeGroupInput")
input_node.location = (-150, 0)
group.outputs.new("NodeSocketRGBA", "Out")
output_node = group.nodes.new("NodeGroupOutput")
output_node.location = (max_number*100 + 100, 0)
group_node = tree.nodes.new("CompositorNodeGroup")
group_node.node_tree = group
But When I Run this script, It doesn't show upo any input or output, but if I put NodeSocketFloat instead of NodeSocketRGBA, it show up all the input.