Unfortunately elegance is a bit out of the question here.

You’re correct that knobs can only be added at the end of a PythonPanel (same 
with nodes). However, 6.3 broke the ability of knobs to be removed and then 
re-added to a node/panel, so you would actually have to re-create all the knobs 
below the point at which you want to add one (rather than simply "popping" them 
off and then adding them back on).

Another option is to create your whole UI up front, but hide and show knobs as 
necessary to give the illusion of a totally dynamic interface. However, if 
you’re doing something complex, I would skip the hack solutions and go straight 
to PySide.

-Nathan



From: mogga 
Sent: Wednesday, September 05, 2012 4:54 PM
To: [email protected] 
Subject: [Nuke-python] dynamically add knobs to a knob group

What is the appropriate way to add, update, delete knobs within a group of 
knobs within a python panel?

Given PythonPanel seems to me to be a linear process in how addKnob works, do I 
have to removeKnob the knobs from EndTabGroup_Knob to the end and add new ones 
thereafter? I'm sure there's a more elegant solution but docstrings are not 
very illuminating...

Is BeginTabGroup_Knob/EndTabGroup_Knob even the correct way of creating a group 
of knobs?!... 

This is a pretty simple node so I don't want to get into PySide without having 
used it yet.

thanks....
Rob



--------------------------------------------------------------------------------

--
Rob Moggach
VFX Supervisor
Dashing Collective Inc.


--------------------------------------------------------------------------------
_______________________________________________
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

Reply via email to