"_" in filenames

   2012   4   2
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
I have this channel expression:
$HIP/Render/$OS`chs("../../null1/shot")`.exr
which sets the name of a saved output. Now let's say `chs("../../null1/shot")` is 1 and $OS is "file". In this form, it works as expected and Houdini resolves the name as file1.exr
If I edit the path to:
$HIP/Render/$OS_`chs("../../null1/shot")`.exr
Houdini resolves the name as 1.exr instead of file_1.exr.
Is there a way to incorporate an underscore in a filename referencing the value of another parameter?

Cheers,
Ivan
User Avatar
Member
2658 posts
Joined: June 2008
Offline
Yep, that appears to be a bug.
What does work is the dash character. Try that instead.
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
899 posts
Joined: Feb. 2016
Offline
be sure to enclose variables with `` as well to avoid this kind of problems.
In your case Houdini try to resolve the non existing variable "$OS_" ....
User Avatar
Member
9417 posts
Joined: July 2007
Online
Andr
In your case Houdini try to resolve the non existing variable "$OS_"
And to avoid this ambiguity you can use {} to hint where your variable name is ending

So in your case ${OS}
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Thanks guys! ${OS} solved the issue.

Cheers,
Ivan
  • Quick Links