#NEWLINE# def __menuDefinition( self ) : #NEWLINE# #INDENT# filterNode = self . __filterNode ( ) #NEWLINE# result = IECore . MenuDefinition ( ) #NEWLINE# if ( filterNode is not None ) : #NEWLINE# #INDENT# result . append ( '/Remove' , { #NEWLINE# #INDENT# 'command' : Gaffer . WeakMethod ( self . __removeFilter ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# result . append ( '/RemoveDivider' , { #NEWLINE# #INDENT# 'divider' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# for filterType in self . __filterTypes ( ) : #NEWLINE# #INDENT# result . append ( ( '/' + filterType . staticTypeName ( ) . rpartition ( ':' ) [ 2 ] ) , { #NEWLINE# #INDENT# 'command' : IECore . curry ( Gaffer . WeakMethod ( self . __addFilter ) , filterNode ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return result