Problem summary
Certain types of non-3D nodes, for example LookFileAssign and ImageRead node,s do not expand environment variables in parameters specifying file paths in the same manner as other Katana nodes.
For Example:
Input into File Parameter:
'${HOME}/the/rest/of/the/path.exr'
Expected Result:
'C:/path/to/the/rest/of/the/path.exr'
Actual Result:
'${HOME}/the/rest/of/the/path.exr'
Steps to reproduce
1) Create a new environment variable in your Katana launch script to your desired folder.
For example:
set "KATANA_PROJECTS=%KATANA_PROJECTS%C:/Users/CS_SYD_PC2/Documents/Katana Projects"
2) Open Katana, Create an ImageRead node
3) In your ImageRead node's 'file' parameter, add your path.
Example:
${KATANA_PROJECTS}/ImportTest.exr
Result: The Path will not be automatically queried to the correct location
Workaround
You can use expressions to find the correct path.
To setup your file parameter as an expression, follow the steps below:
1) Right click your file Parameter
2) Select 'Expression' under Value Mode
3) Copy/Paste the following code snippet into your expression.
getenv("KATANA_PROJECTS", "") + "/ImportTest.exr"
4) Edit the environment variable and filename to your file.
Result:
Reproduced by support
This bug has been reproduced in:
Katana2.6v3 - CentOS6.9 - Windows 7
Katana2.6v1 - CentOS6.9 - Windows 7
Katana2.5v6 - CentOS6.9 - Windows 7
Katana2.5v1 - CentOS6.9 - Windows 7
Katana2.1v6 - CentOS6.9
Katana2.1v1 - CentOS6.9
Katana2.0v5 - CentOS6.9
Katana2.0v1 - CentOS6.9
Earliest version tested
- This issue appears to be in all versions of the product
Expected behaviour
Expected Result:
'C:/path/to/the/rest/of/the/path.exr'
Actual behaviour
Actual Result:
'${HOME}/the/rest/of/the/path.exr'