State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:544556|
Boolean_Knob.setLabel() does not update the label name when the Properties are openn = nuke.selectedNode()n['hide_input'].setLabel("New Label")
3) Observe how the label does not update until the Properties are closed and reopened, pictured below:
setLabel() on a Boolean knob will not visually update until the Properties are closed and reopened.showControlPanel() is called after hideControlPanel() in the same script session.Qtimer.singleShot() function from PySide2, and an example is below:
from PySide2 import QtCoreimport randomn = nuke.selectedNode() #expecting a NoOp noderandomStr = str(random.random())n['hide_input'].setLabel(randomStr)if n.shown(): print("Properties were open, refreshing...") n.hideControlPanel() QtCore.QTimer.singleShot(1, lambda: n.showControlPanel())else: print("Properties were not open, opening...") n.showControlPanel()
We're sorry to hear that
Please tell us why