Skip to content

Commit de58dde

Browse files
committed
Added groups
1 parent 0170d21 commit de58dde

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

GUI/src/LightInfo.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ void Prisma::LightInfo::showSelectedArea(Light<LightType::LightArea>* lightData,
129129
if (ImGui::InputFloat3("Diffuse ", value_ptr(type.diffuse)))
130130
{
131131
lightData->type(type);
132+
if (meshData.node && meshData.node->parent()) {
133+
for (auto mesh : meshData.node->parent()->children()) {
134+
auto isMesh = std::dynamic_pointer_cast<Mesh>(mesh);
135+
if (isMesh) {
136+
auto material = isMesh->material();
137+
material->color(type.diffuse);
138+
isMesh->material(material);
139+
}
140+
}
141+
}
132142
}
133143
bool doubleSide = type.doubleSide;
134144
if (ImGui::Checkbox("Double side", &doubleSide))

0 commit comments

Comments
 (0)