def roll(self, amount=1, blocksOnly=False):
        """
        Rolls the brush.
        :keyword blocksOnly: Also roll the data value of the block we're brushing with.
        """
        def rollBlock():
            list = [key for key in self.options if self.options[key].__class__.__name__ == 'Block'] # TODO Pod
            list = getattr(self.brushMode, 'rotatableBlocks', list)
            for key in list:
                bl = self.options[key]
                data = [[[bl.blockData]]]
                blockrotation.Roll([[[bl.ID]]], data)
                bl.blockData = data[0][0][0]
            self.showPanel()

        if config.settings.rotateBlockBrush.get() or blocksOnly:
            rollBlock()
        if not blocksOnly:
            H = self.options['H']
            self.options['H'] = self.options['W']
            self.options['W'] = H
        self.setupPreview()

        Rolls the brush.
        :keyword blocksOnly: Also roll the data value of the block we're brushing with.
        
editortools/brush.py