aboutsummaryrefslogtreecommitdiff
path: root/scene/3d/baked_light_instance.cpp
diff options
context:
space:
mode:
authorDaniel J. Ramirez2016-07-25 21:45:20 -0500
committerDaniel J. Ramirez2016-07-25 21:45:20 -0500
commit213a57ccafdf2f4fcc472801c60332d40cfe6464 (patch)
tree316b73e64d4ce0f324f190c56ccda29b9438e929 /scene/3d/baked_light_instance.cpp
parent6273ec901faec2823c8f4801244d1cffbbe9b118 (diff)
downloadgodot-213a57ccafdf2f4fcc472801c60332d40cfe6464.tar.gz
godot-213a57ccafdf2f4fcc472801c60332d40cfe6464.tar.zst
godot-213a57ccafdf2f4fcc472801c60332d40cfe6464.zip
Stop baking process if there is no geometry in the BakedLightInstance.
moved missing baked light warning to BakedLightInstance configuration warning
Diffstat (limited to 'scene/3d/baked_light_instance.cpp')
-rw-r--r--scene/3d/baked_light_instance.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp
index fafa62866..ca3a30956 100644
--- a/scene/3d/baked_light_instance.cpp
+++ b/scene/3d/baked_light_instance.cpp
@@ -60,6 +60,8 @@ void BakedLightInstance::set_baked_light(const Ref<BakedLight>& p_baked_light) {
// VS::get_singleton()->instance_geometry_set_baked_light(E->get()->get_instance(),baked_light.is_valid()?get_instance():RID());
// }
}
+
+ update_configuration_warning();
}
Ref<BakedLight> BakedLightInstance::get_baked_light() const{
@@ -77,6 +79,14 @@ DVector<Face3> BakedLightInstance::get_faces(uint32_t p_usage_flags) const {
}
+String BakedLightInstance::get_configuration_warning() const {
+ if (get_baked_light().is_null()) {
+ return TTR("BakedLightInstance does not contain a BakedLight resource.");
+ }
+ return String();
+}
+
+
void BakedLightInstance::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_baked_light","baked_light"),&BakedLightInstance::set_baked_light);