Jump to content

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

Link to comment
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)

 

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...