Blender Git Statistics -> Developers -> slumber

swann (slumber)

Total Commits : 1
Master Commits : 1
Branch Commits : 0
First Commit : January 17, 2020
Latest Commit : January 17, 2020

Commits by Month

DateNumber of Commits
January, 20201

Favourite Files

FilenameTotal Edits
rna_object.c1
rna_main_api.c1
object_add.c1
object.c1
RNA_enum_types.h1
BKE_lightprobe.h1
lightprobe.c1

File Changes

ActionTotalPer Commit
Modified77.0

Code Changes

ActionTotalPer Commit
Lines Added4848.0
Lines Removed2121.0

Latest commits Feed

Revision e280c04 by swann / Clément Foucault (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

MiikaHweb - Blender Git Statistics v1.06
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021