Hi all,

I've got a little group-node with a python button that adds nodes within
the group and expose certain values via Link-knobs. It seems to work but
often it causes Nuke to crash, especially if I run the script with high
number of loops (above 10), and also setting it back to 1.

I've attached some code that you can run on a node. It's very likely that
I'm doing something wrong here, but I can't seem to find it myself. Just
adjust the num variable to create different numbers of sliders.

import re


 n = nuke.selectedNode()

name = "tester"

reg = re.compile(name)

num = 10


 for b in n.knobs():

if reg.match(b):

n.removeKnob(n.knobs()[b])


 for i in range(num):

k = nuke.Link_Knob( name + str(i + 1) )

n.addKnob(k)


Thanks.


-- 
--------------------------------
Stiller Studios
Lidingö/Sweden

Simon Björk
Stiller Studios
+46 (0)8 555 23 560
Ekholmsnäsvägen 40, S-181 41 Lidingö
[email protected]
www.stillerstudios.se

find us:
http://www.eniro.se/query?search_word=stiller+studios&geo_area=liding%F6&what=all
_______________________________________________
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