ID 306818 - Write Node's 'before render' field will execute commands after render.

Follow

Problem summary
Adding code to the 'before render' field inside a Write Node -> Python,  executes after the render is completed.
(The Echo callback for the command will happen before the render)

If the user attempts to change the Project's 'Proxy_Scale' settings, they aren't initiated until the render is complete.

Through investigating the issues I have found out users cannot edit the scale for specific write nodes, example below:

'before render' : nuke.root()['proxy_scale'].setValue(0.5)
'after render' : nuke.root()['proxy_scale'].setValue(0.2)

Another issue is if the user attempts to turn off the proxy using Python, it executes an Echo callback, but does not change the proxy settings:

'before render : nuke.root()['proxy'].setValue(False)

Other Python commands such as print statements, or creating a Node, will execute before the render, but project settings actions wait for the render to complete.
 
Customer reported version
nuke.11.0v1

Customer reported platform
windows10

Steps to reproduce

1) Open Nuke, Read in a file.

2) Go to Nuke Project Settings (hotkey s) and change 'proxy_type' to 'Scale' and 'proxy_scale' to '0.1'

3) Enable the proxy by clicking the 'proxy' checkbox.

4) Attach a write node to the read Node.

5) In Write Node -> Python, Add the following code to the 'before render'

nuke.root()['proxy_scale'].setValue(1) 
nuke.root()['proxy'].setValue(False)

6) Render your Write node leaving proxy ticked

Result: 
  • The rendered files will be the original proxy resolution
  • The resize command will execute after the render is complete. 
  •  Nuke will print the Echo callback before the render as intended.
  • Proxy is still on (Instead of being checked off)

Workarounds

Option 1:
Switch to 'Full Resolution' before clicking render. (Hotkey Ctrl+P). 
(Proxy checkbox should be unchecked).

Option 2:
When selecting the Render Button of the Write node, untick the 'Use proxy' checkbox manually.

Option 3:
If you are using a non-GUI render, Simply Add '-f' to your command line and it will force write the Node in Full Resolution.

Reproduced by support
Nuke11.0v1 - Windows 7 - Mac10.12 - CentOS6.9
Nuke10.5v5 - Windows 7 - Mac10.12 - CentOS6.9
Nuke10.5v1 - Windows 7
Nuke10.0v6 - Windows 7
Nuke10.0v1 - Windows 7
Nuke9.0v9 - Windows 7 - Mac10.12 - CentOS6.9
Nuke9.0v1 - Windows 7
Nuke8.0v7 - Windows 7
Nuke7.0v10 - Windows 7


Earliest version tested
Nuke7.0v10 - Earliest regression we check.

Expected behaviour
Adding a Python code to 'before render' should execute BEFORE the render

Actual behaviour
Adding a Python code to 'before render' executes AFTER the render

    We're sorry to hear that

    Please tell us why