Hi, What's the best way to add variable in File node. I have files that need to be load depending of the frame. I created wrangle with list of file name. But I don't know how to "send " my names into file node name attribute. Anyone can help with this? Thx
There is a global variable called $F. This holds the current frame number. You can use the back tick character to execute hScript inside a text field, so something like this may work for you.
Type this into the Geometry File name:
$HIP/my_geo/the_file_`padzero(4,$F)`.obj
The obvious flaw is that is won't work with your array of filenames, because those files name have no common zero padding. This type of filename creation is used more often when trying to load a sequence over time.
Edited by Enivob - Nov. 30, 2021 10:35:58
Using Houdini Indie 20.0 Windows 11 64GB Ryzen 16 core. nVidia 3050RTX 8BG RAM.
Another way is to place your wrangle in detail mode and fetch the value of the attribute using a function, instead of a direct reference to the attribute name.
Type this into the Geometry File name: (adjust the path to match the path to your wrangle)
`details("/obj/geo1/File_List/","fileName")`
Notice the backticks. They are required for the function to be evaluated.
Edited by Enivob - Nov. 30, 2021 10:41:54
Using Houdini Indie 20.0 Windows 11 64GB Ryzen 16 core. nVidia 3050RTX 8BG RAM.
This type of task is also more or less what tops was made for. It might be overkill for certain trivial cases, but it scales in complexity better than using sop attributes.
It seems that after the 19.5 update, I'm no longer able to use backticks in filenames ? Pressing the name of the field doesn’t change what is rop doesn't render when I put
$JOB/render/$HIPNAME/render_`@pdg_index`.$F4.jpg
As name, but renders fine if I just put $JOB/render/$HIPNAME/render.$F4.jpg
It seems that after the 19.5 update, I'm no longer able to use backticks in filenames ? Pressing the name of the field doesn’t change what is rop doesn't render when I put
$JOB/render/$HIPNAME/render_`@pdg_index`.$F4.jpg
As name, but renders fine if I just put $JOB/render/$HIPNAME/render.$F4.jpg