I am trying to remove output socket from custom group. Unfortunately, when i use code below only socket outside of the node is removed, but "group_output" node inside the custom group still has said output socket.
[![][1]](https://gamingcommission.club/i.sstatic.net/oeUp0.png)
File if you want to see it for yourself. Selected grouped node and run the script
The code below will try to remove first output socket of selected custom group.
import bpy
obj = bpy.context.object
mat = obj.active_material
nodes = [ n for n in mat.node_tree.nodes if n.select ]
if nodes:
for n in nodes:
n.outputs.remove(n.outputs[0])