Skip to content

How can I add a new socket to the NODE GROUP FUNCTION Input node from a Python script? #503

Answered by pragma37
Sdphu asked this question in Q&A
Discussion options

You must be logged in to vote

Not directly, since it's a nested function, maybe I should move it to the class scope.
You can look at the source for reference:

def add_custom_socket():

It boils down to something like this:

parameter = node.get_custom_parameters().add()
param.graph_type = node.id_data.graph_type
param.is_output = node.is_output
param.io_type = node.io_type
param.name = "My Custom Parameter"
param.parameter = "vec3"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sdphu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants