Modify Paths LOP

   229   4   1
User Avatar
Member
1027 posts
Joined: April 2008
Offline
I am trying to use this node to change my paths which sometimes work sometimes does not, I was hoping since the documentation is very poor on examples for this how to do it properly.

I am trying to change this:

@./..\..\..\image

into this

$JOB\image

But nothing happens if I put that on the file prefix

Any tips?
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
1027 posts
Joined: April 2008
Offline
Just to be clear I am talking about how to use this guy here.

https://www.sidefx.com/docs/houdini/nodes/lop/modifypaths.html [www.sidefx.com]
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Staff
4566 posts
Joined: July 2005
Offline
Be careful with backslashes in node parameters. All string parameters are run through a parser to expand environment variables, and it treats backslashes as an escape character. So if you want to look for a backslash in an asset path, you have to double up the back slashes in the parm. Also, this node works on the un-resolved asset paths. I think USD asset resolution returns paths with backslashes, but maybe the actual asset path before being resolved is using forward slashes?

You might want to try using the python method to make sure that the asset paths being tested are what you expect (using print statements) and make sure that the node is at least capable of doing some replacement (which would narrow down the issue to how the LOP is doing the prefix test). Can you attach a simple hip file showing the issue?
User Avatar
Member
1027 posts
Joined: April 2008
Offline
Thanks for the feedback!

Yeah like you said when you have these relative path slashes it does not seem to find what to replace it actually works when you have a full path like G:/.

This a asset I got from another place in another network and when I opened the path was already like this, I am trying just to replace the parts that does not work locally.

I will try to do what you said about the double slashes see if it can find and replace it.

I will see if I can have a simple file that can show what I am trying to do.

Anyway thanks for the help for now.
Edited by mzigaib - Jan. 9, 2026 00:45:08
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
1027 posts
Joined: April 2008
Offline
Update:

I get it to work using 2 Modify Paths LOP nodes the first I could only remove the "./..\..\..\" putting "./.." on the find parameter which does not make sense to me, once the path had no slashes and points it worked as usual.

I kind of getting it to work by accident with try and error I did not see the logic on this rule maybe because its using windows paths which is always confusing.
https://vimeo.com/user2163076 [vimeo.com]
  • Quick Links