yeah i see... i would try to go through something like
meta_node['focal'].animation(0).evaluate(f) to get the meta data and then modify the read path using that...

below is an (untested) attempt, and you'll probably still have to fix the float, int, string problems... coming to think of it, that could be why your method doesn't work either - if you have a number of 1 it might read as 1.0 so you might have to change your file naming accordingly.

chris


import nuke
import os

target_directory = "path/to/your/directory"
dynamic_read = nuke.toNode("YourReadNode")
dynamic_write = nuke.toNode("YourWriteNode")
meta_node  = nuke.toNode("YourMetaNode")
first_frame = int(nuke.root()['first_frame'].value())
last_frame = int(nuke.root()['last_frame'].value())
for f in range(first_frame, last_frame):
    meta_data = str(meta_node['focal'].animation(0).evaluate(f))
    file_path = target_directory + meta_data
    dynamic_read['file'].fromUserText(file_path)
    frame = int(f)
    nuke.execute(dynamic_write, frame, frame)



_______________________________________________
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

Reply via email to