diff options
author | Dilith Jayakody <dilithjay@gmail.com> | 2022-04-03 05:38:54 +0300 |
---|---|---|
committer | Dilith Jayakody <dilithjay@gmail.com> | 2022-04-03 05:38:54 +0300 |
commit | bb44667a2e8f9c91548a574443e750583918e996 (patch) | |
tree | 12347d0a95971a9b7cd7d11786ccc2f948b214c6 /intern/cycles/scene/light.cpp | |
parent | 2579367c93296eb2ab1da0b51dc107287dc09fd3 (diff) | |
parent | 79ff65d07bac0ecf0170542f86dc03a0228b53d5 (diff) |
Merge branch 'master' into soc-2021-curvessoc-2021-curves
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++; } |