Search - User list
Full Version: returning a flattened file path using hscript?
Root » Technical Discussion » returning a flattened file path using hscript?
grayOlorin
Hi, I was wondering if it was possible to return a full file path in hscript?

basically I need to convert something like $HIP/../textures to cmypath/textures

thank you in advance!
edward
os.path.abspath(hou.expandString(fname))

… You will need to then replace backslashes with forward slashes if on Windows and passing the path back to Houdini
grayOlorin
Thank you Edward! I was actually kinda of hoping to be able to do this on hscript. Is there an hscript equivalent to this expression?

thank you again
edward
er, pythonexprf() ?
grayOlorin
ahhh thank you I will give it a whirl!
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