3
$\begingroup$

I couldn't find an interface like the node tree interface where I can add sockets using interface.new_socket(). In the documentation, the only method I found for adding sockets is simulation_zone_item_add(), which seems different from what the Python script provided by the document suggests. Can I achieve this by invoking some new() function?

$\endgroup$

1 Answer 1

3
$\begingroup$

You need to access state_items on the simulation output node:

>>> tree = D.node_groups['Geometry Nodes']
>>> sim_out = tree.nodes['Simulation Output']
>>> sim_out.state_items.new('INT', 'i')
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .