Project: QGIS

Version: 3.8

Feature: Expression variables for a model

We've added a new "Model Variables" dock panel to the model editor, allowing you to create and set custom expression variables for use in your Processing models. These variables are available anywhere expressions are evaluated within the model, so you can use them as input parameter values for child algorithms, within data-defined dynamic parameters, etc.

The prime use case here is for models which use a constant value throughout multiple steps within the model (e.g. @target_resolution: a target raster resolution, @max_simplification: a simplification value for input features coming from different sources, etc). Previously, you'd need to hunt down and replace these values in multiple places when you wanted to tweak them. By replacing them with variables in your model you only have a single place you need to edit these values when you want to adjust them!

Model variables are stored within an individual Processing model itself, and are not exposed outside of the model designer dialog.

This feature was funded by North Road

This feature was developed by Nyall Dawson (North Road)