Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-06-16 16:00:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-06-19 11:47:56 +0300
commit83a001267aba8f2ef193ac1d3520b27374689249 (patch)
tree36db6a4af4952f491af5867d391fcf41a12c689c /source/blender/editors
parent9a5cb2e6f8fcb50a2811f38e7712ca8e49aae81b (diff)
Probe: Add planar type.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_add.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index e8343dce384..49bcdd3d5ae 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -155,9 +155,9 @@ static EnumPropertyItem field_type_items[] = {
static EnumPropertyItem lightprobe_type_items[] = {
{0, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", "Reflection probe with sphere attenuation"},
{1, "CUBE", ICON_MESH_CUBE, "Cube", "Reflection probe with cube attenuation"},
- // {LIGHTPROBE_TYPE_PLANAR, "PLANAR", ICON_MESH_PLANE, "Planar", ""},
+ {2, "PLANAR", ICON_MESH_PLANE, "Planar", "Planar reflection probe"},
// {LIGHTPROBE_TYPE_IMAGE, "IMAGE", ICON_NONE, "Image", ""},
- {2, "GRID", ICON_MESH_GRID, "Grid", "Irradiance probe to capture diffuse indirect lighting"},
+ {3, "GRID", ICON_MESH_GRID, "Grid", "Irradiance probe to capture diffuse indirect lighting"},
{0, NULL, 0, NULL, NULL}
};
@@ -536,11 +536,16 @@ static int lightprobe_add_exec(bContext *C, wmOperator *op)
probe = (LightProbe *)ob->data;
- if (type == 2) {
+ if (type == 3) {
probe->type = LIGHTPROBE_TYPE_GRID;
probe->distinf = 0.3f;
probe->falloff = 1.0f;
}
+ else if (type == 2) {
+ probe->type = LIGHTPROBE_TYPE_PLANAR;
+ probe->distinf = 0.3f;
+ probe->falloff = 0.6f;
+ }
else {
probe->type = LIGHTPROBE_TYPE_CUBE;
probe->attenuation_type = (type == 1) ? LIGHTPROBE_SHAPE_BOX : LIGHTPROBE_SHAPE_ELIPSOID;