Package nukescripts :: Module framerangepanel
[hide private]
[frames] | no frames]

Source Code for Module nukescripts.framerangepanel

 1  # Copyright (c) 2009 The Foundry Visionmongers Ltd.  All Rights Reserved. 
 2  import nuke 
 3  import nukescripts 
 4   
5 -class FrameRangePanel( nukescripts.PythonPanel ):
6 """class that creates a Python panel for editing frame ranges""" 7
8 - def __init__( self, initalStart, initialEnd ):
9 """Constructor that takes 2 arguments for the initial start and end frame numbers""" 10 11 nukescripts.PythonPanel.__init__( self, "Set frame range", "uk.co.thefoundry.FramePanel" ) 12 self.fromFrame = nuke.Int_Knob( "fromFrame", "from:" ) 13 self.addKnob( self.fromFrame ) 14 self.fromFrame.setValue( int(initalStart) ) 15 self.toFrame = nuke.Int_Knob( "toFrame", "to:" ) 16 self.addKnob( self.toFrame ) 17 self.toFrame.setValue( int(initialEnd) )
18 - def showDialog( self ):
19 """show panel dialog, returns if accept was pressed""" 20 return nukescripts.PythonPanel.showModalDialog( self )
21