curfrm = nuke.frame()
newcurfrm=curfrm+1
nuke.frame(newcurfrm)
so when user press this button, it wil jump 1 frame ahead (same like ‘next frame’ function button). So pressing 10 times will jump to 10 frames. It’s so easy. But i have tried this code , type in the script editor like this :
x=1
while x<11:
nuke.toNode('framecontrol').knob('nextframe').execute()
x=x+1
so i’m just confused why this doesn’t work well, suppose to jump 10 frames , but i got only 1 frame jump. I inspect , this has something to do with nuke.frame() which has delay in processing??? so fast iterate/loop is too fast for nuke.frame() to follow?? this is wierd. Try to modify code like this :
x=1
while x<11:
nuke.toNode('framecontrol').knob('nextframe').execute()
message('jump')
x=x+1
now it’s working fine, it jumps 10 frame as we also have to close every single pop-up window of course, i just simulate this to give ‘delay’ for the script so the nuke.frame() can ‘follow’. Well, i don’t know exactly what happen. Anyone can help me. I don’t know it’s bug or something wrong with my code? any issue with cpu core? If someone can give some good explaination?
Post a Comment