I have a complicated shapefile of overlapping polygons. I need to generate random points inside each polygon, which is easily accomplished using Vector -> Research Tools -> Random Points Inside Polygons, but this obliterates the attribute table of the generated point shapefile which is not okay. Under more simple conditions, I could use NNJoin to rejoin the attributes, but because of the multiple overlapping polygons this is not acceptable as I cannot be sure the nearest polygon is actually the correct source of data. Can anyone suggest a method to generate a single random point in each polygon that has a 1:1 (ie., perfect) transfer of the attributes from the polygon to the random point, for each polygon?
I've made a PR to support your requirement at https://github.com/qgis/QGIS/pull/36479
You can take the file
RandomPointsPolygons.py from the PR and replace the one on your machine with the same name (make a copy before, to be safe). Then, restart QGIS and it should do what you want.