def __call__( self ): WorldEditor.setOption( self.path, self.fn() )
def __call__( self ): oldValue = WorldEditor.getOptionInt( self.path ) newValue = not oldValue WorldEditor.setOption( self.path, newValue ) if self.postFunction: self.postFunction( newValue )