I havn't try yet your script. but i will later when i got time. It is
the way i was trying to avoid.
strangly i though i resolved my problem but it still freeze.
i think it come from the way i read the metadata, if i use a keyframes
instead, it seams to work
here is what i use to grab the metadata :
round(nuke.thisNode().input(0).metadata("exif/2/FNumber"),1)
chris wrote:
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
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python