Current local light rendering is done from the light nearest to the camera, in order by distance, up to the RenderLocalLightCount.
This has a set of disadvantages, e.g.
  • the lighting on the subject can change when moving the camera (with Count < the number of lights in range),
  • the lights
    near the subject
    are not necessarily lit,
  • etc.
Imagine filming with the lights on the camera, not the subject. Just ... no.
When the user picks the subject using Alt/Point/Left-Mouse/drag.., the lights nearest that point are the ones to prefer.
The current list and sort order code is retained, but the sort key should be a distance_from_camera_cursor, not distance_from_camera*. May require the continuity of any other code using the existing sort, so new sort switch should be added, old by default. Switch on prior to sorting the distance table for light management.
* my labels for the purposes here, not labels looked up in code.