State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:410012|
Problem summary
The wrong tab is initialized when creating a node with the setTab() function via Python.
Customer reported version
nuke.11.2v5
Customer reported platform
windows7
Steps to reproduce
1) In Nuke, open the Script Editor.
2) Run the following snippet:
blur = nuke.createNode("Blur")
knob = nuke.PyScript_Knob("test")
blur.addKnob(knob)
blur.setTab(0)
Expected behavior
The first tab should be shown when creating the node.
Actual behavior
The User created tab is displayed when creating the node.
Workaround
Adding a QTimer to the script allows the correct tab to be shown when created via Python.
from PySide2.QtCore import QTimer
blur = nuke.createNode("Blur")
knob = nuke.PyScript_Knob("test")
blur.addKnob(knob)
QTimer.singleShot(100, lambda: blur.setTab(0))
Reproduced by Support in:
Nuke 12.0v1 - Windows 10, CentOS 7, macOS 10.13
Nuke 11.3v5 - Windows 10
Nuke 11.3v1 - Windows 10
Nuke 11.2v6 - Windows 10
Nuke 11.2v1 - Windows 10
Unable to reproduce bug in:
Nuke 11.1v6 - Windows 10, CentOS 7, macOS 10.13
Earliest version tested
Nuke11.1v6 - This issue doesn't appear in this version and has regressed
We're sorry to hear that
Please tell us why