Knobs can only be added at the end of the node’s controls. In order to "insert"
a knob, you have to remove knobs from the node in reverse order until you get
to the correct position, insert your new knob, and then re-add the knobs that
were removed.
-Nathan
From: Torax Unga
Sent: Thursday, July 25, 2013 2:57 PM
To: Nuke Python discussion
Subject: [Nuke-python] Adding a knob in outside last tab
Hi There,
I have created two tabs in a node and I want to add knobs to the first tab
after I created the second one. How can switch the focus to the first tab?
group = nuke.createNode('Group')
with group:
firstab = nuke.Tab_Knob("firsTab","First Tab")
group.addKnob(firstab)
colorkA = nuke.Color_Knob("colorkA", "color A")
group.addKnob(colorkA)
sectab = nuke.Tab_Knob("secTab","Second tab")
group.addKnob(sectab)
colorkB = nuke.Color_Knob("colorkB", "Color B")
group.addKnob(colorkB)
colorkC = nuke.Color_Knob("colorkC", "Color C") #want this in the first
tab
group.addKnob(colorkC)
Cheers!
--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python