Saturday, 11 July 2015

Why "Export as Python script" button is unaccessible in QGIS 3.0/3.1 Modeler by default?


In QGIS 3.0, "Processing Modeler" window has no "Export as Python script" button unlike QGIS 2.x.


QGIS 3.0 Processing Modeler Window



If you look at the codes (in DlgModeler.ui and ModelerDialog.py files), you see the code lines related to that button.


in ModelerDialog.py (commented):


#self.mActionExportPython.triggered.connect(self.exportAsPython)
.
.
#self.mActionExportPython.setIcon(
# QgsApplication.getThemeIcon('/mActionSaveAsPython.svg'))

in DlgModeler.ui:





Export as Python script...


Export as Python script



After some editings I explained here, "Export as Python script" button came into view.


enter image description here



Is there a specific reason or is it a mistake?



Answer



This was intentionally disabled by commit 4f2a464



[processing] remove obsolete code and disable exporting models as script until we update it so support new scripts format


@alexbruy alexbruy committed on 2 Feb



So re-enabling it yourself won't be of any use as the output code won't be usable in QGIS 3x.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...