Set / setenv in pre render script

   3473   4   1
User Avatar
Member
789 posts
Joined: 4月 2020
Offline
Hello all,

I have a global var called LOD ($LOD). In my pre-render script i tried

set LOD = 1 (also tried -g)

and

setenv LOD = 1

Sometimes this works, but most of the times it does not. If I make a simple copy sop and set the number of copies to 10*$LOD, typing above statements in a texport wont change the number of copies, until I force a re-cook of the node. Unfortunately, running it in the pre-render script does not always pick it up either.

Is there a better / more reliable way to do this?

Cheers,
Koen

ps. Houdini 9.5.303 on linux
User Avatar
Member
12468 posts
Joined: 7月 2005
Offline
An alternate way is to use a ch() reference to a LOD channel, and use Takes to switch between LODs, perhaps?
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
789 posts
Joined: 4月 2020
Offline
Takes seem well suited for this task. Thanks for the hint. I really liked the global var work flow though, because I could set my working LOD at any time from the global vars dialog.
User Avatar
スタッフ
2591 posts
Joined: 7月 2005
Offline
koen
Hello all,

I have a global var called LOD ($LOD). In my pre-render script i tried

set LOD = 1 (also tried -g)

and

setenv LOD = 1

Sometimes this works, but most of the times it does not. If I make a simple copy sop and set the number of copies to 10*$LOD, typing above statements in a texport wont change the number of copies, until I force a re-cook of the node. Unfortunately, running it in the pre-render script does not always pick it up either.

Is there a better / more reliable way to do this?

Cheers,
Koen

ps. Houdini 9.5.303 on linux

With environment variables, you might have to run the “varchange” command.
User Avatar
Member
789 posts
Joined: 4月 2020
Offline
That did it,
thanks mark!
  • Quick Links