Jump to content
Krion

Convert upstream ("$HIP/../") to proper path?

Recommended Posts

Hi guys,

How do I get a proper path when using the "/../" method?
When middleclicking on such a parameter expression as 

$HIP/../flips/img.jpg

it returns this

parent_of_hipfolder/hipfolder/../flips/img.jpg          (i.e go in, and then go up again)

which Houdini seems to be able to read properly. But I want the path like this:

parent_of_hipfolder/flips/img.jpg

which I could later on use properly with the python os module, to read the data of the file. It doesn't understand the up-one-folder syntax, "/../"

Thank you!

 

Edited by Krion

Share this post


Link to post
Share on other sites

Ok wonderful,  B)

turns out this is not just an Houdini thing but a global thing,

 

import os
print os.path.abspath(path)

 

Edited by Krion

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×