John P wrote:
> I'm selecting the value (right
> clicking File > Import Ascii..) then using that same chan file again with
> "Column for offset" at "5". Is there a way of adding that to the script as
> well?
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()
--
Lewis Saunders
2dtd t2dt dt/t2
London
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python