summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-13 10:45:50 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-13 10:45:50 -0300
commit04c749a1f034c0b2256fdca0ca2675f696b490e8 (patch)
treec908a64edf3f61bba725051c8f60c6a108acbb84 /tools/editor/plugins
parenta2903fc51d1d20eba4dc451bdacbe477d6670163 (diff)
New API for visibility in both CanvasItem and Spatial
visible (property) - access set_visible(bool) is_visible() is_visible_in_tree() - true when visible and parents visible show() hide() - for convenience
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp66
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/script_text_editor.cpp2
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp4
14 files changed, 60 insertions, 60 deletions
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index 3201db1116..9850298c67 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -648,8 +648,8 @@ Dictionary AnimationPlayerEditor::get_state() const {
Dictionary d;
- d["visible"]=is_visible();
- if (EditorNode::get_singleton()->get_edited_scene() && is_visible() && player) {
+ d["visible"]=is_visible_in_tree();
+ if (EditorNode::get_singleton()->get_edited_scene() && is_visible_in_tree() && player) {
d["player"]=EditorNode::get_singleton()->get_edited_scene()->get_path_to(player);
d["animation"]=player->get_current_animation();
@@ -999,10 +999,10 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value,bool p_set) {
void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
- if (player==p_pl && is_visible()) {
+ if (player==p_pl && is_visible_in_tree()) {
_update_player();
- if (blend_editor.dialog->is_visible())
+ if (blend_editor.dialog->is_visible_in_tree())
_animation_blend(); //update
}
}
@@ -1011,7 +1011,7 @@ void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
void AnimationPlayerEditor::_list_changed() {
- if(is_visible())
+ if(is_visible_in_tree())
_update_player();
}
#if 0
@@ -1099,7 +1099,7 @@ void AnimationPlayerEditor::_animation_key_editor_anim_step_changed(float p_len)
void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos,bool p_drag) {
- if (!is_visible())
+ if (!is_visible_in_tree())
return;
if (!player)
return;
@@ -1220,7 +1220,7 @@ void AnimationPlayerEditor::_animation_save_menu(int p_option) {
void AnimationPlayerEditor::_unhandled_key_input(const InputEvent& p_ev) {
- if (is_visible() && p_ev.type==InputEvent::KEY && p_ev.key.pressed && !p_ev.key.echo && !p_ev.key.mod.alt && !p_ev.key.mod.control && !p_ev.key.mod.meta) {
+ if (is_visible_in_tree() && p_ev.type==InputEvent::KEY && p_ev.key.pressed && !p_ev.key.echo && !p_ev.key.mod.alt && !p_ev.key.mod.control && !p_ev.key.mod.meta) {
switch(p_ev.key.scancode) {
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp
index 3b28e8610b..5a5660ae50 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp
@@ -1509,7 +1509,7 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
anim_tree_editor->set_fixed_process(true);
} else {
- if (anim_tree_editor->is_visible())
+ if (anim_tree_editor->is_visible_in_tree())
editor->hide_bottom_panel();
button->hide();
anim_tree_editor->set_fixed_process(false);
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 977fa55e48..c161e3cfa1 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -209,7 +209,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) {
- if (!is_visible() || get_viewport()->gui_has_modal_stack())
+ if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
if (p_ev.key.mod.control)
@@ -425,7 +425,7 @@ void CanvasItemEditor::_node_removed(Node *p_node) {
void CanvasItemEditor::_keying_changed() {
- if (AnimationPlayerEditor::singleton->get_key_editor()->is_visible())
+ if (AnimationPlayerEditor::singleton->get_key_editor()->is_visible_in_tree())
animation_hb->show();
else
animation_hb->hide();
@@ -465,7 +465,7 @@ CanvasItem* CanvasItemEditor::_select_canvas_item_at_pos(const Point2& p_pos,Nod
return r;
}
- if (c && c->is_visible() && !c->has_meta("_edit_lock_") && !_is_part_of_subscene(c) && !c->cast_to<CanvasLayer>()) {
+ if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !_is_part_of_subscene(c) && !c->cast_to<CanvasLayer>()) {
Rect2 rect = c->get_item_rect();
Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
@@ -498,7 +498,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos,Node* p_nod
}
- if (c && c->is_visible() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
+ if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
Rect2 rect = c->get_item_rect();
Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
@@ -547,7 +547,7 @@ void CanvasItemEditor::_find_canvas_items_at_rect(const Rect2& p_rect,Node* p_no
}
}
- if (c && c->is_visible() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
+ if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
Rect2 rect = c->get_item_rect();
Transform2D xform = p_parent_xform * p_canvas_xform * c->get_transform();
@@ -633,7 +633,7 @@ bool CanvasItemEditor::_select(CanvasItem *item, Point2 p_click_pos, bool p_appe
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -676,7 +676,7 @@ void CanvasItemEditor::_key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -738,7 +738,7 @@ Point2 CanvasItemEditor::_find_topleftmost_point() {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -769,7 +769,7 @@ int CanvasItemEditor::get_item_count() {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -791,7 +791,7 @@ CanvasItem *CanvasItemEditor::get_single_item() {
for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -1152,7 +1152,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -1247,7 +1247,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -1458,7 +1458,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -1568,7 +1568,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -1947,9 +1947,9 @@ void CanvasItemEditor::_viewport_draw() {
if (viewport->has_focus()) {
Size2 size = viewport->get_size();
- if (v_scroll->is_visible())
+ if (v_scroll->is_visible_in_tree())
size.width-=v_scroll->get_size().width;
- if (h_scroll->is_visible())
+ if (h_scroll->is_visible_in_tree())
size.height-=h_scroll->get_size().height;
get_stylebox("EditorFocus","EditorStyles")->draw(ci,Rect2(Point2(),size));
@@ -1969,7 +1969,7 @@ void CanvasItemEditor::_viewport_draw() {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
continue;
@@ -2198,7 +2198,7 @@ void CanvasItemEditor::_notification(int p_what) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2226,7 +2226,7 @@ void CanvasItemEditor::_notification(int p_what) {
}
bool show_anchor = all_control && has_control;
- if (show_anchor != !anchor_menu->is_hidden()) {
+ if (show_anchor != anchor_menu->is_visible()) {
if (show_anchor)
anchor_menu->show();
else
@@ -2619,7 +2619,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2637,7 +2637,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2658,7 +2658,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2676,7 +2676,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2697,7 +2697,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2818,7 +2818,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2931,7 +2931,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -2983,7 +2983,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -3029,7 +3029,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Node2D *n2d = E->key()->cast_to<Node2D>();
if (!n2d)
continue;
- if (!n2d->is_visible())
+ if (!n2d->is_visible_in_tree())
continue;
if (!n2d->get_parent_item())
continue;
@@ -3051,7 +3051,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Node2D *n2d = E->key()->cast_to<Node2D>();
if (!n2d)
continue;
- if (!n2d->is_visible())
+ if (!n2d->is_visible_in_tree())
continue;
n2d->set_meta("_edit_bone_",Variant());
@@ -3069,7 +3069,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
- if (!canvas_item || !canvas_item->is_visible())
+ if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
@@ -3093,7 +3093,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
CanvasItem *n2d = E->key()->cast_to<CanvasItem>();
if (!n2d)
continue;
- if (!n2d->is_visible())
+ if (!n2d->is_visible_in_tree())
continue;
n2d->set_meta("_edit_ik_",Variant());
@@ -3151,7 +3151,7 @@ void CanvasItemEditor::_focus_selection(int p_op) {
// counting invisible items, for now
- //if (!canvas_item->is_visible()) continue;
+ //if (!canvas_item->is_visible_in_tree()) continue;
++count;
Rect2 item_rect = canvas_item->get_item_rect();
@@ -3654,7 +3654,7 @@ CanvasItemEditorPlugin::~CanvasItemEditorPlugin()
void CanvasItemEditorViewport::_on_mouse_exit() {
- if (selector->is_hidden()){
+ if (!selector->is_visible()){
_remove_preview();
}
}
diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp
index 69be969c51..4a3ea91ff6 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/path_2d_editor_plugin.cpp
@@ -67,7 +67,7 @@ bool Path2DEditor::forward_gui_input(const InputEvent& p_event) {
if (!node)
return false;
- if (!node->is_visible())
+ if (!node->is_visible_in_tree())
return false;
if (!node->get_curve().is_valid())
@@ -475,7 +475,7 @@ void Path2DEditor::_canvas_draw() {
if (!node)
return ;
- if (!node->is_visible())
+ if (!node->is_visible_in_tree())
return;
if (!node->get_curve().is_valid())
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
index fc6a548595..92d9c070af 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -474,7 +474,7 @@ void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
// preloader_editor->set_process(true);
} else {
- if (preloader_editor->is_visible())
+ if (preloader_editor->is_visible_in_tree())
editor->hide_bottom_panel();
button->hide();
//preloader_editor->hide();
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index a7ccfb6978..e470d0d2c2 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -509,7 +509,7 @@ void SampleLibraryEditorPlugin::make_visible(bool p_visible) {
// sample_library_editor->set_process(true);
} else {
- if (sample_library_editor->is_visible())
+ if (sample_library_editor->is_visible_in_tree())
editor->hide_bottom_panel();
button->hide();
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 4219457286..45340f9366 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -426,14 +426,14 @@ void ScriptEditor::_go_to_tab(int p_idx) {
script_name_label->set_text(c->cast_to<ScriptEditorBase>()->get_name());
script_icon->set_texture(c->cast_to<ScriptEditorBase>()->get_icon());
- if (is_visible())
+ if (is_visible_in_tree())
c->cast_to<ScriptEditorBase>()->ensure_focus();
}
if (c->cast_to<EditorHelp>()) {
script_name_label->set_text(c->cast_to<EditorHelp>()->get_class());
script_icon->set_texture(get_icon("Help","EditorIcons"));
- if (is_visible())
+ if (is_visible_in_tree())
c->cast_to<EditorHelp>()->set_focused();
}
@@ -1281,7 +1281,7 @@ void ScriptEditor::ensure_select_current() {
Ref<Script> script = se->get_edited_script();
- if (!grab_focus_block && is_visible())
+ if (!grab_focus_block && is_visible_in_tree())
se->ensure_focus();
@@ -1516,7 +1516,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script, bool p_grab_focus) {
_go_to_tab(i);
script_list->select( script_list->find_metadata(i) );
}
- if (is_visible())
+ if (is_visible_in_tree())
se->ensure_focus();
}
return;
@@ -1744,7 +1744,7 @@ void ScriptEditor::_script_split_dragged(float) {
}
void ScriptEditor::_unhandled_input(const InputEvent& p_event) {
- if (p_event.key.pressed || !is_visible()) return;
+ if (p_event.key.pressed || !is_visible_in_tree()) return;
if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
int next_tab = script_list->get_current() + 1;
next_tab %= script_list->get_item_count();
diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp
index 05a2bfdba0..a7cc1d4326 100644
--- a/tools/editor/plugins/script_text_editor.cpp
+++ b/tools/editor/plugins/script_text_editor.cpp
@@ -484,7 +484,7 @@ void ScriptTextEditor::_code_complete_scripts(void* p_ud,const String& p_code, L
void ScriptTextEditor::_code_complete_script(const String& p_code, List<String>* r_options) {
- if (color_panel->is_visible()) return;
+ if (color_panel->is_visible_in_tree()) return;
Node *base = get_tree()->get_edited_scene_root();
if (base) {
base = _find_node_for_script(base,base,script);
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 17b10ecd70..a42158c7b0 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -527,7 +527,7 @@ void ShaderEditorPlugin::make_visible(bool p_visible) {
} else {
button->hide();
- if (shader_editor->is_visible())
+ if (shader_editor->is_visible_in_tree())
editor->hide_bottom_panel();
shader_editor->apply_shaders();
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index f508ab95c2..400627ca60 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -1740,7 +1740,7 @@ void SpatialEditorViewport::_notification(int p_what) {
if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
- bool visible=is_visible();
+ bool visible=is_visible_in_tree();
set_process(visible);
@@ -2205,7 +2205,7 @@ void SpatialEditorViewport::set_can_preview(Camera* p_preview) {
void SpatialEditorViewport::update_transform_gizmo_view() {
- if (!is_visible())
+ if (!is_visible_in_tree())
return;
Transform xform = spatial_editor->get_gizmo_transform();
@@ -3484,7 +3484,7 @@ void SpatialEditor::_instance_scene() {
void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
- if (!is_visible() || get_viewport()->gui_has_modal_stack())
+ if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
#if 0
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index 67948b0302..7706b063a9 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -941,7 +941,7 @@ void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
} else {
button->hide();
- if (frames_editor->is_visible())
+ if (frames_editor->is_visible_in_tree())
editor->hide_bottom_panel();
// frames_editor->set_process(false);
diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp
index 4319832adb..171eac57d9 100644
--- a/tools/editor/plugins/style_box_editor_plugin.cpp
+++ b/tools/editor/plugins/style_box_editor_plugin.cpp
@@ -95,7 +95,7 @@ void StyleBoxEditorPlugin::make_visible(bool p_visible){
EditorNode::get_singleton()->make_bottom_panel_item_visible(stylebox_editor);
} else {
- if (stylebox_editor->is_visible())
+ if (stylebox_editor->is_visible_in_tree())
EditorNode::get_singleton()->hide_bottom_panel();
button->hide();
}
diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp
index a700ddce7a..84f711675b 100644
--- a/tools/editor/plugins/theme_editor_plugin.cpp
+++ b/tools/editor/plugins/theme_editor_plugin.cpp
@@ -975,7 +975,7 @@ void ThemeEditorPlugin::make_visible(bool p_visible){
} else {
theme_editor->set_process(false);
- if (theme_editor->is_visible())
+ if (theme_editor->is_visible_in_tree())
editor->hide_bottom_panel();
button->hide();
}
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 2c64f7cd89..1a8c35a0be 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -53,7 +53,7 @@ void TileMapEditor::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- if (is_visible()) {
+ if (is_visible_in_tree()) {
_update_palette();
}
} break;
@@ -597,7 +597,7 @@ static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) {
bool TileMapEditor::forward_gui_input(const InputEvent& p_event) {
- if (!node || !node->get_tileset().is_valid() || !node->is_visible())
+ if (!node || !node->get_tileset().is_valid() || !node->is_visible_in_tree())
return false;
Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();