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?
$\begingroup$
$\endgroup$
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
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')