(Oops, wrong list the first time)

John P wrote:
> But as
> there are many lights I need to script to create a "Light" node for each
> chan file I have.

Try this:

import glob
for filename in glob.glob('/path/to/chan/files/*.chan'):
   node = nuke.createNode('Light2')
   nuke.tcl('in %s {import_chan_file %s}' % (node.name(), filename))

Change the path to your chan files on the second line :)

--
Lewis Saunders
two dimensional person
London
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to