On 5 May 2011 21:53, Lewis Saunders <[email protected]> wrote:
> You could do this:
>
> import glob
> for filename in glob.glob('/tmp/*.chan'):
> node = nuke.createNode('Light2')
> nuke.tcl('in %s {import_chan_file %s}' % (node.name(), filename))
>
> knob = nuke.Double_Knob('myUserKnob')
> knob.setAnimated()
> node.addKnob(knob)
>
> chanfile = open(filename)
> for line in chanfile:
> vals = line.split()
> knob.setValueAt(float(vals[4]), int(vals[0]))
> chanfile.close()
>
>
Thanks Lewis, this has been very helpful.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python