mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Expose is_part_of_edited_scene()
This commit is contained in:
@@ -90,7 +90,7 @@ void Camera3D::_update_camera() {
|
||||
|
||||
RenderingServer::get_singleton()->camera_set_transform(camera, get_camera_transform());
|
||||
|
||||
if (get_tree()->is_node_being_edited(this) || !is_current()) {
|
||||
if (is_part_of_edited_scene() || !is_current()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ void Camera3D::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_EXIT_WORLD: {
|
||||
if (!get_tree()->is_node_being_edited(this)) {
|
||||
if (!is_part_of_edited_scene()) {
|
||||
if (is_current()) {
|
||||
clear_current();
|
||||
current = true; //keep it true
|
||||
@@ -286,7 +286,7 @@ void Camera3D::set_current(bool p_enabled) {
|
||||
}
|
||||
|
||||
bool Camera3D::is_current() const {
|
||||
if (is_inside_tree() && !get_tree()->is_node_being_edited(this)) {
|
||||
if (is_inside_tree() && !is_part_of_edited_scene()) {
|
||||
return get_viewport()->get_camera_3d() == this;
|
||||
} else {
|
||||
return current;
|
||||
|
||||
Reference in New Issue
Block a user