Fix light was alwasy been disabled in release mode (tools=no)
This commit is contained in:
parent
371eac9bef
commit
3161ceda2f
@ -436,9 +436,9 @@ void Light::_update_visibility() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
bool editor_ok=true;
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
bool editor_ok=true;
|
|
||||||
if (editor_only) {
|
if (editor_only) {
|
||||||
if (!get_scene()->is_editor_hint()) {
|
if (!get_scene()->is_editor_hint()) {
|
||||||
editor_ok=false;
|
editor_ok=false;
|
||||||
@ -446,11 +446,8 @@ void Light::_update_visibility() {
|
|||||||
editor_ok = (get_scene()->get_edited_scene_root() && (this==get_scene()->get_edited_scene_root() || get_owner()==get_scene()->get_edited_scene_root()));
|
editor_ok = (get_scene()->get_edited_scene_root() && (this==get_scene()->get_edited_scene_root() || get_owner()==get_scene()->get_edited_scene_root()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
bool editor_ok=false;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && enabled && editor_ok);
|
VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && enabled && editor_ok);
|
||||||
_change_notify("geometry/visible");
|
_change_notify("geometry/visible");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user