From 8af50726522773a9f5d280054c9517a694d7ff65 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 5 Feb 2025 10:57:06 +0100 Subject: [PATCH] Mention visibility layers and inheritance in `Node3D.is_visible_in_tree()` docs --- doc/classes/CanvasItem.xml | 2 +- doc/classes/Node3D.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 7651b61c5be..cf32dd313ff 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -535,7 +535,7 @@ Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see [method _draw]). Visibility is checked only in parent nodes that inherit from [CanvasItem], [CanvasLayer], and [Window]. If the parent is of any other type (such as [Node], [AnimationPlayer], or [Node3D]), it is assumed to be visible. - [b]Note:[/b] This method does not take [member visibility_layer] into account, so even if this method returns [code]true[/code] the node might end up not being rendered. + [b]Note:[/b] This method does not take [member visibility_layer] into account, so even if this method returns [code]true[/code], the node might end up not being rendered. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index ba0272b02fe..d092fd50a99 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -117,6 +117,8 @@ Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree. + Visibility is checked only in parent nodes that inherit from [Node3D]. If the parent is of any other type (such as [Node], [AnimationPlayer], or [Node2D]), it is assumed to be visible. + [b]Note:[/b] This method does not take [member VisualInstance3D.layers] into account, so even if this method returns [code]true[/code], the node might end up not being rendered.