#NEWLINE# def __init__( self , scriptNode , parenting = None ) : #NEWLINE# #INDENT# self . __row = GafferUI . ListContainer ( GafferUI . ListContainer . Orientation . Horizontal , borderWidth = 4 , spacing = 2 ) #NEWLINE# GafferUI . EditorWidget . __init__ ( self , self . __row , frameIncrementShortcut , parenting = parenting ) #NEWLINE# with self . __row : #NEWLINE# #INDENT# self . __visibilityButton = GafferUI . Button ( image = 'timeline3.png' , hasFrame = False ) #NEWLINE# self . __visibilityButtonClickedConnection = self . __visibilityButton . clickedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __visibilityButtonClicked ) ) #NEWLINE# self . __scriptRangeStart = GafferUI . NumericPlugValueWidget ( scriptNode [ 'frameRange' ] [ 'start' ] ) #NEWLINE# self . __scriptRangeStart . numericWidget ( ) . setFixedCharacterWidth ( 4 ) #NEWLINE# self . __scriptRangeStart . setToolTip ( self . __scriptRangeStart . getPlug ( ) . fullName ( ) ) #NEWLINE# self . __sliderRangeStart = GafferUI . NumericWidget ( scriptNode [ 'frameRange' ] [ 'start' ] . getValue ( ) ) #NEWLINE# self . __sliderRangeStart . setFixedCharacterWidth ( 4 ) #NEWLINE# self . __sliderRangeStart . setToolTip ( 'Slider minimum' ) #NEWLINE# self . __sliderRangeStartChangedConnection = self . __sliderRangeStart . editingFinishedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __sliderRangeChanged ) ) #NEWLINE# self . __slider = GafferUI . NumericSlider ( value = self . getContext ( ) . getFrame ( ) , min = float ( scriptNode [ 'frameRange' ] [ 'start' ] . getValue ( ) ) , max = float ( scriptNode [ 'frameRange' ] [ 'end' ] . getValue ( ) ) , parenting = { #NEWLINE# #INDENT# 'expand' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . __slider . setPositionIncrement ( 0 ) #NEWLINE# self . __sliderValueChangedConnection = self . __slider . valueChangedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __valueChanged ) ) #NEWLINE# self . __startButton = GafferUI . Button ( image = 'timelineStart.png' , hasFrame = False ) #NEWLINE# self . __startButtonClickedConnection = self . __startButton . clickedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __startOrEndButtonClicked ) ) #NEWLINE# self . __playPause = GafferUI . Button ( image = 'timelinePlay.png' , hasFrame = False ) #NEWLINE# self . __playPauseClickedConnection = self . __playPause . clickedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __playPauseClicked ) ) #NEWLINE# self . __endButton = GafferUI . Button ( image = 'timelineEnd.png' , hasFrame = False ) #NEWLINE# self . __endButtonClickedConnection = self . __endButton . clickedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __startOrEndButtonClicked ) ) #NEWLINE# self . __frame = GafferUI . NumericWidget ( self . getContext ( ) . getFrame ( ) ) #NEWLINE# self . __frame . setFixedCharacterWidth ( 5 ) #NEWLINE# self . __frame . setToolTip ( 'Current frame' ) #NEWLINE# self . __frameChangedConnection = self . __frame . valueChangedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __valueChanged ) ) #NEWLINE# self . __sliderRangeEnd = GafferUI . NumericWidget ( scriptNode [ 'frameRange' ] [ 'end' ] . getValue ( ) ) #NEWLINE# self . __sliderRangeEnd . setFixedCharacterWidth ( 4 ) #NEWLINE# self . __sliderRangeEnd . setToolTip ( 'Slider maximum' ) #NEWLINE# self . __sliderRangeEndChangedConnection = self . __sliderRangeEnd . editingFinishedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __sliderRangeChanged ) ) #NEWLINE# self . __scriptRangeEnd = GafferUI . NumericPlugValueWidget ( scriptNode [ 'frameRange' ] [ 'end' ] ) #NEWLINE# self . __scriptRangeEnd . numericWidget ( ) . setFixedCharacterWidth ( 4 ) #NEWLINE# self . __scriptRangeEnd . setToolTip ( self . __scriptRangeEnd . getPlug ( ) . fullName ( ) ) #NEWLINE# #UNINDENT# self . __scriptNodePlugSetConnection = scriptNode . plugSetSignal ( ) . connect ( Gaffer . WeakMethod ( self . __scriptNodePlugSet ) ) #NEWLINE# frameIncrementShortcut = QtGui . QShortcut ( QtGui . QKeySequence ( 'Right' ) , self . _qtWidget ( ) ) #NEWLINE# frameIncrementShortcut . activated . connect ( Gaffer . WeakMethod ( self . __incrementFrame ) ) #NEWLINE# frameDecrementShortcut = QtGui . QShortcut ( QtGui . QKeySequence ( 'Left' ) , self . _qtWidget ( ) ) #NEWLINE# frameDecrementShortcut . activated . connect ( IECore . curry ( Gaffer . WeakMethod ( self . __incrementFrame ) , ( - 1 ) ) ) #NEWLINE# self . __playback = None #NEWLINE# self . _updateFromContext ( set ( ) )