Camera and Date variables in filenames and file paths.

   1779   2   1
User Avatar
Member
5 posts
Joined: Jan. 2019
Offline
Hi,

I'm trying to work out how to get some variables into my output filenames and file paths. The most useful to me would be a time and date variable, and a camera variable.

Ideally something like:

$JOB/render/$DATE/$CAMERA/output.$CAMERA.$DATE.exr but obviously replacing $DATE and $CAMERA with something that works.

I have seen HScript expressions like: `opname(chs(“camera”))` but this just renders blank for me.

Any help much appreciated!

Rory.
User Avatar
Member
648 posts
Joined: July 2005
Offline
date:
`system("date +%y%m%d")`

camera name (works here with H18.0.487):
`opname(chs("camera"))`

eg:
$HIP/pic/`system("date +%y%m%d")`_`opname(chs("camera"))`_${OS}/`system("date +%y%m%d")`_`opname(chs("camera"))`_${OS}.$F4.pic
= /home/cpb/Desktop/test/pic/200617_cam1_Mantra1/200617_cam1_Mantra1.0150.pic
Edited by anon_user_40689665 - June 17, 2020 04:39:13
User Avatar
Member
5 posts
Joined: Jan. 2019
Offline
This is great, thanks! I realise the reason it wasn't working was I was in a Redshift ROP and the camera name parameter is different. Changed to RS_renderCamera and it works.

Thanks again,

Rory.
Edited by rorymclean3D - June 17, 2020 23:43:00
  • Quick Links