ID 459036 - Setting expressions on a knob can return a different value to what is displayed in the Curve Editor

Follow

Problem summary
Setting expressions on a knob can return a different value to what is displayed in the Curve Editor.

 

Customer reported version
Nuke 12.2v3

 

Customer reported platform
CentOS 7

 

Steps to reproduce

 

1) Open Nuke.

 

2) Create a Grade node. 

 

3) Right click the 'blackpoint' and choose Add Expression...

 

4) Paste the following expression into the dialog that appears, then press OK:

 int(sin(2 * pi* (frame+-4.0)/16.0)+1)

 

5) Open the Curve Editor and go to frame 8. Notice that the blackpoint knob value is 2, but the Curve Editor is displaying a value of 1

 

Expected behaviour
The values in the Curve Editor and on the knob should be the same.

 

Actual behaviour
The expression returns a different value in the Curve Editor, compared to the blackpoint knob value.

 

Workaround
In this example, you could use the TCL ternary operator '?' to always return a value of 1 instead of 2. For example:

int(sin(2 * pi* (frame+-4.0)/16.0)+1) >= 1 ? 1:0  

However, this may not work in all cases.

 

Reproduced by support

This bug has been reproduced in:
Nuke 12.2v3 - Windows 10 - macOS 10.13 (High Sierra) - Linux CentOS 7

Nuke 12.0v1 - Windows 10

Nuke 11.0v1 - Windows 10

Nuke 10.0v1 - Windows 10

Nuke 9.0v1 - Windows 10

Nuke 8.0v1 - Windows 10 - macOS 10.13 (High Sierra)

 

Earliest version tested
Nuke 8.0v1
- This issue appears to be in all versions of the product

 

 

    We're sorry to hear that

    Please tell us why