This diff will add support for local view to Cycles rendered preview mode.
Currently the implementation shows same results as EEVEE does. This means there is a difference with Blender 2.79, where lights were automatically added to the local view. T69780: Local/Global View handles light differently between Blender 2.79 and Blender 2.80 describes this should be solved before the next release.
This patch also solves missing owner_id issues when using the RNA CPP Api from Cycles. Cycles didn't provide the owner_id making some functionality fail, what then was worked around in Blender. It also fixes an issue in makesrna where incorrect CPP code was generated when only PARM_RNAPTR was provided.
An optional view_layer parameter is added to the Object.local_view_get method to reduce lookups.