Description of the problem
Until now, it is only possible to correctly add a lightprobe in python via an operator:
Description of the proposed solution
The idea of this patch is to fix the lack of consistency lightprobe creation without operator.
It allow creation of different lightprobe type directly via bpy.data.lightprobes.new(name, type) (such as for curves).
In order to make it possible I had to:
- Add a function BKE_lightprobe_configure in charge of lightprobe settings configuration (avoid code redundancy)
- Allow an object to take lightprobe datablock as data during is initialization.
A short example of this patch usage
lp = bpy.data.lightprobes.new('some_name','PLANAR') bpy.data.objects.new('toto', lp)