ID 486845 - The first Camera is used when re-opening a script with an FBX/ABC file set in a Camera3 node.

Follow

Problem summary
The first Camera is used when re-opening a script with an FBX/ABC file set in a Camera3 node.

Customer reported version
13.0::13.0v4

Customer reported platform
windows10

Steps to reproduce
1) In Nuke, create a Camera3 node and enable read from file.
2) Select an FBX or ABC file with multiple cameras.
3) Select the File tab and select the node name dropdown, choosing any but the first camera.
4) Create a Checkerboard, 3d Card, and Scene nodes connected upstream, then add the Camera.
5) Create a Scanline node downstream of the Scene, then set the Camera for the Camera3 node added previously.



6) Save the script, then reload it and observe the Viewer.​

Expected behavior
The Camera3 node should display the correct Camera when loading the script.

Actual behavior
The Camera3 node displays the first camera available when reloading the script. This causes incorrect renders when using the frame server due to it using another instance of Nuke.

Workaround
When loading the script with the GUI, you can set a Pythonic callback for onScriptLoad by opening the Project Settings > Python (S in Node Graph) as follows:
for each in nuke.allNodes('Camera3'):
    each.showControlPanel()
    each.hideControlPanel()
- This unfortunately does not work when rendering with the frame server, as it does not load the control panel in a traditional manner.

Additionally, disabling the read from file knob ensures that the Camera nodes lock the previous file information before loading the script. Run the following snippet in the Script Editor, then save the comp:
for each in nuke.allNodes('Camera3'):
each['read_from_file'].setValue(False)


Reproduced by Support in:
Nuke 13.0v4 - Windows 10, macOS 10.14
Nuke 13.0v1 - Windows 10, macOS 10.14 - regression

Unable to reproduce bug in:
Nuke 12.2v8 - Windows 10, macOS 10.14

Earliest version tested
Nuke 12.2v8 - This feature did not exist before this version (Camera3 node)
Any customer specific info and messages should go below here to be added as an internal comment in TP:

    We're sorry to hear that

    Please tell us why