ソースを参照

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
Juan Linietsky 8 年 前
コミット
04c749a1f0
72 ファイル変更252 行追加292 行削除
  1. 15 34
      scene/2d/canvas_item.cpp
  2. 3 5
      scene/2d/canvas_item.h
  3. 4 4
      scene/2d/canvas_modulate.cpp
  4. 1 1
      scene/2d/collision_object_2d.cpp
  5. 1 1
      scene/2d/light_2d.cpp
  6. 2 2
      scene/2d/light_occluder_2d.cpp
  7. 1 1
      scene/2d/navigation_polygon.cpp
  8. 1 1
      scene/2d/path_2d.cpp
  9. 1 1
      scene/2d/screen_button.cpp
  10. 1 1
      scene/3d/collision_object.cpp
  11. 1 1
      scene/3d/light.cpp
  12. 1 1
      scene/3d/navigation_mesh.cpp
  13. 1 1
      scene/3d/scenario_fx.cpp
  14. 10 27
      scene/3d/spatial.cpp
  15. 3 5
      scene/3d/spatial.h
  16. 1 1
      scene/3d/visual_instance.cpp
  17. 2 2
      scene/gui/base_button.cpp
  18. 4 4
      scene/gui/box_container.cpp
  19. 1 1
      scene/gui/center_container.cpp
  20. 1 1
      scene/gui/container.cpp
  21. 8 8
      scene/gui/control.cpp
  22. 1 1
      scene/gui/file_dialog.cpp
  23. 1 1
      scene/gui/graph_edit.cpp
  24. 3 3
      scene/gui/grid_container.cpp
  25. 1 1
      scene/gui/item_list.cpp
  26. 1 1
      scene/gui/line_edit.cpp
  27. 1 1
      scene/gui/margin_container.cpp
  28. 2 2
      scene/gui/menu_button.cpp
  29. 2 2
      scene/gui/panel_container.cpp
  30. 4 4
      scene/gui/popup.cpp
  31. 1 1
      scene/gui/popup_menu.cpp
  32. 7 7
      scene/gui/rich_text_label.cpp
  33. 10 10
      scene/gui/scroll_container.cpp
  34. 1 1
      scene/gui/split_container.cpp
  35. 1 1
      scene/gui/tab_container.cpp
  36. 7 7
      scene/gui/text_edit.cpp
  37. 14 14
      scene/gui/tree.cpp
  38. 1 1
      scene/gui/viewport_container.cpp
  39. 9 9
      scene/main/viewport.cpp
  40. 6 6
      tools/editor/animation_editor.cpp
  41. 1 1
      tools/editor/animation_editor.h
  42. 5 5
      tools/editor/asset_library_editor_plugin.cpp
  43. 7 7
      tools/editor/code_editor.cpp
  44. 1 1
      tools/editor/connections_dialog.h
  45. 1 1
      tools/editor/create_dialog.cpp
  46. 2 2
      tools/editor/editor_dir_dialog.cpp
  47. 4 4
      tools/editor/editor_file_dialog.cpp
  48. 3 3
      tools/editor/editor_help.cpp
  49. 1 1
      tools/editor/editor_log.cpp
  50. 8 8
      tools/editor/editor_node.cpp
  51. 1 1
      tools/editor/editor_sub_scene.cpp
  52. 10 10
      tools/editor/filesystem_dock.cpp
  53. 7 7
      tools/editor/plugins/animation_player_editor_plugin.cpp
  54. 1 1
      tools/editor/plugins/animation_tree_editor_plugin.cpp
  55. 33 33
      tools/editor/plugins/canvas_item_editor_plugin.cpp
  56. 2 2
      tools/editor/plugins/path_2d_editor_plugin.cpp
  57. 1 1
      tools/editor/plugins/resource_preloader_editor_plugin.cpp
  58. 1 1
      tools/editor/plugins/sample_library_editor_plugin.cpp
  59. 5 5
      tools/editor/plugins/script_editor_plugin.cpp
  60. 1 1
      tools/editor/plugins/script_text_editor.cpp
  61. 1 1
      tools/editor/plugins/shader_editor_plugin.cpp
  62. 3 3
      tools/editor/plugins/spatial_editor_plugin.cpp
  63. 1 1
      tools/editor/plugins/sprite_frames_editor_plugin.cpp
  64. 1 1
      tools/editor/plugins/style_box_editor_plugin.cpp
  65. 1 1
      tools/editor/plugins/theme_editor_plugin.cpp
  66. 2 2
      tools/editor/plugins/tile_map_editor_plugin.cpp
  67. 2 2
      tools/editor/project_export.cpp
  68. 1 1
      tools/editor/project_manager.cpp
  69. 2 2
      tools/editor/property_editor.cpp
  70. 1 1
      tools/editor/scene_tree_dock.cpp
  71. 1 1
      tools/editor/scene_tree_editor.cpp
  72. 5 5
      tools/editor/script_editor_debugger.cpp

+ 15 - 34
scene/2d/canvas_item.cpp

@@ -182,7 +182,7 @@ CanvasItemMaterial::~CanvasItemMaterial(){
 
 
 
 
 
 
-bool CanvasItem::is_visible() const {
+bool CanvasItem::is_visible_in_tree() const {
 
 
 	if (!is_inside_tree())
 	if (!is_inside_tree())
 		return false;
 		return false;
@@ -190,7 +190,7 @@ bool CanvasItem::is_visible() const {
 	const CanvasItem *p=this;
 	const CanvasItem *p=this;
 
 
 	while(p) {
 	while(p) {
-		if (p->hidden)
+		if (!p->visible)
 			return false;
 			return false;
 		p=p->get_parent_item();
 		p=p->get_parent_item();
 	}
 	}
@@ -199,13 +199,6 @@ bool CanvasItem::is_visible() const {
 	return true;
 	return true;
 }
 }
 
 
-bool CanvasItem::is_hidden() const {
-
-	/*if (!is_inside_scene())
-		return false;*/
-
-	return hidden;
-}
 
 
 void CanvasItem::_propagate_visibility_changed(bool p_visible) {
 void CanvasItem::_propagate_visibility_changed(bool p_visible) {
 
 
@@ -221,7 +214,7 @@ void CanvasItem::_propagate_visibility_changed(bool p_visible) {
 
 
 		CanvasItem *c=get_child(i)->cast_to<CanvasItem>();
 		CanvasItem *c=get_child(i)->cast_to<CanvasItem>();
 
 
-		if (c && !c->hidden) //should the toplevels stop propagation? i think so but..
+		if (c && c->visible) //should the toplevels stop propagation? i think so but..
 			c->_propagate_visibility_changed(p_visible);
 			c->_propagate_visibility_changed(p_visible);
 	}
 	}
 
 
@@ -231,10 +224,10 @@ void CanvasItem::_propagate_visibility_changed(bool p_visible) {
 
 
 void CanvasItem::show() {
 void CanvasItem::show() {
 
 
-	if (!hidden)
+	if (visible)
 		return;
 		return;
 
 
-	hidden=false;
+	visible=true;
 	VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,true);
 	VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,true);
 
 
 	if (!is_inside_tree())
 	if (!is_inside_tree())
@@ -247,10 +240,10 @@ void CanvasItem::show() {
 
 
 void CanvasItem::hide() {
 void CanvasItem::hide() {
 
 
-	if (hidden)
+	if (!visible)
 		return;
 		return;
 
 
-	hidden=true;
+	visible=false;
 	VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,false);
 	VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,false);
 
 
 	if (!is_inside_tree())
 	if (!is_inside_tree())
@@ -260,16 +253,6 @@ void CanvasItem::hide() {
 	_change_notify("visibility/visible");
 	_change_notify("visibility/visible");
 }
 }
 
 
-void CanvasItem::set_hidden(bool p_hidden) {
-
-	if (hidden == p_hidden) {
-		return;
-	}
-
-	_set_visible_(!p_hidden);
-}
-
-
 Variant CanvasItem::edit_get_state() const {
 Variant CanvasItem::edit_get_state() const {
 
 
 
 
@@ -306,7 +289,7 @@ void CanvasItem::_update_callback() {
 
 
 	VisualServer::get_singleton()->canvas_item_clear(get_canvas_item());
 	VisualServer::get_singleton()->canvas_item_clear(get_canvas_item());
 	//todo updating = true - only allow drawing here
 	//todo updating = true - only allow drawing here
-	if (is_visible()) { //todo optimize this!!
+	if (is_visible_in_tree()) { //todo optimize this!!
 		if (first_draw) {
 		if (first_draw) {
 			notification(NOTIFICATION_VISIBILITY_CHANGED);
 			notification(NOTIFICATION_VISIBILITY_CHANGED);
 			first_draw=false;
 			first_draw=false;
@@ -495,16 +478,16 @@ void CanvasItem::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void CanvasItem::_set_visible_(bool p_visible) {
+void CanvasItem::set_visible(bool p_visible) {
 
 
 	if (p_visible)
 	if (p_visible)
 		show();
 		show();
 	else
 	else
 		hide();
 		hide();
 }
 }
-bool CanvasItem::_is_visible_() const {
+bool CanvasItem::is_visible() const {
 
 
-	return !is_hidden();
+	return visible;
 }
 }
 
 
 
 
@@ -924,8 +907,6 @@ void CanvasItem::_bind_methods() {
 
 
 	ClassDB::bind_method(_MD("_toplevel_raise_self"),&CanvasItem::_toplevel_raise_self);
 	ClassDB::bind_method(_MD("_toplevel_raise_self"),&CanvasItem::_toplevel_raise_self);
 	ClassDB::bind_method(_MD("_update_callback"),&CanvasItem::_update_callback);
 	ClassDB::bind_method(_MD("_update_callback"),&CanvasItem::_update_callback);
-	ClassDB::bind_method(_MD("_set_visible_"),&CanvasItem::_set_visible_);
-	ClassDB::bind_method(_MD("_is_visible_"),&CanvasItem::_is_visible_);
 
 
 	ClassDB::bind_method(_MD("edit_set_state","state"),&CanvasItem::edit_set_state);
 	ClassDB::bind_method(_MD("edit_set_state","state"),&CanvasItem::edit_set_state);
 	ClassDB::bind_method(_MD("edit_get_state:Variant"),&CanvasItem::edit_get_state);
 	ClassDB::bind_method(_MD("edit_get_state:Variant"),&CanvasItem::edit_get_state);
@@ -938,11 +919,11 @@ void CanvasItem::_bind_methods() {
 
 
 	ClassDB::bind_method(_MD("get_canvas_item"),&CanvasItem::get_canvas_item);
 	ClassDB::bind_method(_MD("get_canvas_item"),&CanvasItem::get_canvas_item);
 
 
+	ClassDB::bind_method(_MD("set_visible"),&CanvasItem::set_visible);
 	ClassDB::bind_method(_MD("is_visible"),&CanvasItem::is_visible);
 	ClassDB::bind_method(_MD("is_visible"),&CanvasItem::is_visible);
-	ClassDB::bind_method(_MD("is_hidden"),&CanvasItem::is_hidden);
+	ClassDB::bind_method(_MD("is_visible_in_tree"),&CanvasItem::is_visible_in_tree);
 	ClassDB::bind_method(_MD("show"),&CanvasItem::show);
 	ClassDB::bind_method(_MD("show"),&CanvasItem::show);
 	ClassDB::bind_method(_MD("hide"),&CanvasItem::hide);
 	ClassDB::bind_method(_MD("hide"),&CanvasItem::hide);
-	ClassDB::bind_method(_MD("set_hidden","hidden"),&CanvasItem::set_hidden);
 
 
 	ClassDB::bind_method(_MD("update"),&CanvasItem::update);
 	ClassDB::bind_method(_MD("update"),&CanvasItem::update);
 
 
@@ -1010,7 +991,7 @@ void CanvasItem::_bind_methods() {
 	BIND_VMETHOD(MethodInfo("_draw"));
 	BIND_VMETHOD(MethodInfo("_draw"));
 
 
 	ADD_GROUP("Visibility","");
 	ADD_GROUP("Visibility","");
-	ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("_set_visible_"),_SCS("_is_visible_") );
+	ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("set_visible"),_SCS("is_visible") );
 	ADD_PROPERTYNO( PropertyInfo(Variant::COLOR,"modulate"), _SCS("set_modulate"),_SCS("get_modulate") );
 	ADD_PROPERTYNO( PropertyInfo(Variant::COLOR,"modulate"), _SCS("set_modulate"),_SCS("get_modulate") );
 	ADD_PROPERTYNO( PropertyInfo(Variant::COLOR,"self_modulate"), _SCS("set_self_modulate"),_SCS("get_self_modulate") );
 	ADD_PROPERTYNO( PropertyInfo(Variant::COLOR,"self_modulate"), _SCS("set_self_modulate"),_SCS("get_self_modulate") );
 	ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"show_behind_parent"), _SCS("set_draw_behind_parent"),_SCS("is_draw_behind_parent_enabled") );
 	ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"show_behind_parent"), _SCS("set_draw_behind_parent"),_SCS("is_draw_behind_parent_enabled") );
@@ -1125,7 +1106,7 @@ CanvasItem::CanvasItem() : xform_change(this) {
 
 
 
 
 	canvas_item=VisualServer::get_singleton()->canvas_item_create();
 	canvas_item=VisualServer::get_singleton()->canvas_item_create();
-	hidden=false;
+	visible=true;
 	pending_update=false;
 	pending_update=false;
 	modulate=Color(1,1,1,1);
 	modulate=Color(1,1,1,1);
 	self_modulate=Color(1,1,1,1);
 	self_modulate=Color(1,1,1,1);

+ 3 - 5
scene/2d/canvas_item.h

@@ -109,7 +109,7 @@ private:
 	int light_mask;
 	int light_mask;
 
 
 	bool first_draw;
 	bool first_draw;
-	bool hidden;
+	bool visible;
 	bool pending_update;
 	bool pending_update;
 	bool toplevel;
 	bool toplevel;
 	bool drawing;
 	bool drawing;
@@ -129,8 +129,6 @@ private:
 
 
 	void _propagate_visibility_changed(bool p_visible);
 	void _propagate_visibility_changed(bool p_visible);
 
 
-	void _set_visible_(bool p_visible);
-	bool _is_visible_() const;
 
 
 	void _update_callback();
 	void _update_callback();
 
 
@@ -174,11 +172,11 @@ public:
 
 
 	/* VISIBILITY */
 	/* VISIBILITY */
 
 
+	void set_visible(bool p_visible);
 	bool is_visible() const;
 	bool is_visible() const;
-	bool is_hidden() const;
+	bool is_visible_in_tree() const;
 	void show();
 	void show();
 	void hide();
 	void hide();
-	void set_hidden(bool p_hidden);
 
 
 	void update();
 	void update();
 
 

+ 4 - 4
scene/2d/canvas_modulate.cpp

@@ -33,7 +33,7 @@ void CanvasModulate::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_ENTER_CANVAS) {
 	if (p_what==NOTIFICATION_ENTER_CANVAS) {
 
 
-		if (is_visible()) {
+		if (is_visible_in_tree()) {
 			VS::get_singleton()->canvas_set_modulate(get_canvas(),color);
 			VS::get_singleton()->canvas_set_modulate(get_canvas(),color);
 			add_to_group("_canvas_modulate_"+itos(get_canvas().get_id()));
 			add_to_group("_canvas_modulate_"+itos(get_canvas().get_id()));
 		}
 		}
@@ -42,13 +42,13 @@ void CanvasModulate::_notification(int p_what) {
 
 
 	} else if (p_what==NOTIFICATION_EXIT_CANVAS) {
 	} else if (p_what==NOTIFICATION_EXIT_CANVAS) {
 
 
-		if (is_visible()) {
+		if (is_visible_in_tree()) {
 			VS::get_singleton()->canvas_set_modulate(get_canvas(),Color(1,1,1,1));
 			VS::get_singleton()->canvas_set_modulate(get_canvas(),Color(1,1,1,1));
 			remove_from_group("_canvas_modulate_"+itos(get_canvas().get_id()));
 			remove_from_group("_canvas_modulate_"+itos(get_canvas().get_id()));
 		}
 		}
 	} else if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	} else if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		if (is_visible()) {
+		if (is_visible_in_tree()) {
 			VS::get_singleton()->canvas_set_modulate(get_canvas(),color);
 			VS::get_singleton()->canvas_set_modulate(get_canvas(),color);
 			add_to_group("_canvas_modulate_"+itos(get_canvas().get_id()));
 			add_to_group("_canvas_modulate_"+itos(get_canvas().get_id()));
 		} else {
 		} else {
@@ -83,7 +83,7 @@ Color CanvasModulate::get_color() const {
 
 
 String CanvasModulate::get_configuration_warning() const {
 String CanvasModulate::get_configuration_warning() const {
 
 
-	if (!is_visible() || !is_inside_tree())
+	if (!is_visible_in_tree() || !is_inside_tree())
 		return String();
 		return String();
 
 
 	List<Node*> nodes;
 	List<Node*> nodes;

+ 1 - 1
scene/2d/collision_object_2d.cpp

@@ -212,7 +212,7 @@ void CollisionObject2D::_mouse_exit() {
 void CollisionObject2D::_update_pickable() {
 void CollisionObject2D::_update_pickable() {
 	if (!is_inside_tree())
 	if (!is_inside_tree())
 		return;
 		return;
-	bool pickable = this->pickable && is_inside_tree() && is_visible();
+	bool pickable = this->pickable && is_inside_tree() && is_visible_in_tree();
 	if (area)
 	if (area)
 		Physics2DServer::get_singleton()->area_set_pickable(rid,pickable);
 		Physics2DServer::get_singleton()->area_set_pickable(rid,pickable);
 	else
 	else

+ 1 - 1
scene/2d/light_2d.cpp

@@ -83,7 +83,7 @@ void Light2D::_update_light_visibility() {
 	}
 	}
 #endif
 #endif
 
 
-	VS::get_singleton()->canvas_light_set_enabled(canvas_light,enabled && is_visible() && editor_ok);
+	VS::get_singleton()->canvas_light_set_enabled(canvas_light,enabled && is_visible_in_tree() && editor_ok);
 }
 }
 
 
 void Light2D::set_enabled( bool p_enabled) {
 void Light2D::set_enabled( bool p_enabled) {

+ 2 - 2
scene/2d/light_occluder_2d.cpp

@@ -123,7 +123,7 @@ void LightOccluder2D::_notification(int p_what) {
 
 
 		VS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder,get_canvas());
 		VS::get_singleton()->canvas_light_occluder_attach_to_canvas(occluder,get_canvas());
 		VS::get_singleton()->canvas_light_occluder_set_transform(occluder,get_global_transform());
 		VS::get_singleton()->canvas_light_occluder_set_transform(occluder,get_global_transform());
-		VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible());
+		VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible_in_tree());
 
 
 	}
 	}
 	if (p_what==NOTIFICATION_TRANSFORM_CHANGED) {
 	if (p_what==NOTIFICATION_TRANSFORM_CHANGED) {
@@ -132,7 +132,7 @@ void LightOccluder2D::_notification(int p_what) {
 	}
 	}
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible());
+		VS::get_singleton()->canvas_light_occluder_set_enabled(occluder,is_visible_in_tree());
 	}
 	}
 
 
 	if (p_what==NOTIFICATION_DRAW) {
 	if (p_what==NOTIFICATION_DRAW) {

+ 1 - 1
scene/2d/navigation_polygon.cpp

@@ -459,7 +459,7 @@ void NavigationPolygonInstance::_navpoly_changed() {
 
 
 String NavigationPolygonInstance::get_configuration_warning() const {
 String NavigationPolygonInstance::get_configuration_warning() const {
 
 
-	if (!is_visible() || !is_inside_tree())
+	if (!is_visible_in_tree() || !is_inside_tree())
 		return String();
 		return String();
 
 
 	if (!navpoly.is_valid()) {
 	if (!navpoly.is_valid()) {

+ 1 - 1
scene/2d/path_2d.cpp

@@ -239,7 +239,7 @@ void PathFollow2D::_get_property_list( List<PropertyInfo> *p_list) const{
 
 
 String PathFollow2D::get_configuration_warning() const {
 String PathFollow2D::get_configuration_warning() const {
 
 
-	if (!is_visible() || !is_inside_tree())
+	if (!is_visible_in_tree() || !is_inside_tree())
 		return String();
 		return String();
 
 
 	if (!get_parent() || !get_parent()->cast_to<Path2D>()) {
 	if (!get_parent() || !get_parent()->cast_to<Path2D>()) {

+ 1 - 1
scene/2d/screen_button.cpp

@@ -236,7 +236,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) {
 
 
 			if (p_event.screen_touch.pressed) {
 			if (p_event.screen_touch.pressed) {
 
 
-				if (!is_visible())
+				if (!is_visible_in_tree())
 					return;
 					return;
 
 
 				if (finger_pressed!=-1)
 				if (finger_pressed!=-1)

+ 1 - 1
scene/3d/collision_object.cpp

@@ -206,7 +206,7 @@ void CollisionObject::_mouse_exit() {
 void CollisionObject::_update_pickable() {
 void CollisionObject::_update_pickable() {
 	if (!is_inside_tree())
 	if (!is_inside_tree())
 		return;
 		return;
-	bool pickable = ray_pickable && is_inside_tree() && is_visible();
+	bool pickable = ray_pickable && is_inside_tree() && is_visible_in_tree();
 	if (area)
 	if (area)
 		PhysicsServer::get_singleton()->area_set_ray_pickable(rid,pickable);
 		PhysicsServer::get_singleton()->area_set_ray_pickable(rid,pickable);
 	else
 	else

+ 1 - 1
scene/3d/light.cpp

@@ -164,7 +164,7 @@ void Light::_update_visibility() {
 	}
 	}
 #endif
 #endif
 
 
-	//VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && editor_ok);
+	//VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible_in_tree() && editor_ok);
 	_change_notify("geometry/visible");
 	_change_notify("geometry/visible");
 
 
 }
 }

+ 1 - 1
scene/3d/navigation_mesh.cpp

@@ -373,7 +373,7 @@ Ref<NavigationMesh> NavigationMeshInstance::get_navigation_mesh() const{
 
 
 String NavigationMeshInstance::get_configuration_warning() const {
 String NavigationMeshInstance::get_configuration_warning() const {
 
 
-	if (!is_visible() || !is_inside_tree())
+	if (!is_visible_in_tree() || !is_inside_tree())
 		return String();
 		return String();
 
 
 	if (!navmesh.is_valid()) {
 	if (!navmesh.is_valid()) {

+ 1 - 1
scene/3d/scenario_fx.cpp

@@ -83,7 +83,7 @@ Ref<Environment> WorldEnvironment::get_environment() const {
 
 
 String WorldEnvironment::get_configuration_warning() const {
 String WorldEnvironment::get_configuration_warning() const {
 
 
-	if (!is_visible() || !is_inside_tree() || !environment.is_valid())
+	if (!is_visible_in_tree() || !is_inside_tree() || !environment.is_valid())
 		return String();
 		return String();
 
 
 	List<Node*> nodes;
 	List<Node*> nodes;

+ 10 - 27
scene/3d/spatial.cpp

@@ -482,7 +482,7 @@ void Spatial::_update_gizmo() {
 
 
 	data.gizmo_dirty=false;
 	data.gizmo_dirty=false;
 	if (data.gizmo.is_valid()) {
 	if (data.gizmo.is_valid()) {
-		if (is_visible())
+		if (is_visible_in_tree())
 			data.gizmo->redraw();
 			data.gizmo->redraw();
 		else
 		else
 			data.gizmo->clear();
 			data.gizmo->clear();
@@ -573,7 +573,7 @@ void Spatial::show() {
 	if (!is_inside_tree())
 	if (!is_inside_tree())
 		return;
 		return;
 
 
-	if (!data.parent || is_visible()) {
+	if (!data.parent || is_visible_in_tree()) {
 
 
 		_propagate_visibility_changed();
 		_propagate_visibility_changed();
 	}
 	}
@@ -584,7 +584,7 @@ void Spatial::hide(){
 	if (!data.visible)
 	if (!data.visible)
 		return;
 		return;
 
 
-	bool was_visible = is_visible();
+	bool was_visible = is_visible_in_tree();
 	data.visible=false;
 	data.visible=false;
 
 
 	if (!data.parent || was_visible) {
 	if (!data.parent || was_visible) {
@@ -593,7 +593,7 @@ void Spatial::hide(){
 	}
 	}
 
 
 }
 }
-bool Spatial::is_visible() const{
+bool Spatial::is_visible_in_tree() const{
 
 
 	const Spatial *s=this;
 	const Spatial *s=this;
 
 
@@ -608,21 +608,7 @@ bool Spatial::is_visible() const{
 }
 }
 
 
 
 
-bool Spatial::is_hidden() const{
-
-	return !data.visible;
-}
-
-void Spatial::set_hidden(bool p_hidden) {
-
-	if (data.visible != p_hidden) {
-		return;
-	}
-
-	_set_visible_(!p_hidden);
-}
-
-void Spatial::_set_visible_(bool p_visible) {
+void Spatial::set_visible(bool p_visible) {
 
 
 	if (p_visible)
 	if (p_visible)
 		show();
 		show();
@@ -630,9 +616,9 @@ void Spatial::_set_visible_(bool p_visible) {
 		hide();
 		hide();
 }
 }
 
 
-bool Spatial::_is_visible_() const {
+bool Spatial::is_visible() const {
 
 
-	return !is_hidden();
+	return !data.visible;
 }
 }
 
 
 void Spatial::rotate(const Vector3& p_normal,float p_radians) {
 void Spatial::rotate(const Vector3& p_normal,float p_radians) {
@@ -787,14 +773,11 @@ void Spatial::_bind_methods() {
 	ClassDB::bind_method(_MD("set_gizmo","gizmo:SpatialGizmo"), &Spatial::set_gizmo);
 	ClassDB::bind_method(_MD("set_gizmo","gizmo:SpatialGizmo"), &Spatial::set_gizmo);
 	ClassDB::bind_method(_MD("get_gizmo:SpatialGizmo"), &Spatial::get_gizmo);
 	ClassDB::bind_method(_MD("get_gizmo:SpatialGizmo"), &Spatial::get_gizmo);
 
 
+	ClassDB::bind_method(_MD("set_visible"), &Spatial::set_visible);
+	ClassDB::bind_method(_MD("is_visible"), &Spatial::is_visible);
+	ClassDB::bind_method(_MD("is_visible_in_tree"), &Spatial::is_visible_in_tree);
 	ClassDB::bind_method(_MD("show"), &Spatial::show);
 	ClassDB::bind_method(_MD("show"), &Spatial::show);
 	ClassDB::bind_method(_MD("hide"), &Spatial::hide);
 	ClassDB::bind_method(_MD("hide"), &Spatial::hide);
-	ClassDB::bind_method(_MD("is_visible"), &Spatial::is_visible);
-	ClassDB::bind_method(_MD("is_hidden"), &Spatial::is_hidden);
-	ClassDB::bind_method(_MD("set_hidden","hidden"), &Spatial::set_hidden);
-
-	ClassDB::bind_method(_MD("_set_visible_"), &Spatial::_set_visible_);
-	ClassDB::bind_method(_MD("_is_visible_"), &Spatial::_is_visible_);
 
 
 	ClassDB::bind_method(_MD("set_notify_local_transform","enable"), &Spatial::set_notify_local_transform);
 	ClassDB::bind_method(_MD("set_notify_local_transform","enable"), &Spatial::set_notify_local_transform);
 	ClassDB::bind_method(_MD("is_local_transform_notification_enabled"), &Spatial::is_local_transform_notification_enabled);
 	ClassDB::bind_method(_MD("is_local_transform_notification_enabled"), &Spatial::is_local_transform_notification_enabled);

+ 3 - 5
scene/3d/spatial.h

@@ -127,8 +127,6 @@ protected:
 	void _notification(int p_what);
 	void _notification(int p_what);
 	static void _bind_methods();
 	static void _bind_methods();
 
 
-	void _set_visible_(bool p_visible);
-	bool _is_visible_() const;
 public:
 public:
 
 
 	enum {
 	enum {
@@ -194,11 +192,11 @@ public:
 	void orthonormalize();
 	void orthonormalize();
 	void set_identity();
 	void set_identity();
 
 
+	void set_visible(bool p_visible);
+	bool is_visible() const;
 	void show();
 	void show();
 	void hide();
 	void hide();
-	bool is_visible() const;
-	bool is_hidden() const;
-	void set_hidden(bool p_hidden);
+	bool is_visible_in_tree() const;
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 	void set_import_transform(const Transform& p_transform)	;
 	void set_import_transform(const Transform& p_transform)	;

+ 1 - 1
scene/3d/visual_instance.cpp

@@ -45,7 +45,7 @@ void VisualInstance::_update_visibility() {
 		return;
 		return;
 
 
 	_change_notify("visible");
 	_change_notify("visible");
-	VS::get_singleton()->instance_set_visible(get_instance(),is_visible());
+	VS::get_singleton()->instance_set_visible(get_instance(),is_visible_in_tree());
 }
 }
 
 
 
 

+ 2 - 2
scene/gui/base_button.cpp

@@ -297,7 +297,7 @@ void BaseButton::_notification(int p_what) {
 
 
 	}
 	}
 
 
-	if (p_what==NOTIFICATION_VISIBILITY_CHANGED && !is_visible()) {
+	if (p_what==NOTIFICATION_VISIBILITY_CHANGED && !is_visible_in_tree()) {
 
 
 		if (!toggle_mode) {
 		if (!toggle_mode) {
 			status.pressed = false;
 			status.pressed = false;
@@ -453,7 +453,7 @@ Ref<ShortCut> BaseButton:: get_shortcut() const {
 
 
 void BaseButton::_unhandled_input(InputEvent p_event) {
 void BaseButton::_unhandled_input(InputEvent p_event) {
 
 
-	if (!is_disabled() && is_visible() && p_event.is_pressed() && !p_event.is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
+	if (!is_disabled() && is_visible_in_tree() && p_event.is_pressed() && !p_event.is_echo() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
 
 
 		if (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this))
 		if (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this))
 			return; //ignore because of modal window
 			return; //ignore because of modal window

+ 4 - 4
scene/gui/box_container.cpp

@@ -55,7 +55,7 @@ void BoxContainer::_resort() {
 
 
 	for(int i=0;i<get_child_count();i++) {
 	for(int i=0;i<get_child_count();i++) {
 		Control *c=get_child(i)->cast_to<Control>();
 		Control *c=get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible())
+		if (!c || !c->is_visible_in_tree())
 			continue;
 			continue;
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
@@ -108,7 +108,7 @@ void BoxContainer::_resort() {
 		for(int i=0;i<get_child_count();i++) {
 		for(int i=0;i<get_child_count();i++) {
 
 
 			Control *c=get_child(i)->cast_to<Control>();
 			Control *c=get_child(i)->cast_to<Control>();
-			if (!c || !c->is_visible())
+			if (!c || !c->is_visible_in_tree())
 				continue;
 				continue;
 			if (c->is_set_as_toplevel())
 			if (c->is_set_as_toplevel())
 				continue;
 				continue;
@@ -164,7 +164,7 @@ void BoxContainer::_resort() {
 	for(int i=0;i<get_child_count();i++) {
 	for(int i=0;i<get_child_count();i++) {
 
 
 		Control *c=get_child(i)->cast_to<Control>();
 		Control *c=get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible())
+		if (!c || !c->is_visible_in_tree())
 			continue;
 			continue;
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
@@ -227,7 +227,7 @@ Size2 BoxContainer::get_minimum_size() const {
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
 
 
-		if (c->is_hidden()) {
+		if (!c->is_visible()) {
 			continue;
 			continue;
 		}
 		}
 
 

+ 1 - 1
scene/gui/center_container.cpp

@@ -42,7 +42,7 @@ Size2 CenterContainer::get_minimum_size() const {
 			continue;
 			continue;
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
-		if (c->is_hidden())
+		if (!c->is_visible())
 			continue;
 			continue;
 		Size2 minsize = c->get_combined_minimum_size();
 		Size2 minsize = c->get_combined_minimum_size();
 		ms.width = MAX(ms.width , minsize.width);
 		ms.width = MAX(ms.width , minsize.width);

+ 1 - 1
scene/gui/container.cpp

@@ -147,7 +147,7 @@ void Container::_notification(int p_what) {
 		} break;
 		} break;
 		case NOTIFICATION_VISIBILITY_CHANGED: {
 		case NOTIFICATION_VISIBILITY_CHANGED: {
 
 
-			if (is_visible()) {
+			if (is_visible_in_tree()) {
 				queue_sort();
 				queue_sort();
 			}
 			}
 		} break;
 		} break;

+ 8 - 8
scene/gui/control.cpp

@@ -565,7 +565,7 @@ void Control::_notification(int p_notification) {
 		} break;
 		} break;
 		case NOTIFICATION_VISIBILITY_CHANGED: {
 		case NOTIFICATION_VISIBILITY_CHANGED: {
 
 
-			if (!is_visible()) {
+			if (!is_visible_in_tree()) {
 
 
 				if(get_viewport() != NULL)
 				if(get_viewport() != NULL)
 					get_viewport()->_gui_hid_control(this);
 					get_viewport()->_gui_hid_control(this);
@@ -1660,7 +1660,7 @@ static Control *_next_control(Control *p_from) {
 	for(int i=(next+1);i<parent->get_child_count();i++) {
 	for(int i=(next+1);i<parent->get_child_count();i++) {
 
 
 		Control *c = parent->get_child(i)->cast_to<Control>();
 		Control *c = parent->get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible() || c->is_set_as_toplevel())
+		if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel())
 			continue;
 			continue;
 
 
 		return c;
 		return c;
@@ -1685,7 +1685,7 @@ Control *Control::find_next_valid_focus() const {
 		for(int i=0;i<from->get_child_count();i++) {
 		for(int i=0;i<from->get_child_count();i++) {
 
 
 			Control *c = from->get_child(i)->cast_to<Control>();
 			Control *c = from->get_child(i)->cast_to<Control>();
-			if (!c || !c->is_visible() || c->is_set_as_toplevel()) {
+			if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) {
 				continue;
 				continue;
 			}
 			}
 
 
@@ -1751,7 +1751,7 @@ static Control *_prev_control(Control *p_from) {
 	for(int i=p_from->get_child_count()-1;i>=0;i--) {
 	for(int i=p_from->get_child_count()-1;i>=0;i--) {
 
 
 		Control *c = p_from->get_child(i)->cast_to<Control>();
 		Control *c = p_from->get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible() || c->is_set_as_toplevel())
+		if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel())
 			continue;
 			continue;
 
 
 		child=c;
 		child=c;
@@ -1791,7 +1791,7 @@ Control *Control::find_prev_valid_focus() const {
 
 
 					Control *c = from->get_parent()->get_child(i)->cast_to<Control>();
 					Control *c = from->get_parent()->get_child(i)->cast_to<Control>();
 
 
-					if (!c || !c->is_visible() || c->is_set_as_toplevel()) {
+					if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) {
 						continue;
 						continue;
 					}
 					}
 
 
@@ -1875,7 +1875,7 @@ void Control::show_modal(bool p_exclusive) {
 	ERR_FAIL_COND(!is_inside_tree());
 	ERR_FAIL_COND(!is_inside_tree());
 	ERR_FAIL_COND(!data.SI);
 	ERR_FAIL_COND(!data.SI);
 
 
-	if (is_visible())
+	if (is_visible_in_tree())
 		hide();
 		hide();
 
 
 	ERR_FAIL_COND( data.MI!=NULL );
 	ERR_FAIL_COND( data.MI!=NULL );
@@ -2053,7 +2053,7 @@ Control *Control::_get_focus_neighbour(Margin p_margin,int p_count) {
 			return NULL;
 			return NULL;
 		}
 		}
 		bool valid=true;
 		bool valid=true;
-		if (c->is_hidden())
+		if (!c->is_visible())
 			valid=false;
 			valid=false;
 		if (c->get_focus_mode()==FOCUS_NONE)
 		if (c->get_focus_mode()==FOCUS_NONE)
 			valid=false;
 			valid=false;
@@ -2126,7 +2126,7 @@ void Control::_window_find_focus_neighbour(const Vector2& p_dir, Node *p_at,cons
 
 
 	Control *c = p_at->cast_to<Control>();
 	Control *c = p_at->cast_to<Control>();
 
 
-	if (c && c !=this && c->get_focus_mode()==FOCUS_ALL && c->is_visible()) {
+	if (c && c !=this && c->get_focus_mode()==FOCUS_ALL && c->is_visible_in_tree()) {
 
 
 		Point2 points[4];
 		Point2 points[4];
 
 

+ 1 - 1
scene/gui/file_dialog.cpp

@@ -615,7 +615,7 @@ void FileDialog::set_access(Access p_access) {
 
 
 void FileDialog::invalidate() {
 void FileDialog::invalidate() {
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 		update_file_list();
 		update_file_list();
 		invalidated=false;
 		invalidated=false;
 	} else {
 	} else {

+ 1 - 1
scene/gui/graph_edit.cpp

@@ -1054,7 +1054,7 @@ void GraphEdit::set_zoom(float p_zoom) {
 	_update_scroll();
 	_update_scroll();
 	connections_layer->update();
 	connections_layer->update();
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 
 
 		Vector2 ofs  = sbofs*zoom - get_size()/2;
 		Vector2 ofs  = sbofs*zoom - get_size()/2;
 		h_scroll->set_value( ofs.x );
 		h_scroll->set_value( ofs.x );

+ 3 - 3
scene/gui/grid_container.cpp

@@ -53,7 +53,7 @@ void GridContainer::_notification(int p_what) {
 			for(int i=0;i<get_child_count();i++) {
 			for(int i=0;i<get_child_count();i++) {
 
 
 				Control *c = get_child(i)->cast_to<Control>();
 				Control *c = get_child(i)->cast_to<Control>();
-				if (!c || !c->is_visible())
+				if (!c || !c->is_visible_in_tree())
 					continue;
 					continue;
 
 
 				int row = idx / columns;
 				int row = idx / columns;
@@ -112,7 +112,7 @@ void GridContainer::_notification(int p_what) {
 			for(int i=0;i<get_child_count();i++) {
 			for(int i=0;i<get_child_count();i++) {
 
 
 				Control *c = get_child(i)->cast_to<Control>();
 				Control *c = get_child(i)->cast_to<Control>();
-				if (!c || !c->is_visible())
+				if (!c || !c->is_visible_in_tree())
 					continue;
 					continue;
 				int row = idx / columns;
 				int row = idx / columns;
 				int col = idx % columns;
 				int col = idx % columns;
@@ -191,7 +191,7 @@ Size2 GridContainer::get_minimum_size() const {
 	for(int i=0;i<get_child_count();i++) {
 	for(int i=0;i<get_child_count();i++) {
 
 
 		Control *c = get_child(i)->cast_to<Control>();
 		Control *c = get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible())
+		if (!c || !c->is_visible_in_tree())
 			continue;
 			continue;
 		int row = idx / columns;
 		int row = idx / columns;
 		int col = idx % columns;
 		int col = idx % columns;

+ 1 - 1
scene/gui/item_list.cpp

@@ -801,7 +801,7 @@ void ItemList::_notification(int p_what) {
 
 
 		float page = size.height-bg->get_minimum_size().height;
 		float page = size.height-bg->get_minimum_size().height;
 		int width = size.width-bg->get_minimum_size().width;
 		int width = size.width-bg->get_minimum_size().width;
-		if (!scroll_bar->is_hidden()){
+		if (scroll_bar->is_visible()){
 			width-=mw+bg->get_margin(MARGIN_RIGHT);
 			width-=mw+bg->get_margin(MARGIN_RIGHT);
 		}
 		}
 		scroll_bar->set_page(page);
 		scroll_bar->set_page(page);

+ 1 - 1
scene/gui/line_edit.cpp

@@ -853,7 +853,7 @@ void LineEdit::_reset_caret_blink_timer() {
 
 
 void LineEdit::_toggle_draw_caret() {
 void LineEdit::_toggle_draw_caret() {
 	draw_caret = !draw_caret;
 	draw_caret = !draw_caret;
-	if (is_visible() && has_focus() && window_has_focus) {
+	if (is_visible_in_tree() && has_focus() && window_has_focus) {
 		update();
 		update();
 	}
 	}
 }
 }

+ 1 - 1
scene/gui/margin_container.cpp

@@ -45,7 +45,7 @@ Size2 MarginContainer::get_minimum_size() const {
 			continue;
 			continue;
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
-		if (c->is_hidden())
+		if (!c->is_visible())
 			continue;
 			continue;
 
 
 		Size2 s = c->get_combined_minimum_size();
 		Size2 s = c->get_combined_minimum_size();

+ 2 - 2
scene/gui/menu_button.cpp

@@ -36,7 +36,7 @@ void MenuButton::_unhandled_key_input(InputEvent p_event) {
 
 
 	if (p_event.is_pressed() && !p_event.is_echo() && (p_event.type==InputEvent::KEY || p_event.type==InputEvent::ACTION || p_event.type==InputEvent::JOYPAD_BUTTON)) {
 	if (p_event.is_pressed() && !p_event.is_echo() && (p_event.type==InputEvent::KEY || p_event.type==InputEvent::ACTION || p_event.type==InputEvent::JOYPAD_BUTTON)) {
 
 
-		if (!get_parent() || !is_visible() || is_disabled())
+		if (!get_parent() || !is_visible_in_tree() || is_disabled())
 			return;
 			return;
 
 
 		bool global_only = (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this));
 		bool global_only = (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this));
@@ -67,7 +67,7 @@ void MenuButton::_gui_input(InputEvent p_event) {
 	/*if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT) {
 	/*if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT) {
 		clicked=p_event.mouse_button.pressed;
 		clicked=p_event.mouse_button.pressed;
 	}
 	}
-	if (clicked && p_event.type==InputEvent::MOUSE_MOTION && popup->is_visible()) {
+	if (clicked && p_event.type==InputEvent::MOUSE_MOTION && popup->is_visible_in_tree()) {
 
 
 		Point2 gt = Point2(p_event.mouse_motion.x,p_event.mouse_motion.y);
 		Point2 gt = Point2(p_event.mouse_motion.x,p_event.mouse_motion.y);
 		gt = get_global_transform().xform(gt);
 		gt = get_global_transform().xform(gt);

+ 2 - 2
scene/gui/panel_container.cpp

@@ -43,7 +43,7 @@ Size2 PanelContainer::get_minimum_size() const {
 	for(int i=0;i<get_child_count();i++) {
 	for(int i=0;i<get_child_count();i++) {
 
 
 		Control *c = get_child(i)->cast_to<Control>();
 		Control *c = get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible())
+		if (!c || !c->is_visible_in_tree())
 			continue;
 			continue;
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
@@ -98,7 +98,7 @@ void PanelContainer::_notification(int p_what) {
 		for(int i=0;i<get_child_count();i++) {
 		for(int i=0;i<get_child_count();i++) {
 
 
 			Control *c = get_child(i)->cast_to<Control>();
 			Control *c = get_child(i)->cast_to<Control>();
-			if (!c || !c->is_visible())
+			if (!c || !c->is_visible_in_tree())
 				continue;
 				continue;
 			if (c->is_set_as_toplevel())
 			if (c->is_set_as_toplevel())
 				continue;
 				continue;

+ 4 - 4
scene/gui/popup.cpp

@@ -39,7 +39,7 @@ void Popup::_gui_input(InputEvent p_event) {
 void Popup::_notification(int p_what) {
 void Popup::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
-		if (popped_up && !is_visible()) {
+		if (popped_up && !is_visible_in_tree()) {
 			popped_up=false;
 			popped_up=false;
 			notification(NOTIFICATION_POPUP_HIDE);
 			notification(NOTIFICATION_POPUP_HIDE);
 			emit_signal("popup_hide");
 			emit_signal("popup_hide");
@@ -103,7 +103,7 @@ void Popup::set_as_minsize() {
 		Control *c=get_child(i)->cast_to<Control>();
 		Control *c=get_child(i)->cast_to<Control>();
 		if (!c)
 		if (!c)
 			continue;
 			continue;
-		if (c->is_hidden())
+		if (!c->is_visible())
 			continue;
 			continue;
 
 
 		Size2 minsize = c->get_combined_minimum_size();
 		Size2 minsize = c->get_combined_minimum_size();
@@ -144,7 +144,7 @@ void Popup::popup_centered_minsize(const Size2& p_minsize) {
 		Control *c=get_child(i)->cast_to<Control>();
 		Control *c=get_child(i)->cast_to<Control>();
 		if (!c)
 		if (!c)
 			continue;
 			continue;
-		if (c->is_hidden())
+		if (!c->is_visible())
 			continue;
 			continue;
 
 
 		Size2 minsize = c->get_combined_minimum_size();
 		Size2 minsize = c->get_combined_minimum_size();
@@ -283,7 +283,7 @@ Popup::Popup() {
 
 
 String Popup::get_configuration_warning() const {
 String Popup::get_configuration_warning() const {
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 		return TTR("Popups will hide by default unless you call popup() or any of the popup*() functions. Making them visible for editing is fine though, but they will hide upon running.");
 		return TTR("Popups will hide by default unless you call popup() or any of the popup*() functions. Making them visible for editing is fine though, but they will hide upon running.");
 	}
 	}
 
 

+ 1 - 1
scene/gui/popup_menu.cpp

@@ -174,7 +174,7 @@ void PopupMenu::_activate_submenu(int over) {
 	Popup *pm = n->cast_to<Popup>();
 	Popup *pm = n->cast_to<Popup>();
 	ERR_EXPLAIN("item subnode is not a Popup: "+items[over].submenu);
 	ERR_EXPLAIN("item subnode is not a Popup: "+items[over].submenu);
 	ERR_FAIL_COND(!pm);
 	ERR_FAIL_COND(!pm);
-	if (pm->is_visible())
+	if (pm->is_visible_in_tree())
 		return; //already visible!
 		return; //already visible!
 
 
 
 

+ 7 - 7
scene/gui/rich_text_label.cpp

@@ -852,32 +852,32 @@ void RichTextLabel::_gui_input(InputEvent p_event) {
 				switch(k.scancode) {
 				switch(k.scancode) {
 					case KEY_PAGEUP: {
 					case KEY_PAGEUP: {
 
 
-						if (vscroll->is_visible())
+						if (vscroll->is_visible_in_tree())
 							vscroll->set_value( vscroll->get_value() - vscroll->get_page() );
 							vscroll->set_value( vscroll->get_value() - vscroll->get_page() );
 					} break;
 					} break;
 					case KEY_PAGEDOWN: {
 					case KEY_PAGEDOWN: {
 
 
-						if (vscroll->is_visible())
+						if (vscroll->is_visible_in_tree())
 							vscroll->set_value( vscroll->get_value() + vscroll->get_page() );
 							vscroll->set_value( vscroll->get_value() + vscroll->get_page() );
 					} break;
 					} break;
 					case KEY_UP: {
 					case KEY_UP: {
 
 
-						if (vscroll->is_visible())
+						if (vscroll->is_visible_in_tree())
 							vscroll->set_value( vscroll->get_value() - get_font("normal_font")->get_height() );
 							vscroll->set_value( vscroll->get_value() - get_font("normal_font")->get_height() );
 					} break;
 					} break;
 					case KEY_DOWN: {
 					case KEY_DOWN: {
 
 
-						if (vscroll->is_visible())
+						if (vscroll->is_visible_in_tree())
 							vscroll->set_value( vscroll->get_value() + get_font("normal_font")->get_height() );
 							vscroll->set_value( vscroll->get_value() + get_font("normal_font")->get_height() );
 					} break;
 					} break;
 					case KEY_HOME: {
 					case KEY_HOME: {
 
 
-						if (vscroll->is_visible())
+						if (vscroll->is_visible_in_tree())
 							vscroll->set_value( 0 );
 							vscroll->set_value( 0 );
 					} break;
 					} break;
 					case KEY_END: {
 					case KEY_END: {
 
 
-						if (vscroll->is_visible())
+						if (vscroll->is_visible_in_tree())
 							vscroll->set_value( vscroll->get_max() );
 							vscroll->set_value( vscroll->get_max() );
 					} break;
 					} break;
 					case KEY_INSERT:
 					case KEY_INSERT:
@@ -1429,7 +1429,7 @@ bool RichTextLabel::is_scroll_active() const {
 void RichTextLabel::set_scroll_follow(bool p_follow) {
 void RichTextLabel::set_scroll_follow(bool p_follow) {
 
 
 	scroll_follow=p_follow;
 	scroll_follow=p_follow;
-	if (!vscroll->is_visible() || vscroll->get_value()>=(vscroll->get_max()-vscroll->get_page()))
+	if (!vscroll->is_visible_in_tree() || vscroll->get_value()>=(vscroll->get_max()-vscroll->get_page()))
 		scroll_following=true;
 		scroll_following=true;
 }
 }
 
 

+ 10 - 10
scene/gui/scroll_container.cpp

@@ -59,10 +59,10 @@ Size2 ScrollContainer::get_minimum_size() const {
 		}
 		}
 	}
 	}
 
 
-	if (h_scroll->is_visible()) {
+	if (h_scroll->is_visible_in_tree()) {
 		min_size.y+=h_scroll->get_minimum_size().y;
 		min_size.y+=h_scroll->get_minimum_size().y;
 	}
 	}
-	if (v_scroll->is_visible()) {
+	if (v_scroll->is_visible_in_tree()) {
 		min_size.x+=v_scroll->get_minimum_size().x;
 		min_size.x+=v_scroll->get_minimum_size().x;
 	}
 	}
 	return min_size;
 	return min_size;
@@ -89,19 +89,19 @@ void ScrollContainer::_gui_input(const InputEvent& p_gui_input) {
 			const InputEventMouseButton &mb=p_gui_input.mouse_button;
 			const InputEventMouseButton &mb=p_gui_input.mouse_button;
 
 
 			if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
 			if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
-				if (h_scroll->is_visible() && !v_scroll->is_visible()){
+				if (h_scroll->is_visible_in_tree() && !v_scroll->is_visible_in_tree()){
 					// only horizontal is enabled, scroll horizontally
 					// only horizontal is enabled, scroll horizontally
 					h_scroll->set_value( h_scroll->get_value()-h_scroll->get_page()/8 );
 					h_scroll->set_value( h_scroll->get_value()-h_scroll->get_page()/8 );
-				} else if (v_scroll->is_visible()) {
+				} else if (v_scroll->is_visible_in_tree()) {
 					v_scroll->set_value( v_scroll->get_value()-v_scroll->get_page()/8 );
 					v_scroll->set_value( v_scroll->get_value()-v_scroll->get_page()/8 );
 				}
 				}
 			}
 			}
 
 
 			if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
 			if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
-				if (h_scroll->is_visible() && !v_scroll->is_visible()){
+				if (h_scroll->is_visible_in_tree() && !v_scroll->is_visible_in_tree()){
 					// only horizontal is enabled, scroll horizontally
 					// only horizontal is enabled, scroll horizontally
 					h_scroll->set_value( h_scroll->get_value()+h_scroll->get_page()/8 );
 					h_scroll->set_value( h_scroll->get_value()+h_scroll->get_page()/8 );
-				} else if (v_scroll->is_visible()) {
+				} else if (v_scroll->is_visible_in_tree()) {
 					v_scroll->set_value( v_scroll->get_value()+v_scroll->get_page()/8 );
 					v_scroll->set_value( v_scroll->get_value()+v_scroll->get_page()/8 );
 				}
 				}
 			}
 			}
@@ -216,10 +216,10 @@ void ScrollContainer::_notification(int p_what) {
 
 
 		child_max_size = Size2(0, 0);
 		child_max_size = Size2(0, 0);
 		Size2 size = get_size();
 		Size2 size = get_size();
-		if (h_scroll->is_visible())
+		if (h_scroll->is_visible_in_tree())
 			size.y-=h_scroll->get_minimum_size().y;
 			size.y-=h_scroll->get_minimum_size().y;
 
 
-		if (v_scroll->is_visible())
+		if (v_scroll->is_visible_in_tree())
 			size.x-=h_scroll->get_minimum_size().x;
 			size.x-=h_scroll->get_minimum_size().x;
 
 
 		for(int i=0;i<get_child_count();i++) {
 		for(int i=0;i<get_child_count();i++) {
@@ -236,14 +236,14 @@ void ScrollContainer::_notification(int p_what) {
 			child_max_size.y = MAX(child_max_size.y, minsize.y);
 			child_max_size.y = MAX(child_max_size.y, minsize.y);
 
 
 			Rect2 r = Rect2(-scroll,minsize);
 			Rect2 r = Rect2(-scroll,minsize);
-			if (!(scroll_h || h_scroll->is_visible())) {
+			if (!(scroll_h || h_scroll->is_visible_in_tree())) {
 				r.pos.x=0;
 				r.pos.x=0;
 				if (c->get_h_size_flags()&SIZE_EXPAND)
 				if (c->get_h_size_flags()&SIZE_EXPAND)
 					r.size.width=MAX(size.width,minsize.width);
 					r.size.width=MAX(size.width,minsize.width);
 				else
 				else
 					r.size.width=minsize.width;
 					r.size.width=minsize.width;
 			}
 			}
-			if (!(scroll_v || v_scroll->is_visible())) {
+			if (!(scroll_v || v_scroll->is_visible_in_tree())) {
 				r.pos.y=0;
 				r.pos.y=0;
 				r.size.height=size.height;
 				r.size.height=size.height;
 				if (c->get_v_size_flags()&SIZE_EXPAND)
 				if (c->get_v_size_flags()&SIZE_EXPAND)

+ 1 - 1
scene/gui/split_container.cpp

@@ -47,7 +47,7 @@ Control *SplitContainer::_getch(int p_idx) const {
 
 
 	for(int i=0;i<get_child_count();i++) {
 	for(int i=0;i<get_child_count();i++) {
 		Control *c=get_child(i)->cast_to<Control>();
 		Control *c=get_child(i)->cast_to<Control>();
-		if (!c || !c->is_visible())
+		if (!c || !c->is_visible_in_tree())
 			continue;
 			continue;
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;

+ 1 - 1
scene/gui/tab_container.cpp

@@ -680,7 +680,7 @@ Size2 TabContainer::get_minimum_size() const {
 		if (c->is_set_as_toplevel())
 		if (c->is_set_as_toplevel())
 			continue;
 			continue;
 
 
-		if (!c->is_visible())
+		if (!c->is_visible_in_tree())
 			continue;
 			continue;
 
 
 		Size2 cms = c->get_combined_minimum_size();
 		Size2 cms = c->get_combined_minimum_size();

+ 7 - 7
scene/gui/text_edit.cpp

@@ -3036,7 +3036,7 @@ void TextEdit::adjust_viewport_to_cursor() {
 		cursor.line_ofs=cursor.line;
 		cursor.line_ofs=cursor.line;
 
 
 	int visible_width=cache.size.width-cache.style_normal->get_minimum_size().width-cache.line_number_w-cache.breakpoint_gutter_width;
 	int visible_width=cache.size.width-cache.style_normal->get_minimum_size().width-cache.line_number_w-cache.breakpoint_gutter_width;
-	if (v_scroll->is_visible())
+	if (v_scroll->is_visible_in_tree())
 		visible_width-=v_scroll->get_combined_minimum_size().width;
 		visible_width-=v_scroll->get_combined_minimum_size().width;
 	visible_width-=20; // give it a little more space
 	visible_width-=20; // give it a little more space
 
 
@@ -3044,7 +3044,7 @@ void TextEdit::adjust_viewport_to_cursor() {
 	//printf("rowofs %i, visrows %i, cursor.line %i\n",cursor.line_ofs,get_visible_rows(),cursor.line);
 	//printf("rowofs %i, visrows %i, cursor.line %i\n",cursor.line_ofs,get_visible_rows(),cursor.line);
 
 
 	int visible_rows = get_visible_rows();
 	int visible_rows = get_visible_rows();
-	if (h_scroll->is_visible())
+	if (h_scroll->is_visible_in_tree())
 		visible_rows-=((h_scroll->get_combined_minimum_size().height-1)/get_row_height());
 		visible_rows-=((h_scroll->get_combined_minimum_size().height-1)/get_row_height());
 
 
 	if (cursor.line>=(cursor.line_ofs+visible_rows))
 	if (cursor.line>=(cursor.line_ofs+visible_rows))
@@ -3078,12 +3078,12 @@ void TextEdit::center_viewport_to_cursor() {
 		cursor.line_ofs=cursor.line;
 		cursor.line_ofs=cursor.line;
 
 
 	int visible_width=cache.size.width-cache.style_normal->get_minimum_size().width-cache.line_number_w-cache.breakpoint_gutter_width;
 	int visible_width=cache.size.width-cache.style_normal->get_minimum_size().width-cache.line_number_w-cache.breakpoint_gutter_width;
-	if (v_scroll->is_visible())
+	if (v_scroll->is_visible_in_tree())
 		visible_width-=v_scroll->get_combined_minimum_size().width;
 		visible_width-=v_scroll->get_combined_minimum_size().width;
 	visible_width-=20; // give it a little more space
 	visible_width-=20; // give it a little more space
 
 
 	int visible_rows = get_visible_rows();
 	int visible_rows = get_visible_rows();
-	if (h_scroll->is_visible())
+	if (h_scroll->is_visible_in_tree())
 		visible_rows-=((h_scroll->get_combined_minimum_size().height-1)/get_row_height());
 		visible_rows-=((h_scroll->get_combined_minimum_size().height-1)/get_row_height());
 
 
 	int max_ofs = text.size()-(scroll_past_end_of_file_enabled?1:visible_rows);
 	int max_ofs = text.size()-(scroll_past_end_of_file_enabled?1:visible_rows);
@@ -3205,9 +3205,9 @@ void TextEdit::_scroll_moved(double p_to_val) {
 	if (updating_scrolls)
 	if (updating_scrolls)
 		return;
 		return;
 
 
-	if (h_scroll->is_visible())
+	if (h_scroll->is_visible_in_tree())
 		cursor.x_ofs=h_scroll->get_value();
 		cursor.x_ofs=h_scroll->get_value();
-	if (v_scroll->is_visible())
+	if (v_scroll->is_visible_in_tree())
 		cursor.line_ofs=v_scroll->get_value();
 		cursor.line_ofs=v_scroll->get_value();
 	update();
 	update();
 }
 }
@@ -3458,7 +3458,7 @@ void TextEdit::_reset_caret_blink_timer() {
 
 
 void TextEdit::_toggle_draw_caret() {
 void TextEdit::_toggle_draw_caret() {
 	draw_caret = !draw_caret;
 	draw_caret = !draw_caret;
-	if (is_visible() && has_focus() && window_has_focus) {
+	if (is_visible_in_tree() && has_focus() && window_has_focus) {
 		update();
 		update();
 	}
 	}
 }
 }

+ 14 - 14
scene/gui/tree.cpp

@@ -1115,7 +1115,7 @@ int Tree::draw_item(const Point2i& p_pos,const Point2& p_draw_ofs, const Size2&
 				} else {
 				} else {
 					cache.selected->draw(ci,r );
 					cache.selected->draw(ci,r );
 				}
 				}
-				if (text_editor->is_visible()){
+				if (text_editor->is_visible_in_tree()){
 					text_editor->set_pos(get_global_pos() + r.pos);
 					text_editor->set_pos(get_global_pos() + r.pos);
 				}
 				}
 			}
 			}
@@ -2277,9 +2277,9 @@ void Tree::_gui_input(InputEvent p_event) {
 				mpos.y-=_get_title_button_height();
 				mpos.y-=_get_title_button_height();
 				if (mpos.y>=0) {
 				if (mpos.y>=0) {
 
 
-					if (h_scroll->is_visible())
+					if (h_scroll->is_visible_in_tree())
 						mpos.x+=h_scroll->get_value();
 						mpos.x+=h_scroll->get_value();
-					if (v_scroll->is_visible())
+					if (v_scroll->is_visible_in_tree())
 						mpos.y+=v_scroll->get_value();
 						mpos.y+=v_scroll->get_value();
 
 
 					int col,h,section;
 					int col,h,section;
@@ -3069,7 +3069,7 @@ int Tree::get_column_width(int p_column) const {
 
 
 	int expand_area=get_size().width-(bg->get_margin(MARGIN_LEFT)+bg->get_margin(MARGIN_RIGHT));
 	int expand_area=get_size().width-(bg->get_margin(MARGIN_LEFT)+bg->get_margin(MARGIN_RIGHT));
 
 
-	if (v_scroll->is_visible())
+	if (v_scroll->is_visible_in_tree())
 		expand_area-=v_scroll->get_combined_minimum_size().width;
 		expand_area-=v_scroll->get_combined_minimum_size().width;
 
 
 	int expanding_columns=0;
 	int expanding_columns=0;
@@ -3254,9 +3254,9 @@ String Tree::get_column_title(int p_column) const {
 Point2 Tree::get_scroll() const {
 Point2 Tree::get_scroll() const {
 
 
 	Point2 ofs;
 	Point2 ofs;
-	if (h_scroll->is_visible())
+	if (h_scroll->is_visible_in_tree())
 		ofs.x=h_scroll->get_value();
 		ofs.x=h_scroll->get_value();
-	if (v_scroll->is_visible())
+	if (v_scroll->is_visible_in_tree())
 		ofs.y=v_scroll->get_value();
 		ofs.y=v_scroll->get_value();
 	return ofs;
 	return ofs;
 
 
@@ -3395,9 +3395,9 @@ int Tree::get_column_at_pos(const Point2& p_pos) const {
 		if (pos.y<0)
 		if (pos.y<0)
 			return -1;
 			return -1;
 
 
-		if (h_scroll->is_visible())
+		if (h_scroll->is_visible_in_tree())
 			pos.x+=h_scroll->get_value();
 			pos.x+=h_scroll->get_value();
-		if (v_scroll->is_visible())
+		if (v_scroll->is_visible_in_tree())
 			pos.y+=v_scroll->get_value();
 			pos.y+=v_scroll->get_value();
 
 
 		int col,h,section;
 		int col,h,section;
@@ -3422,9 +3422,9 @@ int Tree::get_drop_section_at_pos(const Point2& p_pos) const {
 		if (pos.y<0)
 		if (pos.y<0)
 			return -100;
 			return -100;
 
 
-		if (h_scroll->is_visible())
+		if (h_scroll->is_visible_in_tree())
 			pos.x+=h_scroll->get_value();
 			pos.x+=h_scroll->get_value();
-		if (v_scroll->is_visible())
+		if (v_scroll->is_visible_in_tree())
 			pos.y+=v_scroll->get_value();
 			pos.y+=v_scroll->get_value();
 
 
 		int col,h,section;
 		int col,h,section;
@@ -3449,9 +3449,9 @@ TreeItem* Tree::get_item_at_pos(const Point2& p_pos) const {
 		if (pos.y<0)
 		if (pos.y<0)
 			return NULL;
 			return NULL;
 
 
-		if (h_scroll->is_visible())
+		if (h_scroll->is_visible_in_tree())
 			pos.x+=h_scroll->get_value();
 			pos.x+=h_scroll->get_value();
-		if (v_scroll->is_visible())
+		if (v_scroll->is_visible_in_tree())
 			pos.y+=v_scroll->get_value();
 			pos.y+=v_scroll->get_value();
 
 
 		int col,h,section;
 		int col,h,section;
@@ -3477,9 +3477,9 @@ String Tree::get_tooltip(const Point2& p_pos) const {
 		if (pos.y<0)
 		if (pos.y<0)
 			return Control::get_tooltip(p_pos);
 			return Control::get_tooltip(p_pos);
 
 
-		if (h_scroll->is_visible())
+		if (h_scroll->is_visible_in_tree())
 			pos.x+=h_scroll->get_value();
 			pos.x+=h_scroll->get_value();
-		if (v_scroll->is_visible())
+		if (v_scroll->is_visible_in_tree())
 			pos.y+=v_scroll->get_value();
 			pos.y+=v_scroll->get_value();
 
 
 		int col,h,section;
 		int col,h,section;

+ 1 - 1
scene/gui/viewport_container.cpp

@@ -63,7 +63,7 @@ void ViewportContainer::_notification(int p_what) {
 				continue;
 				continue;
 
 
 
 
-			if (is_visible())
+			if (is_visible_in_tree())
 				c->set_update_mode(Viewport::UPDATE_ALWAYS);
 				c->set_update_mode(Viewport::UPDATE_ALWAYS);
 			else
 			else
 				c->set_update_mode(Viewport::UPDATE_DISABLED);
 				c->set_update_mode(Viewport::UPDATE_DISABLED);

+ 9 - 9
scene/main/viewport.cpp

@@ -272,7 +272,7 @@ void Viewport::_parent_visibility_changed() {
 	if (parent_control) {
 	if (parent_control) {
 
 
 		Control *c = parent_control;
 		Control *c = parent_control;
-		VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,c->is_visible());
+		VisualServer::get_singleton()->canvas_item_set_visible(canvas_item,c->is_visible_in_tree());
 
 
 		_update_listener();
 		_update_listener();
 		_update_listener_2d();
 		_update_listener_2d();
@@ -782,7 +782,7 @@ Size2 Viewport::get_size() const {
 
 
 void Viewport::_update_listener() {
 void Viewport::_update_listener() {
 
 
-	if (is_inside_tree() && audio_listener && (camera || listener) && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible())))  {
+	if (is_inside_tree() && audio_listener && (camera || listener) && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible_in_tree())))  {
 		SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, find_world()->get_sound_space());
 		SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, find_world()->get_sound_space());
 	} else {
 	} else {
 		SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID());
 		SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID());
@@ -793,7 +793,7 @@ void Viewport::_update_listener() {
 
 
 void Viewport::_update_listener_2d() {
 void Viewport::_update_listener_2d() {
 
 
-	if (is_inside_tree() && audio_listener && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible())))
+	if (is_inside_tree() && audio_listener && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible_in_tree())))
 		SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, find_world_2d()->get_sound_space());
 		SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, find_world_2d()->get_sound_space());
 	else
 	else
 		SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, RID());
 		SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, RID());
@@ -1521,7 +1521,7 @@ void Viewport::_vp_unhandled_input(const InputEvent& p_ev) {
 	}
 	}
 #endif
 #endif
 
 
-//	if (parent_control && !parent_control->is_visible())
+//	if (parent_control && !parent_control->is_visible_in_tree())
 //		return;
 //		return;
 
 
 	if (to_screen_rect==Rect2())
 	if (to_screen_rect==Rect2())
@@ -1696,7 +1696,7 @@ Control* Viewport::_gui_find_control(const Point2& p_global)  {
 	for (List<Control*>::Element *E=gui.subwindows.back();E;E=E->prev()) {
 	for (List<Control*>::Element *E=gui.subwindows.back();E;E=E->prev()) {
 
 
 		Control *sw = E->get();
 		Control *sw = E->get();
-		if (!sw->is_visible())
+		if (!sw->is_visible_in_tree())
 			continue;
 			continue;
 
 
 		Transform2D xform;
 		Transform2D xform;
@@ -1716,7 +1716,7 @@ Control* Viewport::_gui_find_control(const Point2& p_global)  {
 	for (List<Control*>::Element *E=gui.roots.back();E;E=E->prev()) {
 	for (List<Control*>::Element *E=gui.roots.back();E;E=E->prev()) {
 
 
 		Control *sw = E->get();
 		Control *sw = E->get();
-		if (!sw->is_visible())
+		if (!sw->is_visible_in_tree())
 			continue;
 			continue;
 
 
 		Transform2D xform;
 		Transform2D xform;
@@ -1750,7 +1750,7 @@ Control* Viewport::_gui_find_control_at_pos(CanvasItem* p_node,const Point2& p_g
 
 
 	//subwindows first!!
 	//subwindows first!!
 
 
-	if (p_node->is_hidden()) {
+	if (!p_node->is_visible()) {
 		//return _find_next_visible_control_at_pos(p_node,p_global,r_inv_xform);
 		//return _find_next_visible_control_at_pos(p_node,p_global,r_inv_xform);
 		return NULL; //canvas item hidden, discard
 		return NULL; //canvas item hidden, discard
 	}
 	}
@@ -2150,7 +2150,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
 		case InputEvent::KEY: {
 		case InputEvent::KEY: {
 
 
 
 
-			if (gui.key_focus && !gui.key_focus->is_visible()) {
+			if (gui.key_focus && !gui.key_focus->is_visible_in_tree()) {
 				gui.key_focus->release_focus();
 				gui.key_focus->release_focus();
 			}
 			}
 
 
@@ -2282,7 +2282,7 @@ void Viewport::_gui_remove_from_modal_stack(List<Control*>::Element *MI,ObjectID
 			if (!pfoc)
 			if (!pfoc)
 				return;
 				return;
 
 
-			if (!pfoc->is_inside_tree() || !pfoc->is_visible())
+			if (!pfoc->is_inside_tree() || !pfoc->is_visible_in_tree())
 				return;
 				return;
 			pfoc->grab_focus();
 			pfoc->grab_focus();
 		} else {
 		} else {

+ 6 - 6
tools/editor/animation_editor.cpp

@@ -1925,14 +1925,14 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) {
 
 
 					if (p_input.is_action("ui_up"))
 					if (p_input.is_action("ui_up"))
 						selected_track--;
 						selected_track--;
-					if (v_scroll->is_visible() && p_input.is_action("ui_page_up"))
+					if (v_scroll->is_visible_in_tree() && p_input.is_action("ui_page_up"))
 						selected_track--;
 						selected_track--;
 
 
 					if (selected_track<0)
 					if (selected_track<0)
 						selected_track=0;
 						selected_track=0;
 
 
 
 
-					if (v_scroll->is_visible()) {
+					if (v_scroll->is_visible_in_tree()) {
 						if (v_scroll->get_value() > selected_track)
 						if (v_scroll->get_value() > selected_track)
 							v_scroll->set_value(selected_track);
 							v_scroll->set_value(selected_track);
 
 
@@ -1947,13 +1947,13 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) {
 
 
 					if (p_input.is_action("ui_down"))
 					if (p_input.is_action("ui_down"))
 						selected_track++;
 						selected_track++;
-					else if (v_scroll->is_visible() && p_input.is_action("ui_page_down"))
+					else if (v_scroll->is_visible_in_tree() && p_input.is_action("ui_page_down"))
 						selected_track+=v_scroll->get_page();
 						selected_track+=v_scroll->get_page();
 
 
 					if (selected_track >= animation->get_track_count())
 					if (selected_track >= animation->get_track_count())
 						selected_track=animation->get_track_count()-1;
 						selected_track=animation->get_track_count()-1;
 
 
-					if (v_scroll->is_visible() && v_scroll->get_page()+v_scroll->get_value() < selected_track+1) {
+					if (v_scroll->is_visible_in_tree() && v_scroll->get_page()+v_scroll->get_value() < selected_track+1) {
 						v_scroll->set_value(selected_track-v_scroll->get_page()+1);
 						v_scroll->set_value(selected_track-v_scroll->get_page()+1);
 					}
 					}
 
 
@@ -3270,7 +3270,7 @@ Node *AnimationKeyEditor::get_root() const {
 
 
 void AnimationKeyEditor::update_keying() {
 void AnimationKeyEditor::update_keying() {
 
 
-	bool keying_enabled=is_visible() && animation.is_valid();
+	bool keying_enabled=is_visible_in_tree() && animation.is_valid();
 
 
 	if (keying_enabled==keying)
 	if (keying_enabled==keying)
 		return;
 		return;
@@ -3291,7 +3291,7 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
 
 
 	if (insert_frame!=OS::get_singleton()->get_frames_drawn()) {
 	if (insert_frame!=OS::get_singleton()->get_frames_drawn()) {
 		//clear insert list for the frame if frame changed
 		//clear insert list for the frame if frame changed
-		if (insert_confirm->is_visible())
+		if (insert_confirm->is_visible_in_tree())
 			return; //do nothing
 			return; //do nothing
 		insert_data.clear();
 		insert_data.clear();
 		insert_query=false;
 		insert_query=false;

+ 1 - 1
tools/editor/animation_editor.h

@@ -347,7 +347,7 @@ public:
 	void insert_value_key(const String& p_property, const Variant& p_value, bool p_advance);
 	void insert_value_key(const String& p_property, const Variant& p_value, bool p_advance);
 	void insert_transform_key(Spatial *p_node,const String& p_sub,const Transform& p_xform);
 	void insert_transform_key(Spatial *p_node,const String& p_sub,const Transform& p_xform);
 
 
-	void show_select_node_warning(bool p_show) { select_anim_warning->set_hidden(!p_show); }
+	void show_select_node_warning(bool p_show) { select_anim_warning->set_visible(p_show); }
 	AnimationKeyEditor();
 	AnimationKeyEditor();
 	~AnimationKeyEditor();
 	~AnimationKeyEditor();
 };
 };

+ 5 - 5
tools/editor/asset_library_editor_plugin.cpp

@@ -564,7 +564,7 @@ void EditorAssetLibrary::_notification(int p_what) {
 	}
 	}
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
-		if(!is_hidden()) {
+		if(is_visible()) {
 			_repository_changed(0); // Update when shown for the first time
 			_repository_changed(0); // Update when shown for the first time
 		}
 		}
 	}
 	}
@@ -574,8 +574,8 @@ void EditorAssetLibrary::_notification(int p_what) {
 		HTTPClient::Status s = request->get_http_client_status();
 		HTTPClient::Status s = request->get_http_client_status();
 		bool visible = s!=HTTPClient::STATUS_DISCONNECTED;
 		bool visible = s!=HTTPClient::STATUS_DISCONNECTED;
 
 
-		if (visible != !load_status->is_hidden()) {
-			load_status->set_hidden(!visible);
+		if (visible != load_status->is_visible()) {
+			load_status->set_visible(visible);
 		}
 		}
 
 
 		if (visible) {
 		if (visible) {
@@ -599,8 +599,8 @@ void EditorAssetLibrary::_notification(int p_what) {
 		}
 		}
 
 
 		bool no_downloads = downloads_hb->get_child_count()==0;
 		bool no_downloads = downloads_hb->get_child_count()==0;
-		if (no_downloads != downloads_scroll->is_hidden()) {
-			downloads_scroll->set_hidden(no_downloads);
+		if (no_downloads == downloads_scroll->is_visible()) {
+			downloads_scroll->set_visible(!no_downloads);
 		}
 		}
 	}
 	}
 
 

+ 7 - 7
tools/editor/code_editor.cpp

@@ -91,7 +91,7 @@ void FindReplaceBar::_notification(int p_what) {
 
 
 	} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
 	} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		set_process_unhandled_input(is_visible());
+		set_process_unhandled_input(is_visible_in_tree());
 	}
 	}
 }
 }
 
 
@@ -377,7 +377,7 @@ void FindReplaceBar::popup_search() {
 void FindReplaceBar::popup_replace() {
 void FindReplaceBar::popup_replace() {
 
 
 
 
-	if (!replace_hbc->is_visible() || !replace_options_hbc->is_visible()) {
+	if (!replace_hbc->is_visible_in_tree() || !replace_options_hbc->is_visible_in_tree()) {
 		replace_text->clear();
 		replace_text->clear();
 		replace_hbc->show();
 		replace_hbc->show();
 		replace_options_hbc->show();
 		replace_options_hbc->show();
@@ -396,7 +396,7 @@ void FindReplaceBar::_search_options_changed(bool p_pressed) {
 
 
 void FindReplaceBar::_editor_text_changed() {
 void FindReplaceBar::_editor_text_changed() {
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 		preserve_cursor=true;
 		preserve_cursor=true;
 		search_current();
 		search_current();
 		preserve_cursor=false;
 		preserve_cursor=false;
@@ -801,7 +801,7 @@ void FindReplaceDialog::_skip_pressed() {
 
 
 bool FindReplaceDialog::is_replace_mode() const {
 bool FindReplaceDialog::is_replace_mode() const {
 
 
-	return replace_text->is_visible();
+	return replace_text->is_visible_in_tree();
 }
 }
 
 
 bool FindReplaceDialog::is_replace_all_mode() const {
 bool FindReplaceDialog::is_replace_all_mode() const {
@@ -826,7 +826,7 @@ void FindReplaceDialog::ok_pressed() {
 
 
 void FindReplaceDialog::_search_text_entered(const String& p_text) {
 void FindReplaceDialog::_search_text_entered(const String& p_text) {
 
 
-	if (replace_text->is_visible())
+	if (replace_text->is_visible_in_tree())
 		return;
 		return;
 	emit_signal("search");
 	emit_signal("search");
 	_search();
 	_search();
@@ -835,7 +835,7 @@ void FindReplaceDialog::_search_text_entered(const String& p_text) {
 
 
 void FindReplaceDialog::_replace_text_entered(const String& p_text) {
 void FindReplaceDialog::_replace_text_entered(const String& p_text) {
 
 
-	if (!replace_text->is_visible())
+	if (!replace_text->is_visible_in_tree())
 		return;
 		return;
 
 
 	emit_signal("search");
 	emit_signal("search");
@@ -1061,7 +1061,7 @@ void CodeTextEditor::_text_changed() {
 }
 }
 
 
 void CodeTextEditor::_code_complete_timer_timeout() {
 void CodeTextEditor::_code_complete_timer_timeout() {
-	if (!is_visible())
+	if (!is_visible_in_tree())
 		return;
 		return;
 	if (enable_complete_timer)
 	if (enable_complete_timer)
 		text_editor->query_code_comple();
 		text_editor->query_code_comple();

+ 1 - 1
tools/editor/connections_dialog.h

@@ -77,7 +77,7 @@ protected:
 public:
 public:
 
 
 
 
-	bool get_make_callback() { return !make_callback->is_hidden() && make_callback->is_pressed(); }
+	bool get_make_callback() { return make_callback->is_visible() && make_callback->is_pressed(); }
 	NodePath get_dst_path() const;
 	NodePath get_dst_path() const;
 	StringName get_dst_method() const;
 	StringName get_dst_method() const;
 	bool get_deferred() const;
 	bool get_deferred() const;

+ 1 - 1
tools/editor/create_dialog.cpp

@@ -369,7 +369,7 @@ void CreateDialog::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		if (is_visible()) {
+		if (is_visible_in_tree()) {
 
 
 			search_box->call_deferred("grab_focus"); // still not visible
 			search_box->call_deferred("grab_focus"); // still not visible
 			search_box->select_all();
 			search_box->select_all();

+ 2 - 2
tools/editor/editor_dir_dialog.cpp

@@ -78,7 +78,7 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) {
 
 
 void EditorDirDialog::reload() {
 void EditorDirDialog::reload() {
 
 
-	if (!is_visible()) {
+	if (!is_visible_in_tree()) {
 		must_reload=true;
 		must_reload=true;
 		return;
 		return;
 	}
 	}
@@ -111,7 +111,7 @@ void EditorDirDialog::_notification(int p_what) {
 	}
 	}
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
-		if (must_reload && is_visible()) {
+		if (must_reload && is_visible_in_tree()) {
 			reload();
 			reload();
 		}
 		}
 	}
 	}

+ 4 - 4
tools/editor/editor_file_dialog.cpp

@@ -218,10 +218,10 @@ void EditorFileDialog::_post_popup() {
 	else
 	else
 		item_list->grab_focus();
 		item_list->grab_focus();
 
 
-	if (is_visible() && get_current_file()!="")
+	if (is_visible_in_tree() && get_current_file()!="")
 		_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
 		_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 		Ref<Texture> folder = get_icon("folder","FileDialog");
 		Ref<Texture> folder = get_icon("folder","FileDialog");
 		recent->clear();
 		recent->clear();
 
 
@@ -806,7 +806,7 @@ void EditorFileDialog::set_current_file(const String& p_file) {
 		file->grab_focus();
 		file->grab_focus();
 	}
 	}
 
 
-	if (is_visible())
+	if (is_visible_in_tree())
 		_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
 		_request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
 
 
 
 
@@ -882,7 +882,7 @@ void EditorFileDialog::set_access(Access p_access) {
 
 
 void EditorFileDialog::invalidate() {
 void EditorFileDialog::invalidate() {
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 		update_file_list();
 		update_file_list();
 		invalidated=false;
 		invalidated=false;
 	} else {
 	} else {

+ 3 - 3
tools/editor/editor_help.cpp

@@ -287,7 +287,7 @@ void EditorHelpSearch::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		if (is_visible()) {
+		if (is_visible_in_tree()) {
 
 
 			search_box->call_deferred("grab_focus"); // still not visible
 			search_box->call_deferred("grab_focus"); // still not visible
 			search_box->select_all();
 			search_box->select_all();
@@ -538,7 +538,7 @@ DocData *EditorHelp::doc=NULL;
 
 
 void EditorHelp::_unhandled_key_input(const InputEvent& p_ev) {
 void EditorHelp::_unhandled_key_input(const InputEvent& p_ev) {
 
 
-	if (!is_visible())
+	if (!is_visible_in_tree())
 		return;
 		return;
 	if ( p_ev.key.mod.control && p_ev.key.scancode==KEY_F) {
 	if ( p_ev.key.mod.control && p_ev.key.scancode==KEY_F) {
 
 
@@ -674,7 +674,7 @@ void EditorHelp::_scroll_changed(double p_scroll) {
 	if (scroll_locked)
 	if (scroll_locked)
 		return;
 		return;
 
 
-	if (class_desc->get_v_scroll()->is_hidden())
+	if (!class_desc->get_v_scroll()->is_visible())
 		p_scroll=0;
 		p_scroll=0;
 
 
 	//history[p].scroll=p_scroll;
 	//history[p].scroll=p_scroll;

+ 1 - 1
tools/editor/editor_log.cpp

@@ -44,7 +44,7 @@ void EditorLog::_error_handler(void *p_self, const char*p_func, const char*p_fil
 		err_str=String(p_file)+":"+itos(p_line)+" - "+String(p_error);
 		err_str=String(p_file)+":"+itos(p_line)+" - "+String(p_error);
 	}
 	}
 
 
-//	if (!self->is_visible())
+//	if (!self->is_visible_in_tree())
 //		self->emit_signal("show_request");
 //		self->emit_signal("show_request");
 
 
 	err_str=" "+err_str;
 	err_str=" "+err_str;

+ 8 - 8
tools/editor/editor_node.cpp

@@ -241,7 +241,7 @@ void EditorNode::_notification(int p_what) {
 		}
 		}
 
 
 #endif
 #endif
-		if (opening_prev && confirmation->is_hidden())
+		if (opening_prev && !confirmation->is_visible())
 			opening_prev=false;
 			opening_prev=false;
 
 
 		if (unsaved_cache != (saved_version!=editor_data.get_undo_redo().get_version())) {
 		if (unsaved_cache != (saved_version!=editor_data.get_undo_redo().get_version())) {
@@ -1671,7 +1671,7 @@ void EditorNode::_edit_current() {
 			main_plugin->edit(current_obj);
 			main_plugin->edit(current_obj);
 		}
 		}
 
 
-		else if (main_plugin!=editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible() || ScriptEditor::get_singleton()->can_take_away_focus())) {
+		else if (main_plugin!=editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
 			// update screen main_plugin
 			// update screen main_plugin
 
 
 			if (!changing_scene) {
 			if (!changing_scene) {
@@ -4510,7 +4510,7 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String& p
 
 
 	for(int i=0;i<DOCK_SLOT_MAX/2;i++) {
 	for(int i=0;i<DOCK_SLOT_MAX/2;i++) {
 
 
-		if (splits[i]->is_visible()) {
+		if (splits[i]->is_visible_in_tree()) {
 			p_layout->set_value(p_section,"dock_split_"+itos(i+1),splits[i]->get_split_offset());
 			p_layout->set_value(p_section,"dock_split_"+itos(i+1),splits[i]->get_split_offset());
 		}
 		}
 	}
 	}
@@ -4609,7 +4609,7 @@ void EditorNode::_update_dock_slots_visibility() {
 
 
 		for(int i=0;i<DOCK_SLOT_MAX;i++) {
 		for(int i=0;i<DOCK_SLOT_MAX;i++) {
 
 
-			if (!dock_slot[i]->is_hidden() && dock_slot[i]->get_tab_count()) {
+			if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
 				dock_slot[i]->set_current_tab(0);
 				dock_slot[i]->set_current_tab(0);
 			}
 			}
 		}
 		}
@@ -4717,7 +4717,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String&
 
 
 	for(int i=0;i<DOCK_SLOT_MAX;i++) {
 	for(int i=0;i<DOCK_SLOT_MAX;i++) {
 
 
-		if (!dock_slot[i]->is_hidden() && dock_slot[i]->get_tab_count()) {
+		if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
 			dock_slot[i]->set_current_tab(0);
 			dock_slot[i]->set_current_tab(0);
 		}
 		}
 	}
 	}
@@ -4955,7 +4955,7 @@ void EditorNode::remove_bottom_panel_item(Control *p_item) {
 	for(int i=0;i<bottom_panel_items.size();i++) {
 	for(int i=0;i<bottom_panel_items.size();i++) {
 
 
 		if (bottom_panel_items[i].control==p_item) {
 		if (bottom_panel_items[i].control==p_item) {
-			if (p_item->is_visible()) {
+			if (p_item->is_visible_in_tree()) {
 				_bottom_panel_switch(false,0);
 				_bottom_panel_switch(false,0);
 			}
 			}
 			bottom_panel_vb->remove_child(bottom_panel_items[i].control);
 			bottom_panel_vb->remove_child(bottom_panel_items[i].control);
@@ -4982,7 +4982,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable,int p_idx) {
 		for(int i=0;i<bottom_panel_items.size();i++) {
 		for(int i=0;i<bottom_panel_items.size();i++) {
 
 
 			bottom_panel_items[i].button->set_pressed(i==p_idx);
 			bottom_panel_items[i].button->set_pressed(i==p_idx);
-			bottom_panel_items[i].control->set_hidden(i!=p_idx);
+			bottom_panel_items[i].control->set_visible(i==p_idx);
 		}
 		}
 		center_split->set_dragger_visibility(SplitContainer::DRAGGER_VISIBLE);
 		center_split->set_dragger_visibility(SplitContainer::DRAGGER_VISIBLE);
 		center_split->set_collapsed(false);
 		center_split->set_collapsed(false);
@@ -4990,7 +4990,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable,int p_idx) {
 		for(int i=0;i<bottom_panel_items.size();i++) {
 		for(int i=0;i<bottom_panel_items.size();i++) {
 
 
 			bottom_panel_items[i].button->set_pressed(false);
 			bottom_panel_items[i].button->set_pressed(false);
-			bottom_panel_items[i].control->set_hidden(true);
+			bottom_panel_items[i].control->set_visible(false);
 		}
 		}
 		center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
 		center_split->set_dragger_visibility(SplitContainer::DRAGGER_HIDDEN);
 		center_split->set_collapsed(true);
 		center_split->set_collapsed(true);

+ 1 - 1
tools/editor/editor_sub_scene.cpp

@@ -75,7 +75,7 @@ void EditorSubScene::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		if (!is_visible()) {
+		if (!is_visible_in_tree()) {
 
 
 
 
 		}
 		}

+ 10 - 10
tools/editor/filesystem_dock.cpp

@@ -186,7 +186,7 @@ void FileSystemDock::_notification(int p_what) {
 		case NOTIFICATION_DRAG_BEGIN: {
 		case NOTIFICATION_DRAG_BEGIN: {
 
 
 			Dictionary dd = get_viewport()->gui_get_drag_data();
 			Dictionary dd = get_viewport()->gui_get_drag_data();
-			if (tree->is_visible() && dd.has("type") ) {
+			if (tree->is_visible_in_tree() && dd.has("type") ) {
 				if  ( (String(dd["type"])=="files") || (String(dd["type"])=="files_and_dirs") || (String(dd["type"])=="resource")) {
 				if  ( (String(dd["type"])=="files") || (String(dd["type"])=="files_and_dirs") || (String(dd["type"])=="resource")) {
 					tree->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM);
 					tree->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM);
 				}
 				}
@@ -292,7 +292,7 @@ void FileSystemDock::_thumbnail_done(const String& p_path,const Ref<Texture>& p_
 
 
 	bool valid=false;
 	bool valid=false;
 
 
-	if (!search_box->is_hidden()) {
+	if (search_box->is_visible()) {
 		valid=true;
 		valid=true;
 	} else {
 	} else {
 		valid=(path==p_path.get_base_dir());
 		valid=(path==p_path.get_base_dir());
@@ -624,7 +624,7 @@ void FileSystemDock::_go_to_dir(const String& p_dir){
 
 
 void FileSystemDock::_preview_invalidated(const String& p_path) {
 void FileSystemDock::_preview_invalidated(const String& p_path) {
 
 
-	if (p_path.get_base_dir()==path && search_box->get_text()==String() && file_list_vb->is_visible()) {
+	if (p_path.get_base_dir()==path && search_box->get_text()==String() && file_list_vb->is_visible_in_tree()) {
 
 
 
 
 		for(int i=0;i<files->get_item_count();i++) {
 		for(int i=0;i<files->get_item_count();i++) {
@@ -649,13 +649,13 @@ void FileSystemDock::_fs_changed() {
 	scanning_vb->hide();
 	scanning_vb->hide();
 	split_box->show();
 	split_box->show();
 
 
-	if (!tree->is_hidden()) {
+	if (tree->is_visible()) {
 		button_favorite->show();
 		button_favorite->show();
 		_update_tree();
 		_update_tree();
 
 
 	}
 	}
 
 
-	if (!file_list_vb->is_hidden()) {
+	if (file_list_vb->is_visible()) {
 
 
 		_update_files(true);
 		_update_files(true);
 	}
 	}
@@ -685,14 +685,14 @@ void FileSystemDock::_fw_history() {
 
 
 	path=history[history_pos];
 	path=history[history_pos];
 
 
-	if (!tree->is_hidden()) {
+	if (tree->is_visible()) {
 		_update_tree();
 		_update_tree();
 		tree->grab_focus();
 		tree->grab_focus();
 		tree->ensure_cursor_is_visible();
 		tree->ensure_cursor_is_visible();
 
 
 	}
 	}
 
 
-	if (!file_list_vb->is_hidden()) {
+	if (file_list_vb->is_visible()) {
 		_update_files(false);
 		_update_files(false);
 		current_path->set_text(path);
 		current_path->set_text(path);
 	}
 	}
@@ -710,13 +710,13 @@ void FileSystemDock::_bw_history() {
 	path=history[history_pos];
 	path=history[history_pos];
 
 
 
 
-	if (!tree->is_hidden()) {
+	if (tree->is_visible()) {
 		_update_tree();
 		_update_tree();
 		tree->grab_focus();
 		tree->grab_focus();
 		tree->ensure_cursor_is_visible();
 		tree->ensure_cursor_is_visible();
 	}
 	}
 
 
-	if (!file_list_vb->is_hidden()) {
+	if (file_list_vb->is_visible()) {
 		_update_files(false);
 		_update_files(false);
 		current_path->set_text(path);
 		current_path->set_text(path);
 	}
 	}
@@ -1167,7 +1167,7 @@ void FileSystemDock::_dir_rmb_pressed(const Vector2& p_pos) {
 
 
 void FileSystemDock::_search_changed(const String& p_text) {
 void FileSystemDock::_search_changed(const String& p_text) {
 
 
-	if (!search_box->is_visible())
+	if (!search_box->is_visible_in_tree())
 		return; //wtf
 		return; //wtf
 
 
 	_update_files(false);
 	_update_files(false);

+ 7 - 7
tools/editor/plugins/animation_player_editor_plugin.cpp

@@ -648,8 +648,8 @@ Dictionary AnimationPlayerEditor::get_state() const {
 
 
 	Dictionary d;
 	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["player"]=EditorNode::get_singleton()->get_edited_scene()->get_path_to(player);
 		d["animation"]=player->get_current_animation();
 		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) {
 void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
 
 
-	if (player==p_pl && is_visible()) {
+	if (player==p_pl && is_visible_in_tree()) {
 
 
 		_update_player();
 		_update_player();
-		if (blend_editor.dialog->is_visible())
+		if (blend_editor.dialog->is_visible_in_tree())
 			_animation_blend(); //update
 			_animation_blend(); //update
 	}
 	}
 }
 }
@@ -1011,7 +1011,7 @@ void AnimationPlayerEditor::_animation_player_changed(Object *p_pl) {
 
 
 void AnimationPlayerEditor::_list_changed() {
 void AnimationPlayerEditor::_list_changed() {
 
 
-	if(is_visible())
+	if(is_visible_in_tree())
 		_update_player();
 		_update_player();
 }
 }
 #if 0
 #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) {
 void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos,bool p_drag) {
 
 
-	if (!is_visible())
+	if (!is_visible_in_tree())
 		return;
 		return;
 	if (!player)
 	if (!player)
 		return;
 		return;
@@ -1220,7 +1220,7 @@ void AnimationPlayerEditor::_animation_save_menu(int p_option) {
 
 
 void AnimationPlayerEditor::_unhandled_key_input(const InputEvent& p_ev) {
 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) {
 		switch(p_ev.key.scancode) {
 
 

+ 1 - 1
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);
 		anim_tree_editor->set_fixed_process(true);
 	} else {
 	} else {
 
 
-		if (anim_tree_editor->is_visible())
+		if (anim_tree_editor->is_visible_in_tree())
 			editor->hide_bottom_panel();
 			editor->hide_bottom_panel();
 		button->hide();
 		button->hide();
 		anim_tree_editor->set_fixed_process(false);
 		anim_tree_editor->set_fixed_process(false);

+ 33 - 33
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) {
 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;
 		return;
 
 
 	if (p_ev.key.mod.control)
 	if (p_ev.key.mod.control)
@@ -425,7 +425,7 @@ void CanvasItemEditor::_node_removed(Node *p_node) {
 
 
 void CanvasItemEditor::_keying_changed() {
 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();
 		animation_hb->show();
 	else
 	else
 		animation_hb->hide();
 		animation_hb->hide();
@@ -465,7 +465,7 @@ CanvasItem* CanvasItemEditor::_select_canvas_item_at_pos(const Point2& p_pos,Nod
 			return r;
 			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();
 		Rect2 rect = c->get_item_rect();
 		Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
 		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();
 		Rect2 rect = c->get_item_rect();
 		Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
 		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();
 		Rect2 rect = c->get_item_rect();
 		Transform2D xform = p_parent_xform * p_canvas_xform * c->get_transform();
 		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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 					continue;
 					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()) {
 	for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 		CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 		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;
 			continue;
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 			continue;
 			continue;
@@ -738,7 +738,7 @@ Point2 CanvasItemEditor::_find_topleftmost_point() {
 	for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 	for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 		CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 		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;
 			continue;
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 			continue;
 			continue;
@@ -769,7 +769,7 @@ int CanvasItemEditor::get_item_count() {
 	for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 	for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 		CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 		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;
 			continue;
 
 
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 		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()) {
 	for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
 
 
 		CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
 		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;
 			continue;
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 			continue;
 			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()) {
 					for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 						CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 						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;
 							continue;
 						if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 						if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 							continue;
 							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()) {
 						for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 							CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 							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;
 								continue;
 							if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 							if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 								continue;
 								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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 					continue;
 					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()) {
 		for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 			CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 			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;
 				continue;
 			if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 			if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				continue;
 				continue;
@@ -1947,9 +1947,9 @@ void CanvasItemEditor::_viewport_draw() {
 
 
 	if (viewport->has_focus()) {
 	if (viewport->has_focus()) {
 		Size2 size = viewport->get_size();
 		Size2 size = viewport->get_size();
-		if (v_scroll->is_visible())
+		if (v_scroll->is_visible_in_tree())
 			size.width-=v_scroll->get_size().width;
 			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;
 			size.height-=h_scroll->get_size().height;
 
 
 		get_stylebox("EditorFocus","EditorStyles")->draw(ci,Rect2(Point2(),size));
 		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>();
 		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;
 			continue;
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 		if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 			continue;
 			continue;
@@ -2198,7 +2198,7 @@ void CanvasItemEditor::_notification(int p_what) {
 		for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 		for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 			CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 			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;
 				continue;
 
 
 			if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 			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;
 		bool show_anchor = all_control && has_control;
-		if (show_anchor != !anchor_menu->is_hidden()) {
+		if (show_anchor != anchor_menu->is_visible()) {
 			if (show_anchor)
 			if (show_anchor)
 				anchor_menu->show();
 				anchor_menu->show();
 			else
 			else
@@ -2619,7 +2619,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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()) {
 			for(Map<Node*,Object*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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>();
 				Node2D *n2d = E->key()->cast_to<Node2D>();
 				if (!n2d)
 				if (!n2d)
 					continue;
 					continue;
-				if (!n2d->is_visible())
+				if (!n2d->is_visible_in_tree())
 					continue;
 					continue;
 				if (!n2d->get_parent_item())
 				if (!n2d->get_parent_item())
 					continue;
 					continue;
@@ -3051,7 +3051,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
 				Node2D *n2d = E->key()->cast_to<Node2D>();
 				Node2D *n2d = E->key()->cast_to<Node2D>();
 				if (!n2d)
 				if (!n2d)
 					continue;
 					continue;
-				if (!n2d->is_visible())
+				if (!n2d->is_visible_in_tree())
 					continue;
 					continue;
 
 
 				n2d->set_meta("_edit_bone_",Variant());
 				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()) {
 			for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
 
 
 				CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
 				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;
 					continue;
 
 
 				if (canvas_item->get_viewport()!=EditorNode::get_singleton()->get_scene_root())
 				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>();
 				CanvasItem *n2d = E->key()->cast_to<CanvasItem>();
 				if (!n2d)
 				if (!n2d)
 					continue;
 					continue;
-				if (!n2d->is_visible())
+				if (!n2d->is_visible_in_tree())
 					continue;
 					continue;
 
 
 				n2d->set_meta("_edit_ik_",Variant());
 				n2d->set_meta("_edit_ik_",Variant());
@@ -3151,7 +3151,7 @@ void CanvasItemEditor::_focus_selection(int p_op) {
 
 
 
 
 		// counting invisible items, for now
 		// counting invisible items, for now
-		//if (!canvas_item->is_visible()) continue;
+		//if (!canvas_item->is_visible_in_tree()) continue;
 		++count;
 		++count;
 
 
 		Rect2 item_rect = canvas_item->get_item_rect();
 		Rect2 item_rect = canvas_item->get_item_rect();
@@ -3654,7 +3654,7 @@ CanvasItemEditorPlugin::~CanvasItemEditorPlugin()
 
 
 
 
 void CanvasItemEditorViewport::_on_mouse_exit() {
 void CanvasItemEditorViewport::_on_mouse_exit() {
-	if (selector->is_hidden()){
+	if (!selector->is_visible()){
 		_remove_preview();
 		_remove_preview();
 	}
 	}
 }
 }

+ 2 - 2
tools/editor/plugins/path_2d_editor_plugin.cpp

@@ -67,7 +67,7 @@ bool Path2DEditor::forward_gui_input(const InputEvent& p_event) {
 	if (!node)
 	if (!node)
 		return false;
 		return false;
 
 
-	if (!node->is_visible())
+	if (!node->is_visible_in_tree())
 		return false;
 		return false;
 
 
 	if (!node->get_curve().is_valid())
 	if (!node->get_curve().is_valid())
@@ -475,7 +475,7 @@ void Path2DEditor::_canvas_draw() {
 	if (!node)
 	if (!node)
 		return ;
 		return ;
 
 
-	if (!node->is_visible())
+	if (!node->is_visible_in_tree())
 		return;
 		return;
 
 
 	if (!node->get_curve().is_valid())
 	if (!node->get_curve().is_valid())

+ 1 - 1
tools/editor/plugins/resource_preloader_editor_plugin.cpp

@@ -474,7 +474,7 @@ void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
 //		preloader_editor->set_process(true);
 //		preloader_editor->set_process(true);
 	} else {
 	} else {
 
 
-		if (preloader_editor->is_visible())
+		if (preloader_editor->is_visible_in_tree())
 			editor->hide_bottom_panel();
 			editor->hide_bottom_panel();
 		button->hide();
 		button->hide();
 		//preloader_editor->hide();
 		//preloader_editor->hide();

+ 1 - 1
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);
 //		sample_library_editor->set_process(true);
 	} else {
 	} else {
 
 
-		if (sample_library_editor->is_visible())
+		if (sample_library_editor->is_visible_in_tree())
 			editor->hide_bottom_panel();
 			editor->hide_bottom_panel();
 		button->hide();
 		button->hide();
 
 

+ 5 - 5
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_name_label->set_text(c->cast_to<ScriptEditorBase>()->get_name());
 		script_icon->set_texture(c->cast_to<ScriptEditorBase>()->get_icon());
 		script_icon->set_texture(c->cast_to<ScriptEditorBase>()->get_icon());
-		if (is_visible())
+		if (is_visible_in_tree())
 			c->cast_to<ScriptEditorBase>()->ensure_focus();
 			c->cast_to<ScriptEditorBase>()->ensure_focus();
 	}
 	}
 	if (c->cast_to<EditorHelp>()) {
 	if (c->cast_to<EditorHelp>()) {
 
 
 		script_name_label->set_text(c->cast_to<EditorHelp>()->get_class());
 		script_name_label->set_text(c->cast_to<EditorHelp>()->get_class());
 		script_icon->set_texture(get_icon("Help","EditorIcons"));
 		script_icon->set_texture(get_icon("Help","EditorIcons"));
-		if (is_visible())
+		if (is_visible_in_tree())
 			c->cast_to<EditorHelp>()->set_focused();
 			c->cast_to<EditorHelp>()->set_focused();
 	}
 	}
 
 
@@ -1281,7 +1281,7 @@ void ScriptEditor::ensure_select_current() {
 
 
 			Ref<Script> script = se->get_edited_script();
 			Ref<Script> script = se->get_edited_script();
 
 
-			if (!grab_focus_block && is_visible())
+			if (!grab_focus_block && is_visible_in_tree())
 				se->ensure_focus();
 				se->ensure_focus();
 
 
 
 
@@ -1516,7 +1516,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script, bool p_grab_focus) {
 					_go_to_tab(i);
 					_go_to_tab(i);
 					script_list->select( script_list->find_metadata(i) );
 					script_list->select( script_list->find_metadata(i) );
 				}
 				}
-				if (is_visible())
+				if (is_visible_in_tree())
 					se->ensure_focus();
 					se->ensure_focus();
 			}
 			}
 			return;
 			return;
@@ -1744,7 +1744,7 @@ void ScriptEditor::_script_split_dragged(float) {
 }
 }
 
 
 void ScriptEditor::_unhandled_input(const InputEvent& p_event) {
 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)) {
 	if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
 		int next_tab = script_list->get_current() + 1;
 		int next_tab = script_list->get_current() + 1;
 		next_tab %= script_list->get_item_count();
 		next_tab %= script_list->get_item_count();

+ 1 - 1
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) {
 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();
 	Node *base = get_tree()->get_edited_scene_root();
 	if (base) {
 	if (base) {
 		base = _find_node_for_script(base,base,script);
 		base = _find_node_for_script(base,base,script);

+ 1 - 1
tools/editor/plugins/shader_editor_plugin.cpp

@@ -527,7 +527,7 @@ void ShaderEditorPlugin::make_visible(bool p_visible) {
 	} else {
 	} else {
 
 
 		button->hide();
 		button->hide();
-		if (shader_editor->is_visible())
+		if (shader_editor->is_visible_in_tree())
 			editor->hide_bottom_panel();
 			editor->hide_bottom_panel();
 		shader_editor->apply_shaders();
 		shader_editor->apply_shaders();
 
 

+ 3 - 3
tools/editor/plugins/spatial_editor_plugin.cpp

@@ -1740,7 +1740,7 @@ void SpatialEditorViewport::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		bool visible=is_visible();
+		bool visible=is_visible_in_tree();
 
 
 		set_process(visible);
 		set_process(visible);
 
 
@@ -2205,7 +2205,7 @@ void SpatialEditorViewport::set_can_preview(Camera* p_preview) {
 
 
 void SpatialEditorViewport::update_transform_gizmo_view() {
 void SpatialEditorViewport::update_transform_gizmo_view() {
 
 
-	if (!is_visible())
+	if (!is_visible_in_tree())
 		return;
 		return;
 
 
 	Transform xform = spatial_editor->get_gizmo_transform();
 	Transform xform = spatial_editor->get_gizmo_transform();
@@ -3484,7 +3484,7 @@ void SpatialEditor::_instance_scene() {
 
 
 void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
 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;
 		return;
 
 
 #if 0
 #if 0

+ 1 - 1
tools/editor/plugins/sprite_frames_editor_plugin.cpp

@@ -941,7 +941,7 @@ void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
 	} else {
 	} else {
 
 
 		button->hide();
 		button->hide();
-		if (frames_editor->is_visible())
+		if (frames_editor->is_visible_in_tree())
 			editor->hide_bottom_panel();
 			editor->hide_bottom_panel();
 
 
 //		frames_editor->set_process(false);
 //		frames_editor->set_process(false);

+ 1 - 1
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);
 		EditorNode::get_singleton()->make_bottom_panel_item_visible(stylebox_editor);
 
 
 	} else {
 	} else {
-		if (stylebox_editor->is_visible())
+		if (stylebox_editor->is_visible_in_tree())
 			EditorNode::get_singleton()->hide_bottom_panel();
 			EditorNode::get_singleton()->hide_bottom_panel();
 		button->hide();
 		button->hide();
 	}
 	}

+ 1 - 1
tools/editor/plugins/theme_editor_plugin.cpp

@@ -975,7 +975,7 @@ void ThemeEditorPlugin::make_visible(bool p_visible){
 
 
 	} else {
 	} else {
 		theme_editor->set_process(false);
 		theme_editor->set_process(false);
-		if (theme_editor->is_visible())
+		if (theme_editor->is_visible_in_tree())
 			editor->hide_bottom_panel();
 			editor->hide_bottom_panel();
 		button->hide();
 		button->hide();
 	}
 	}

+ 2 - 2
tools/editor/plugins/tile_map_editor_plugin.cpp

@@ -53,7 +53,7 @@ void TileMapEditor::_notification(int p_what) {
 		} break;
 		} break;
 		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
 		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
 
 
-			if (is_visible()) {
+			if (is_visible_in_tree()) {
 				_update_palette();
 				_update_palette();
 			}
 			}
 		} break;
 		} 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) {
 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;
 		return false;
 
 
 	Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();
 	Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform();

+ 2 - 2
tools/editor/project_export.cpp

@@ -176,7 +176,7 @@ void ProjectExportDialog::_scan_finished() {
 	print_line("**********SCAN DONEEE********");
 	print_line("**********SCAN DONEEE********");
 	print_line("**********SCAN DONEEE********");*/
 	print_line("**********SCAN DONEEE********");*/
 
 
-	if (!is_visible()) {
+	if (!is_visible_in_tree()) {
 		pending_update_tree=true;
 		pending_update_tree=true;
 		return;
 		return;
 	}
 	}
@@ -368,7 +368,7 @@ void ProjectExportDialog::_notification(int p_what) {
 
 
 		} break;
 		} break;
 		case NOTIFICATION_VISIBILITY_CHANGED: {
 		case NOTIFICATION_VISIBILITY_CHANGED: {
-			if (is_visible())
+			if (is_visible_in_tree())
 				_validate_platform();
 				_validate_platform();
 
 
 		} break;
 		} break;

+ 1 - 1
tools/editor/project_manager.cpp

@@ -488,7 +488,7 @@ void ProjectManager::_notification(int p_what) {
 
 
 	} else if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 	} else if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
 
 
-		set_process_unhandled_input(is_visible());
+		set_process_unhandled_input(is_visible_in_tree());
 	}
 	}
 }
 }
 
 

+ 2 - 2
tools/editor/property_editor.cpp

@@ -2802,13 +2802,13 @@ void PropertyEditor::_notification(int p_what) {
 
 
 	if (p_what==NOTIFICATION_DRAG_BEGIN) {
 	if (p_what==NOTIFICATION_DRAG_BEGIN) {
 
 
-		if (is_visible() && tree->get_root()) {
+		if (is_visible_in_tree() && tree->get_root()) {
 			_mark_drop_fields(tree->get_root());
 			_mark_drop_fields(tree->get_root());
 		}
 		}
 	}
 	}
 
 
 	if (p_what==NOTIFICATION_DRAG_END) {
 	if (p_what==NOTIFICATION_DRAG_END) {
-		if (is_visible() && tree->get_root()) {
+		if (is_visible_in_tree() && tree->get_root()) {
 			_clear_drop_fields(tree->get_root());
 			_clear_drop_fields(tree->get_root());
 		}
 		}
 
 

+ 1 - 1
tools/editor/scene_tree_dock.cpp

@@ -722,7 +722,7 @@ void SceneTreeDock::_node_selected() {
 		return;
 		return;
 	}
 	}
 
 
-	if (ScriptEditor::get_singleton()->is_visible()) {
+	if (ScriptEditor::get_singleton()->is_visible_in_tree()) {
 		restore_script_editor_on_drag=true;
 		restore_script_editor_on_drag=true;
 	}
 	}
 
 

+ 1 - 1
tools/editor/scene_tree_editor.cpp

@@ -1264,7 +1264,7 @@ void SceneTreeDialog::_notification(int p_what) {
 		get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
 		get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
 	}
 	}
 
 
-	if (p_what==NOTIFICATION_VISIBILITY_CHANGED && is_visible()) {
+	if (p_what==NOTIFICATION_VISIBILITY_CHANGED && is_visible_in_tree()) {
 
 
 		tree->update_tree();
 		tree->update_tree();
 	}
 	}

+ 5 - 5
tools/editor/script_editor_debugger.cpp

@@ -580,7 +580,7 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
 			String t = p_data[i];
 			String t = p_data[i];
 			//LOG
 			//LOG
 
 
-			if (EditorNode::get_log()->is_hidden()) {
+			if (!EditorNode::get_log()->is_visible()) {
 				if (EditorNode::get_singleton()->are_bottom_panels_hidden()) {
 				if (EditorNode::get_singleton()->are_bottom_panels_hidden()) {
 					EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
 					EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
 				}
 				}
@@ -905,7 +905,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
 				inspect_scene_tree_timeout-=get_process_delta_time();
 				inspect_scene_tree_timeout-=get_process_delta_time();
 				if (inspect_scene_tree_timeout<0) {
 				if (inspect_scene_tree_timeout<0) {
 					inspect_scene_tree_timeout=EditorSettings::get_singleton()->get("debugger/scene_tree_refresh_interval");
 					inspect_scene_tree_timeout=EditorSettings::get_singleton()->get("debugger/scene_tree_refresh_interval");
-					if (inspect_scene_tree->is_visible()) {
+					if (inspect_scene_tree->is_visible_in_tree()) {
 						_scene_tree_request();
 						_scene_tree_request();
 
 
 						if (inspected_object_id!=0) {
 						if (inspected_object_id!=0) {
@@ -921,7 +921,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
 				inspect_edited_object_timeout-=get_process_delta_time();
 				inspect_edited_object_timeout-=get_process_delta_time();
 				if (inspect_edited_object_timeout<0) {
 				if (inspect_edited_object_timeout<0) {
 					inspect_edited_object_timeout=EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval");
 					inspect_edited_object_timeout=EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval");
-					if (inspect_scene_tree->is_visible() && inspected_object_id) {
+					if (inspect_scene_tree->is_visible_in_tree() && inspected_object_id) {
 						//take the chance and re-inspect selected object
 						//take the chance and re-inspect selected object
 						Array msg;
 						Array msg;
 						msg.push_back("inspect_object");
 						msg.push_back("inspect_object");
@@ -1087,7 +1087,7 @@ void ScriptEditorDebugger::start() {
 
 
 	stop();
 	stop();
 
 
-	if (is_visible()) {
+	if (is_visible_in_tree()) {
 		EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
 		EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
 	}
 	}
 
 
@@ -1146,7 +1146,7 @@ void ScriptEditorDebugger::stop(){
 
 
 
 
 	if (hide_on_stop) {
 	if (hide_on_stop) {
-		if (is_visible())
+		if (is_visible_in_tree())
 			EditorNode::get_singleton()->hide_bottom_panel();
 			EditorNode::get_singleton()->hide_bottom_panel();
 		emit_signal("show_debugger",false);
 		emit_signal("show_debugger",false);
 	}
 	}