Yep - keep a track of the knobs you add using a dictionary, then iterate
over that dictionary when you need access to the values later
On 09/05/15 20:55, Erwan Leroy wrote:
Hey guys.
I'm trying to create a custom panel to manage some user created presets.
For each preset I need a few knobs. (TextInput, checkboxes)
I have a few ideas on how to do that, one is by creating my own pyside
panel, but that sounds a bit complex for such a simple task.
The other way would be to have variable variable names, resolved with
eval(), but that sounds like a terrible idea to me. I know it would work
because I did it this way once but it was horrible for maintenance.
Now I'm thinking about making a list of dictionaries, with each key
containing a knob. Then later on I can loop through my list and recover
each value.
Is that the best way to go?
Cheers
Erwan
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--
ben dickson
2D TD | ben.dick...@rsp.com.au
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python