ID 158508 - Using a 'nuke.setValue()' command in an 'nuke.undo()' function doesn't work.

Follow

Problem summary
When creating a 'nuke.Undo()' object, If a user uses 'node.setValue' in their script, it will not save to the 'Undo' List.

This means if a user-made script moves Node positions, when they use the Undo function they will not return to their original position.

Customer reported version
nuke.n/a

Customer reported platform

Steps to reproduce

1) Open Nuke, Create a few Nodes

2) Select all the nodes

3) Paste the following code and execute it, in your Script Editor:

undo = nuke.Undo()undo.begin("test")b=nuke.nodes.Blur()x,y = 100,0nodes = nuke.selectedNodes()if nodes:    for node in nodes:        node['xpos'].setValue(node.xpos()+x)        node['ypos'].setValue(node.ypos()+y)nuke.delete(b)undo.end()print undo.undoDescribeFully(1)print undo.undoSize()
Result 1:  There will be no 'setValue' data printed in the Undo description printed in the Script Editor. BUT there will be Create & Delete data of the blur node created.

4) Press the Undo key in the Node Graph Area (Shortcut : Ctrl + Z OR Edit -> Undo)

Result 2: The selected Nodes will not return to their original position.

Workaround
Unknown. Try to avoid using the 'setValue' command in an 'Undo' object.

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 - Mac10.12 - CentOS6.9
Tested in Nuke 6.0v7 -> 7.0v6 on OSX/Windows

Earliest version tested
Nuke 6.0v7

Expected behaviour
When using the 'Undo' Key (After launching the function), The 'setValue' commands should revert to their original.

Actual behaviour
Any 'setValue' commands in an 'Undo' object are not returned to their original values when called.

    We're sorry to hear that

    Please tell us why