Jump to content
Sign in to follow this  
vhalldez

add a Node to diferent Geo Sop at same time.

Recommended Posts

Hi friends...I have more than 10024587515 Geo nodes on my SOP network...I need to add a Normal Sop on the final network of everything, I have to do it one by one? Or Houdini give me a way to do automaticly? If yes, which?

Thank you for all

Share this post


Link to post
Share on other sites

For stuff like that use Python.

Create a shelf tool with the following code:

obj = hou.node("obj/")
geos = obj.children()

for geo in geos:
    last = geo.children()[-1]
    nml = geo.createNode("normal")
    nml.setInput(0, last)
    nml.moveToGoodPosition()
    nml.setRenderFlag(1)
    nml.setDisplayFlag(1)

 

Share this post


Link to post
Share on other sites
3 hours ago, vhalldez said:

Hi friends...I have more than 10024587515 Geo nodes on my SOP network...I need to add a Normal Sop on the final network of everything, I have to do it one by one? Or Houdini give me a way to do automaticly? If yes, which?

Thank you for all

If all the geo nodes are on the same hierarchy level (e.g. "/obj/geo_nodes/geo_0","/obj/geo_nodes/geo_1","/obj/geo_nodes/geo_2",...), you can create a new "geo" node and then merge everything using an "object merge" node with the wild card syntax:

geo_nodes.jpg

Be sure to check the "Create Per-Primitive Path" Attribute. Then you can loop over the packed prims via the path and unpack, add normals, repack the geo while still keeping the same path hierarchy.

Edited by LucaScheller

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
Sign in to follow this  

×