Ok, try something like this:
First, copy and paste the following to see what it is I'm doing:
Code:
set cut_paste_input [stack 0]
version 5.0200
push $cut_paste_input
NoOp {
name Controller
selected true
xpos -247
ypos -89
addUserKnob {20 User}
addUserKnob {1 control}
control 03
}
Read {
inputs 0
file "/Volumes/BIGFISH/WORK/DEMO/a_side_dir/shot_\[value Controller.control]_a_%04d.tga"
format "1920 1080 0 0 1920 1080 1 HD_1920"
first 0
version 1
name Read1
label "\[value file]"
note_font "Helvetica Bold"
note_font_size {{curve x1 18}}
selected true
xpos -80
ypos -215
}
NoOp {
name ArbitraryNodes1
selected true
xpos -80
ypos -49
}
Read {
inputs 0
file "/Volumes/BIGFISH/WORK/DEMO/b_side_dir/shot_\[value Controller.control]_b_%04d.tga"
format "1920 1080 0 0 1920 1080 1 HD_1920"
first 0
name Read2
label "\[value file]"
note_font "Helvetica Bold"
note_font_size 18
selected true
xpos 200
ypos -124
}
NoOp {
name ArbitraryNodes2
selected true
xpos 40
ypos -9
}
Merge2 {
inputs 2
operation minus
name Merge1
selected true
xpos -80
ypos -9
}
NoOp {
name ArbitraryNodes3
selected true
xpos -80
ypos 31
}
Write {
file "/Volumes/BIGFISH/WORK/DEMO/write_dir/shot_\[value Controller.control]_a_%04d.tga"
views {main}
file_type targa
name Write1
label "\[value file]"
note_font "Helvetica Bold"
note_font_size 18
selected true
xpos -80
ypos 111
}
Notice that I'm using a NoOp with a user knob created (Controller.control) to act as the part of the name of each Read and Write that references the shot number. By using this Controller method I make the python coding much simpler.
Now, replace the Read1 and Read2 files with your own A and B sides, making sure to change the shot number in each to [value Controller.control] ... change the directory and name for the write as well, again changing the shot number reference.
Now run the following code via the Script Editor, with the appropriate first and last shot (in your case 1 and 62) in the obvious places:
Code:
first_shot = 1
last_shot = 62
for i in range(first_shot,last_shot+1):
nuke.toNode('Controller').knob('control').setValue('%02d' % i)
nuke.render('Write1')
What this does is changes Controller.control to the first shot number (01), then renders that from start to finish (as already set in the root .nk settings), then moves on to the next one ... the expressions force your A and B inputs and your Write to reference the Controller.control, and everything works hunky dory and as fast as your machine can traverse each render.
It's not exactly ideal, cause command line rendering would be quicker, but that's a bit more complicated, so you might want to just run the code and sit back and watch.
Oh, btw, this assumes that all of your shots have exactly the right number of frames and exist in sequential order ... not going to work if you have shot 2, shot 3, then shot 5, or if shot 16 has only 23 frames while the others all have 230 ... in any of those cases it will fail on that error happening. Could write around that as well, but that's code for another day.