Nuke, hiow to create a read node for an image sequence that doesn’t start with 0?

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?

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #204272
    Anonymous
    Guest

    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?

    #219626
    Anonymous
    Inactive

    In 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.

    #219627
    Anonymous
    Inactive

    Ok, 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.

    #219625
    Kane Borchert
    Participant

    Type 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.

    #219628
    Anonymous
    Inactive

    Change the input frames should be work,I think.
    Maybe you can trying different setting until you get the most satisfied result?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Copy link
Powered by Social Snap