parameters: (self, parentNode, fileFormat, parentDir)
docstring: This method get all sub-nodes from the current node and export then in
              the defined format.
docstring_summary: This method get all sub-nodes from the current node and export then in
              the defined format.
docstring_tokens: This method get all sub - nodes from the current node and export then in the defined format .
function: def _exportLayers(self, parentNode, fileFormat, parentDir):
          """ This method get all sub-nodes from the current node and export then in
              the defined format."""
  
          for node in parentNode.childNodes():
              newDir = ''
              if node.type() == 'grouplayer' and not self.groupAsLayer.isChecked():
                  newDir = os.path.join(parentDir, node.name())
                  self.mkdir(newDir)
              elif (not self.exportFilterLayersCheckBox.isChecked()
                    and 'filter' in node.type()):
                  continue
              elif (self.ignoreInvisibleLayersCheckBox.isChecked()
                    and not node.visible()):
                  continue
              else:
                  nodeName = node.name()
                  _fileFormat = self.formatsComboBox.currentText()
                  if '[jpeg]' in nodeName:
                      _fileFormat = 'jpeg'
                  elif '[png]' in nodeName:
                      _fileFormat = 'png'
  
                  if self.cropToImageBounds.isChecked():
                      bounds = QRect()
                  else:
                      bounds = QRect(0, 0, self.rectWidthSpinBox.value(), self.rectHeightSpinBox.value())
  
                  layerFileName = '{0}{1}/{2}.{3}'.format(
                      self.directoryTextField.text(),
                      parentDir, node.name(), _fileFormat)
                  node.save(layerFileName, self.resSpinBox.value() / 72.,
                            self.resSpinBox.value() / 72., krita.InfoObject(), bounds)
  
              if node.childNodes() and not self.groupAsLayer.isChecked():
                  self._exportLayers(node, fileFormat, newDir)
function_tokens: def _exportLayers ( self , parentNode , fileFormat , parentDir ) : for node in parentNode . childNodes ( ) : newDir = '' if node . type ( ) == 'grouplayer' and not self . groupAsLayer . isChecked ( ) : newDir = os . path . join ( parentDir , node . name ( ) ) self . mkdir ( newDir ) elif ( not self . exportFilterLayersCheckBox . isChecked ( ) and 'filter' in node . type ( ) ) : continue elif ( self . ignoreInvisibleLayersCheckBox . isChecked ( ) and not node . visible ( ) ) : continue else : nodeName = node . name ( ) _fileFormat = self . formatsComboBox . currentText ( ) if '[jpeg]' in nodeName : _fileFormat = 'jpeg' elif '[png]' in nodeName : _fileFormat = 'png' if self . cropToImageBounds . isChecked ( ) : bounds = QRect ( ) else : bounds = QRect ( 0 , 0 , self . rectWidthSpinBox . value ( ) , self . rectHeightSpinBox . value ( ) ) layerFileName = '{0}{1}/{2}.{3}' . format ( self . directoryTextField . text ( ) , parentDir , node . name ( ) , _fileFormat ) node . save ( layerFileName , self . resSpinBox . value ( ) / 72. , self . resSpinBox . value ( ) / 72. , krita . InfoObject ( ) , bounds ) if node . childNodes ( ) and not self . groupAsLayer . isChecked ( ) : self . _exportLayers ( node , fileFormat , newDir )