Home Page › forums › fx Art and Technique › Expressions for VFX › Nuke, hiow to create a read node for an image sequence that doesn’t start with 0?
- This topic has 4 replies, 5 voices, and was last updated 8 years, 7 months ago by Anonymous.
-
AuthorPosts
-
July 7, 2011 at 8:48 am #204272AnonymousGuest
Hi,
I am going slightly mad over this apparently easy task. Here’s what I am trying to do via Python:
-> There is an image sequence starting at frame 25, like this:
sh100_MB_camera1_Left.####.tif
all I wanna do is create a node that reads this image sequence and another node that writes it as JPG into a different folder.
Here’s what I have been trying so far:
srcSequence = ‘C:/shots/sh100_MB_camera1_Left.####.tif’
tgtSequence = ‘C:/shots/preview/sh100_MasterBeauty.####.jpg’# readNode = nuke.nodes.Read(file = srcSequence)
# writeNode = nuke.nodes.Write(file = tgtSequence)readNode = nuke.createNode(‘Read’, srcSequence)
writeNode = nuke.createNode(‘Write’, tgtSequence)first = readNode.knob(‘first’).getValue()
last = readNode.knob(‘last’).getValue()nuke.execute(‘Write1’, first, last)[/CODE]
Unfortunately, this only works for sequences starting with frame 0 or frame 1 but not for sequences starting at different frames. Neither the creation method with nuke.nodes.Write() nor nuke.createNode() works. The nodes are created but nuke doesn’t interpret the framerange in the given sequence, always showing an error message it couldn’t find C:/shots/sh100_MB_camera1_Left.0001.tif.
How do I make nuke check the range of a sequence when creating a Write Node and add in this range into the Write Node’s first/ last fields?[CODE]
srcSequence = ‘C:/shots/sh100_MB_camera1_Left.####.tif’
tgtSequence = ‘C:/shots/preview/sh100_MasterBeauty.####.jpg’# readNode = nuke.nodes.Read(file = srcSequence)
# writeNode = nuke.nodes.Write(file = tgtSequence)readNode = nuke.createNode(‘Read’, srcSequence)
writeNode = nuke.createNode(‘Write’, tgtSequence)first = readNode.knob(‘first’).getValue()
last = readNode.knob(‘last’).getValue()nuke.execute(‘Write1’, first, last)[/CODE]
Unfortunately, this only works for sequences starting with frame 0 or frame 1 but not for sequences starting at different frames. Neither the creation method with nuke.nodes.Write() nor nuke.createNode() works. The nodes are created but nuke doesn’t interpret the framerange in the given sequence, always showing an error message it couldn’t find C:/shots/sh100_MB_camera1_Left.0001.tif.
How do I make nuke check the range of a sequence when creating a Write Node and add in this range into the Write Node’s first/ last fields?
July 8, 2011 at 8:31 am #219626AnonymousInactiveIn the read node options you can change the input frames. Normaly that start with 1 or 0 and goes to the end, but you can just paste your starting frame in.
July 8, 2011 at 11:57 am #219627AnonymousInactiveOk, thanks for your reply but that doesn’t really solve my problem. My question is how to set up the nodes to the correct framerange via scripting, not manually fixing the Options.
January 4, 2012 at 8:34 am #219625Kane BorchertParticipantType in frame+1. Frame is a expression call in nuke to read the current frame number.
But i’m not sitting down in front of the computer with you so I cant tell if this solves your issue.March 23, 2012 at 2:23 am #219628AnonymousInactiveChange the input frames should be work,I think.
Maybe you can trying different setting until you get the most satisfied result? -
AuthorPosts
- You must be logged in to reply to this topic.
