Blender Git Loki

Git Commits -> Revision e280c04

Revision e280c04 by swann (master)
January 17, 2020, 18:14 (GMT)
Fix lightprobe creation from python data API

### Description of the problem

Until now, it is only possible to correctly add a lightprobe in python via an operator:
`bpy.ops.object.lightprobe_add()`

### 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:
1. Add a function `BKE_lightprobe_configure` in charge of lightprobe settings configuration (avoid code redundancy)
2. 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)

```

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6396

Commit Details:

Full Hash: e280c0441bd84e73c47dffb66104ed40af9ea592
Parent Commit: f185a9b
Committed By: Clment Foucault
Lines Changed: +48, -21

Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2020