extractFrame.py

ExtractFrame:

extractFrame is a python script for Nuke.
extractFrame grab out a single frame from your image sequence (input, footage, etc). Usually we add a "Frame Hold" node and give the value off which frame we need.

extractFrame pop-up a window, it will automatically carry the current frame, you can mention the frame which you want on the "which frame you want to extract" field or else it will automatically use your current frame.

Result while specify the frame no:







Result with out specify frame no:






















Python file: http://www.nukepedia.com/python/misc/extractframe

else copy paste below code as extractFrame.py.


'''
Created on 01-Mar-2012
updated on 16-apr-2013
@author: satheesh.R
contact: satheesrev@gmail.com
'''
import nuke
## creating panel
def extractFrame():
curFrame = nuke.frame()
ef = nuke.Panel("extractFrame..... by satheesh-R", 50)
ef.addSingleLineInput("feed frame no to Hold:\n (this is your current frame)",curFrame)
ef.addButton("cancel")
ef.addButton("ok")
window = ef.show()
if window == 0:
return
result=ef.value("feed frame no to Hold:\n (this is your current frame)")
frame = nuke.frame()
if result =="":
result=frame
## create framehold and assign user value
fh = nuke.createNode("FrameHold")
fh.setName("HoldedFrame")
fh['first_frame'].setValue(int(result))


menu.py file:

import extractFrame
n = nuke.toolbar('Nodes')
n.addCommand('Edit/extractFrame', 'extractFrame.extractFrame()', "F2")
( you can change the shortcut from "F2" to what ever you want )

Comments

  1. well bro..

    all looks helpfull and fine...

    keep going..
    cheers.

    ReplyDelete

Post a Comment

Popular posts from this blog

Export Nuke's retime information

Working with UV pass inside NUKE

DeepEdgeSmoother