Problem summary
Nuke doesn't correctly load a script correctly when a callback contains nuke.thisNode(), resulting in any Nodes after a Gizmo not loading, when there is a node with an invalid expression before it or the node the gizmo is expression linked to is created after the gizmo.
Customer reported version
nuke.n/a
Customer reported platform
centos6
Steps to reproduce
1) Add the attached gizmo and menu.py to your .nuke directory
2) Open the attached Nuke script, it will saying Nothing is named "whatever" and will not load any nodes past the dudGizmo. Below left shows what the script should be, below right shows the result
Other repro steps:
1) Launch Nuke
2) Create a Groups node, then export as gizmo... and save it to your ~/.nuke directory
3) From the tab menu, run Update [All Plugins]
4) Create the Gizmo you exported
5) Add any user knob to the Gizmo, like a Floating point slider
6) Create any other node with a matching knob type, like a Grade
7) Expression link the Gizmo to a matching knob in the other node
9) Select the other node, then the Gizmo and Copy the nodes
10) Delete the nodes
11) Paste the nodes, only the Gizmo will be created
Workaround
If you disable forceEvaluate in the dependent() command, it seems to work correctly. This can be done by changing line 3 of the menu.py from: