Context: In the Graphical Modeler, I want to use an attribute of my source layer to set the buffer distance parameter. Using the "Pre-calculated Value" option, and entering the attribute name in the expression editor (in quotes) does not work. It says the field does not exist.
I am looking around for the source code, to see what might be the problem. Or really just to learn more about how the code works. (In the meantime, I have already written a processing plugin which uses the geometry().buffer() method.)
Inside the QGIS.app package,
Contents/Resources/python/plugins/processing/algs/qgis/Buffer.py
does exist. However, it is not processing plugin code.
That is, it does not go through initAlgorighm, addParameter, etc.
I looked at several of its neighboring files (e.g., BoxPlot.py) and they ARE clearly processing plugin code.
Question: Why is Buffer.py different than its neighboring files? And and how does it manage to show up in the Processing Toolbox and Graphical Modeler if it does not have the processing plugin code?
This "non processing plugin" Buffer.py code file is also at: https://github.com/qgis/QGIS/blob/b6a7a1070329a1f167341e3187781954d28f2f39/python/plugins/processing/algs/qgis/Buffer.py