I have tried a few ways but am just beating my head against the wall at this point. the last method I was attempting was to have it create the output node in the selected graph, then clear the selection and select the output node along with the geometry.abc node. up to this point is successful, but getting the two to connect just doesn't want to work out. I have been able to connect standard nodes, but the error "[string "setupscript.lua"]:60: bad argument #1 to 'connectTo' (octane.node expected, got octane.nodegraph)" comes up when trying to connect it to the alembic node.
- Code: Select all
outlink = octane.node.create{ type=octane.NT_OUT_GEOMETRY, name="output", graphOwner=octane.project.getSelection()[1] }
obg = octane.project.getSelection()[1]:findItemsByName("geometry.abc")
print_table(obg)
octane.project.clearSelection()
octane.project.select(outlink)
octane.project.select(obg[1])
print_table(octane.project.getSelection())
--outlink:connectTo(octane.project.getSelection()[1],)
octane.node.connectTo(octane.project.getSelection()[1],octane.project.getSelection()[2])