accessing environment variables from within cal-files

Hi all,

is there a way to access environment variables from within a cal-file? I would like to use a brightfunc with a cal-file that returns a value depending on an environment variable set by a script. I want the evaluation based on that variable to happen at render time, so I cannot use sed to modify my files directly. I tried to use command expansion (third line of my brightdata as ! echo "1 $ALPHA"), but that does not work. I could generate the whole modifier definition by an echo command (!echo "void brightdata myBDModifier … 1 $ALPHA), but that would become an ugly scene file…

Cheers, Lars.

Hi Lars,

I'd go with your "ugly" solution. It's not so bad in the scheme of things -- I've used echo myself more than once in a scene file....

Cheers,
-Greg

···

From: "Lars O. Grobe" <[email protected]>
Date: May 4, 2012 7:30:47 AM PDT

Hi all,

is there a way to access environment variables from within a cal-file? I would like to use a brightfunc with a cal-file that returns a value depending on an environment variable set by a script. I want the evaluation based on that variable to happen at render time, so I cannot use sed to modify my files directly. I tried to use command expansion (third line of my brightdata as ! echo "1 $ALPHA"), but that does not work. I could generate the whole modifier definition by an echo command (!echo "void brightdata myBDModifier … 1 $ALPHA), but that would become an ugly scene file…

Cheers, Lars.