Expand __VAR__ to $VAR during cooking.

   824   0   0
User Avatar
Member
1 posts
Joined: Feb. 2019
Offline
Hi there,

We have env variables that are set during generation time via dunderscore, for example __PDG_DIR__, that are then expanded during cook time, for example $PDG_DIR.
Is it possible to extend this functionality to any env variable? For example we could have a $MAXTHREADS variable that is set on the farm, but we would need to resolve it during the cook process as any machine that picks up the PDG cook process might have a different thread number. So there might be a render command
rendercmd [file] --threads=__MAXTHREADS__
that I would want to convert to
rendercmd [file] --threads=$MAXTHREADS
during the cook.

I could go ahead and create a python script that just does this, but this seems like something that should be available out of the box?

Cheers,
Johannes
  • Quick Links