Converting a model into a Python script
In QGIS version 2.4, it was possible to convert a model tool to a Python script. It was done by right-clicking on the model in the Processing Toolbox panel and choosing Save as Python script. During the development of QGIS 2.6, the underlying code for the graphical modeler was completely rewritten. As a result, there are many changes and improvements in the new modeler. For example, *.model
files are now stored as JSON instead of XML, there is no depth limit to nesting models within models, and algorithms and inputs can be dragged and dropped onto the modeler canvas. The modeler is also more stable and less buggy. Unfortunately, the ability to export a model as a Python script has not yet been implemented in the updated modeler. There simply was not enough time to get this piece completed before the release of QGIS 2.6. This functionality is expected to be implemented in a future QGIS release. However, since models are algorithms, they can be executed...