1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Stop baking process if there is no geometry in the BakedLightInstance.

moved missing baked light warning to BakedLightInstance configuration warning
This commit is contained in:
Daniel J. Ramirez
2016-07-25 21:45:20 -05:00
parent 6273ec901f
commit 213a57ccaf
4 changed files with 20 additions and 2 deletions

View File

@@ -206,8 +206,9 @@ void BakedLightEditor::_menu_option(int p_option) {
void BakedLightEditor::_bake_pressed() {
ERR_FAIL_COND(!node);
if (node->get_baked_light().is_null()) {
err_dialog->set_text(TTR("BakedLightInstance does not contain a BakedLight resource."));
const String conf_warning = node->get_configuration_warning();
if (!conf_warning.empty()) {
err_dialog->set_text(conf_warning);
err_dialog->popup_centered_minsize();
button_bake->set_pressed(false);
return;
@@ -236,6 +237,7 @@ void BakedLightEditor::_bake_pressed() {
update_timeout=0;
last_rays_time=0;
button_bake->set_pressed(false);
set_process(true);
}