Search - User list
Full Version: Modify Paths LOP
Root » Solaris and Karma » Modify Paths LOP
mzigaib
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?
mzigaib
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]
mtucker
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?
mzigaib
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.
mzigaib
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.
mzigaib
Update and question:

If I have

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

And I put on prefix search

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

I can replace every character until 'image' which helps a lot

But how can I replace using this node the "\" to "/" aka normal Linux slashes

I tried every combination I could think of and no success

Any tips?

Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB