ID 588637 - Getting camera matrices from a CameraOp in a different view does not work with new NDK functions, projectionModeMatrixAt and worldTransformAt

Follow

Problem summary
Getting camera matrices from a CameraOp in a different view does not work with new NDK functions, projectionModeMatrixAt and worldTransformAt

 

projectionModeMatrixAt and worldTransformAt NDK functions were added to the CameraOp class in Nuke 15.1 to allow matrices to be retrieved for specific OutputContexts.

When an OutputContext with a different frame from the current one is specified, the correct matrix is returned.

However when an OutputContext with a different view from the current one is specified, the correct matrix is not returned. Instead, the matrix for the main view will alway be returned.

 

Customer reported version
nuke.15.1v3

 

Customer reported platform
windows11

 

Steps to reproduce

 

As this is a bug with the C++ API this will require a C++ plugin to test properly. The attached CameraMatrixTest source for a simple plugin that can

be built for 15.1+, then follow the steps below:

  1. Launch Nuke
  2. Add a new view from Edit> Project Settings> Views tab
  3. Add a Camera (classic) node
  4. Split the "focus" knob on the Camera node's Projection tab.
  5. Make sure the focus values for the two views are different (this should be enough to yield different matrix results in the next step).
  6. Add a CameraMatrixTest node and connect it to the Camera node. Check focus and projection matrix values in the terminal

 

Expected behaviour
The projectionModeMatrixAt function in the C++ NDK should return the projection matrix for the specified view.

 

Actual behaviour
The projectionModeMatrixAt function in the C++ NDK always returns the projection matrix for the main view.

 

Workaround
You can use the old single-precision projectionAt() method instead

 

Reproduced by support

This bug has been reproduced by the developers:
Nuke 15.1v3 - Windows

 

Earliest version tested
Nuke 15.1 - This feature did not exist before this version

    We're sorry to hear that

    Please tell us why