Jump to content
JJ FX

Extract nodes from OTL

Recommended Posts

Hi,

I need a button that would look through my OTL for file sops, and then bring them up outside of the OTL. This would be a really sweet feature to have when developing OTLs.

I guess this needs to be done in python? However I never did anything in python in H yet. Any help how to start is most welcome! :)

Share this post


Link to post
Share on other sites
asset_node = hou.node('/obj/geo1/my_asset')
file_nodes = [c for c in asset_node.allSubChildren() if c.type().name() == 'file']
hou.copyNodesTo(file_nodes, asset_node.parent())

 

  • Like 1

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

×