Jump to content
pixelpicnic

Create Reference Copy With Python

Recommended Posts

Hello Hive Mind,
Long time reader, first time poster....
I was wondering if anyone knows a pythonic way of creating a reference copy of a node?
More or less the equivalent of hscript opcp -c.

It's a little more complicated than a copy and iterate over parms, since certain parm types need different copy/reference methods.

Thanks in advance!

Share this post


Link to post
Share on other sites

I believe hou.Node.copyItems(items, channel_reference_originals=True) is what you're looking for. This won't reference any nested operators in a subnetwork, though.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, toadstorm said:

I believe hou.Node.copyItems(items, channel_reference_originals=True) is what you're looking for. This won't reference any nested operators in a subnetwork, though.

That's the ticket!

Cheers!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×