Showing posts with label hscript. Show all posts
Showing posts with label hscript. Show all posts

Friday 31 January 2020

Getting the name of the parent node

Sometimes you'll need the name of the parent/container node that you're working in. It might be a "car_01" or something like that.

What you need to do is trick a wrangle into using houdiniscript. We do this by creating a parameter/channel and then typing in the script we wish to run, enclosed with backticks ` `

opname is the function we want to run and .. will get us up a level.
so in the wrangle use

s@string_name=chs("whatever");

hit the create-channel-box button, then type this in it

`opname("..")`

you now have a string value of the parent node that you could strip/atoi, whatever.

Friday 9 August 2019

padzero to do file names!

/tba/CLIENT_JOBS/GREY_LDN_Zalando_Dont_Change_100713/vfx/shots/sh0033/houdini/sourceimages/backplate/backplate_guide.`padzero(3,$F3-1000)`.jpg


padzero(number of zeros, thing you want to pad) turns _guide.2.jpg into _guide.002.jpg