#NEWLINE# def testAssignShaderFromOutsideBox( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'p' ] = GafferScene . Plane ( ) #NEWLINE# s [ 's' ] = GafferSceneTest . TestShader ( ) #NEWLINE# s [ 's' ] [ 'type' ] . setValue ( 'test:surface' ) #NEWLINE# s [ 'a' ] = GafferScene . ShaderAssignment ( ) #NEWLINE# s [ 'a' ] [ 'in' ] . setInput ( s [ 'p' ] [ 'out' ] ) #NEWLINE# s [ 'a' ] [ 'shader' ] . setInput ( ss [ 's' ] [ 'out' ] ) #NEWLINE# s [ 'o' ] = GafferScene . Options ( ) #NEWLINE# s [ 'o' ] [ 'in' ] . setInput ( s [ 'a' ] [ 'out' ] ) #NEWLINE# b = Gaffer . Box . create ( s , Gaffer . StandardSet ( [ s [ 'p' ] , s [ 'a' ] ] ) ) #NEWLINE# self . assertTrue ( ( 'test:surface' in s [ 'o' ] [ 'out' ] . attributes ( '/plane' ) ) ) #NEWLINE# ss = s . serialise ( ) #NEWLINE# s = Gaffer . ScriptNode ( ) #NEWLINE# s . execute ( ss ) #NEWLINE# self . assertTrue ( s [ 'Box' ] [ 'a' ] [ 'shader' ] . getInput ( ) . isSame ( s [ 'Box' ] [ 'shader' ] ) )