From 6cf3002205fc9dad40375a475b2fd409e1dcae4a Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 5 Sep 2024 02:06:14 +0000 Subject: [PATCH] check light count Signed-off-by: Ian Chen --- .../global_illumination_civct/GlobalIlluminationCiVct.cc | 3 ++- .../plugins/global_illumination_vct/GlobalIlluminationVct.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/plugins/global_illumination_civct/GlobalIlluminationCiVct.cc b/src/gui/plugins/global_illumination_civct/GlobalIlluminationCiVct.cc index b87d725d6a..cfab7f414f 100644 --- a/src/gui/plugins/global_illumination_civct/GlobalIlluminationCiVct.cc +++ b/src/gui/plugins/global_illumination_civct/GlobalIlluminationCiVct.cc @@ -209,7 +209,8 @@ bool GlobalIlluminationCiVct::LoadGlobalIlluminationCiVct() return false; } - if (!scene->IsInitialized() || scene->VisualCount() == 0) + if (!scene->IsInitialized() || scene->VisualCount() == 0 || + scene->LightCount() == 0) { return false; } diff --git a/src/gui/plugins/global_illumination_vct/GlobalIlluminationVct.cc b/src/gui/plugins/global_illumination_vct/GlobalIlluminationVct.cc index 5d983c454a..3abbabaec4 100644 --- a/src/gui/plugins/global_illumination_vct/GlobalIlluminationVct.cc +++ b/src/gui/plugins/global_illumination_vct/GlobalIlluminationVct.cc @@ -203,7 +203,8 @@ bool GlobalIlluminationVct::LoadGlobalIlluminationVct() return false; } - if (!scene->IsInitialized() || scene->VisualCount() == 0) + if (!scene->IsInitialized() || scene->VisualCount() == 0 || + scene->LightCount() == 0) { return false; }