ID 528792 - Using a beforeFrameRender callback to change a file path on a Write node does not work for the first rendered frame

Follow

Problem summary
Using a beforeFrameRender callback to change a file path on a Write node does not work for the first rendered frame.
 
Customer reported version
Nuke 13.2v5
 
Customer reported platform
N/A
 
Steps to reproduce
 
1) Open Nuke.
 
2) Create a CheckerBoard.
 
3) Create Write node downstream of the CheckerBoard.
 
4) Set the Write node's file knob to path that exists on your machine. For example: C:/temp/test.####.exr
 
5) Then set the before each frame knob (under the Python tab), so that it will change the name of the files. For example:
nuke.thisNode()["file"].setValue("C:/temp/beforeFrame.####.exr")
 
6) Execute the Write node for frames 1-10.
 
7) Check the names of the files written to disk.
 
Expected behaviour
The before each frame callback should be executed before each frame is rendered. In this case, each frame should be written out with the new file name specified in the callback, like so:
beforeFrame.0001.exr
beforeFrame.0002.exr
beforeFrame.0003.exr
etc.
 
Actual behaviour
The file name is not updated for the first frame so, in this case, the files written out are named like so:
test.0001.exr
beforeFrame.0002.exr
beforeFrame.0003.exr
etc.
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Nuke 14.0v1 - Windows 10 - Linux CentOS 7
Nuke 12.0v1 - Windows 10
Nuke 10.0v1 - Windows 10 - Linux CentOS 7
 
Earliest version tested
Nuke 10.0v1
- This issue appears to be in all tested versions of the product
 

    We're sorry to hear that

    Please tell us why