How to use environment variables to read pictures by natron readnode

How to use environment variables to read pictures by natron readnode

Hi @ansqhd, and welcome to the Naton forum.
You can use a python expression to access these:

import os
print(os.environ['HOME'])

Thank you for your answer
Can’t use Python


I need expressions to solve this problem

It is not Python Expression, it is TCL Expression and I doubt that TCL is supported in Natron.

Hey, may be a little overdue, but probably would be helpful to someone else. You need to right click on file/then chose expression. New scripting window will pop up. There you can enter your pythone code. Assuming that you’re using environment variables, your code should look like that: os.environ[‘Work_Path’] + os.environ[‘EPISODE’] + ‘/’ + os.environ[‘SEQUENCE’] + ‘/’ + os.environ[‘SHOT’] + ‘/’ + os.environ[‘SHOT’] + ‘_’ + (‘%03d.3xr’)