def mouseDown(self, evt, pos, direction):
        """
        Called on pressing the mouseButton.
        Sets bllockButton if pickBlock is True.
        Also starts dragging.
        """
        if self.pickBlockKey:
            id = self.editor.level.blockAt(*pos)
            data = self.editor.level.blockDataAt(*pos)
            key = getattr(self.brushMode, 'mainBlock', 'Block')
            self.options[key] = self.editor.level.materials.blockWithID(id, data)
            self.showPanel()
        else:
            self.draggedDirection = direction
            point = [p + d * self.reticleOffset for p, d in zip(pos, direction)]
            self.dragLineToPoint(point)

        Called on pressing the mouseButton.
        Sets bllockButton if pickBlock is True.
        Also starts dragging.
        
editortools/brush.py