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:
Diffstat (limited to 'intern/cycles/scene/background.cpp')
-rw-r--r--intern/cycles/scene/background.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/scene/background.cpp b/intern/cycles/scene/background.cpp
index 1c3a9f9358d..bffc8895bfd 100644
--- a/intern/cycles/scene/background.cpp
+++ b/intern/cycles/scene/background.cpp
@@ -32,6 +32,8 @@ NODE_DEFINE(Background)
SOCKET_NODE(shader, "Shader", Shader::get_node_type());
+ SOCKET_STRING(lightgroup, "Light Group", ustring());
+
return type;
}
@@ -101,6 +103,15 @@ void Background::device_update(Device *device, DeviceScene *dscene, Scene *scene
kbackground->surface_shader |= SHADER_EXCLUDE_CAMERA;
}
+ /* Light group. */
+ auto it = scene->lightgroups.find(lightgroup);
+ if (it != scene->lightgroups.end()) {
+ kbackground->lightgroup = it->second;
+ }
+ else {
+ kbackground->lightgroup = LIGHTGROUP_NONE;
+ }
+
clear_modified();
}