For meshes and world this is controlled through Ray Visibility > Camera.
I think we use the same terminology, and maybe just make the existing ray visibility setting on the object work? The tricky part is that's it's not possible for custom properties to have a different default for lamp objects, though I guess we can work around that by having a different property for lamps that still shows with the same name in the UI?
This has more than a year.
Even when there are possibly better solutions to handle this, being a needed feature for production and being a rather simple one, can't we have this implemented in master as it is right now (maybe under experimental) and leave the improvements for later?
Or course this won't fit any case, but this is a rather important feature since we have to rely on less efficient geometry lights to have the actual light visible.
BTW IMHO Visibility shoud be ON by default, it's a user/artistic decission to hid the light from the camera, in real life you don't hide bulbs from the camera, so I don't see a problem in using the same "Use Camera" setting that is there for any other object.
OK, I updated this to 2.81 and it works.
I've found two problems that may be super easy to fix for any of you, @Lukas Stockner (lukasstockner97) or @Brecht Van Lommel (brecht) but they have me kind of puzzled, since you probably don't have time to tackle this for the time being, any clue that you could give me to investigate it is very welcome.
First problem: the light is "transparent", it depends on it's power to be more or less transparent, this is not a big problem, and can even be desirable, but I would love to understand why is this happening.
Second problem, you already mentioned it @Brecht Van Lommel (brecht) , if the setting is enable in ANY light, it will affect all the lights in the scene, you also mentioned SHADER_EXCLUDE_CAMERA and handling it on "indirect_lamp_emission", can you point me towards the location of those two parts and/or something similar?
EDIT: Ok, found both things, the EXCLUDE flag and the function, trying to wrap my head around them :)
After fighting with this all day, I think that I know why all the lights are enabled/disabled all at once, correct me if I'm wrong, but this
Seems to be picking a variable that is a global one, each light is overwriting it, so once you have no lights with use_lamp_direct enabled, the value is false, but as soon as you have one light with this enabled, then the value is true, but in general, not per light.
I'm still trying to figure out how this works, because I have no idea on how can I change "SHADER_EXCLUDE_CAMERA " for an specific light.
LightManager::device_update_points sets the shader exclude flags for lights, I think you would just set SHADER_EXCLUDE_CAMERA based on if (!light->is_direct) there as well.
In indirect_lamp_emission you probably just need to copy indirect_background, and add this line:
((shader & SHADER_EXCLUDE_CAMERA) && (state->flag & PATH_RAY_CAMERA)) ||