VEX: how to replace variable/attribute name everywhere in your script

   4290   6   0
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I made the mistake of naming a variable "windowTypeCount“ when it should be named ”typeCount" instead. I've use this variable many times in the script so I would like to know if there's a “search and replace” tool to edit my VEX code.

-Olivier
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
You can try opchange:
www.sidefx.com/docs/houdini/commands/opchange.html
http://www.racecar.no [www.racecar.no]
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Thanks for the reply.

Interesting but I don't get how this works. I just write it before my text? …or do I go in another wrangle and create a string containing all the code I want to change and run that function… is it a function?… I'm lost.

-Olivier
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Not at my machine atm so i cant give you an example, but you can run this command in the textport. There should be some examples either here om the forum or over on odforce.
http://www.racecar.no [www.racecar.no]
User Avatar
Member
8521 posts
Joined: July 2007
Online
olivierth
I would like to know if there's a “search and replace” tool to edit my VEX code
if you open expression editor (Alt+E with the cursor in your code) you'll see search & replace function
or you can directly press Ctrl+H with the cursor over your VEX code
olivierth
is it a function?… I'm lost.
it's a HScript command, you need to run it in the Textport and point to your wrangle using arguments mentioned in the help
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Ah great!

I never use the editor…

Thanks.

-Olivier
User Avatar
Member
192 posts
Joined: April 2015
Offline
Nice, on Mac CMD+H is makes the Houdini window hide.
Have to create custom hotkey yourself.
  • Quick Links