I have been going nuts here to see what was going on when I was trying to generate file names to load in the IMG context
Here is what I have in the File's file channel
if os.path.isdir(finalfolder): return finalcomppath else: os.mkdir(finalfolder) return finalcomppath
The problem is that the file node throws an error that goes like this
Can not find “……/myfile_*.exr”
Now I do not know why the node does not respect the python evalutation and tries to pad or glob the file name like this. As you see it is trying to replace the numbers with glob pattern. I tried different name numbers combinations and it tried to glob the numbers in the names in all cases.
The file name would be something like this “myfile_1.exr”…“”myfile_20.exr" . The finalcomppath is correct which is like finalfolder\myfile_1.exr
I am using the same code pretty much in the mantra node and there is no problem there, it renders and saves the image.
The weird thing is that the string in the file name channel is evaluated/rendered correctly. Somehow internally it is doing that pattern replacement.