Nodes . Batch rename.

   3175   4   2
User Avatar
Member
47 posts
Joined: March 2015
Offline
Hey there,
I'm trying to rename multiple nodes that are placed in several directories(subnets) in the network.
For that I'm using Find and Replace in Node Names tool.
It works fine if my nodes are all placed in the same directory.
But if they are in different locations then this tool doesn't find it unless I explicitly tell where to find.
I'm probably missing something .

How do i rename all the nodes in the network, no matter where they are in the network that are matching pattern?
Or maybe for selected nodes? "Find Nodes" works perfectly in finding nodes.
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
You can use wildcards in the "In" parm in Find and Replace.
So you can write "/obj/*" and it will search everything under the obj path.
Hope this helps.

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
47 posts
Joined: March 2015
Offline
Hey Bonsak,
Thanks for reply!
Yeah that what thought it would work but it doesn't.
I have recreated simple scene with several subnets.
And Find And Replace tool is only looking in one subnet(/obj/subnetB).


I've attached the scene in case someone want's to try.
I'd really appreciate.
Image Not Found

Attachments:
findAndReplace.JPG (162.4 KB)
findAndReplace.hiplc (564.5 KB)

User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Hi
Im not sure how you can make the search recursive with wildcards but you can enter more than one path at the top:
"/obj/* /obj/*/* /obj/*/*/*"
This will find all 6 nodes in your file.
A little clunky but it works

I thought maybe you could use opchange in the text port but im not sure if opchange can change nodenames. I tried a couple of combos but couldnt figure it out
https://www.sidefx.com/docs/houdini/commands/opchange.html#examples [www.sidefx.com]

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
47 posts
Joined: March 2015
Offline
Thanks Bonsak,
I guess, python is for the rescue...
  • Quick Links