diff options
Diffstat (limited to 'intern/cycles/scene/light.cpp')
-rw-r--r-- | intern/cycles/scene/light.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/scene/light.cpp b/intern/cycles/scene/light.cpp index 85a7f37994c..5e311d3051f 100644 --- a/intern/cycles/scene/light.cpp +++ b/intern/cycles/scene/light.cpp @@ -134,6 +134,8 @@ NODE_DEFINE(Light) SOCKET_NODE(shader, "Shader", Shader::get_node_type()); + SOCKET_STRING(lightgroup, "Light Group", ustring()); + return type; } @@ -902,6 +904,14 @@ void LightManager::device_update_points(Device *, DeviceScene *dscene, Scene *sc klights[light_index].tfm = light->tfm; klights[light_index].itfm = transform_inverse(light->tfm); + auto it = scene->lightgroups.find(light->lightgroup); + if (it != scene->lightgroups.end()) { + klights[light_index].lightgroup = it->second; + } + else { + klights[light_index].lightgroup = LIGHTGROUP_NONE; + } + light_index++; } |