diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 17:14:24 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 17:14:24 +0100 |
commit | 604abb434f6740935be669dc8152856412d9ca73 (patch) | |
tree | e89ab4a043a0cb05e12518531e45087fee442952 /doc | |
parent | 06c8e406e4975528dc72f1f07d70958bba5675fb (diff) | |
parent | fcb9be66a252b59327ca113c2f6e2ba2f8bc8599 (diff) |
Merge pull request #52350 from BimDav/viewport_canvas_cull
Added Viewport canvas cull mask feature
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/CanvasItem.xml | 18 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 16 | ||||
-rw-r--r-- | doc/classes/Viewport.xml | 18 |
3 files changed, 52 insertions, 0 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 34837478f4..ee09b016ac 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -456,6 +456,13 @@ Returns this item's transform in relation to the viewport. </description> </method> + <method name="get_visibility_layer_bit" qualifiers="const"> + <return type="bool" /> + <param index="0" name="layer" type="int" /> + <description> + Returns an individual bit on the rendering visibility layer. + </description> + </method> <method name="get_world_2d" qualifiers="const"> <return type="World2D" /> <description> @@ -527,6 +534,14 @@ If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. </description> </method> + <method name="set_visibility_layer_bit"> + <return type="void" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="enabled" type="bool" /> + <description> + Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer. + </description> + </method> <method name="show"> <return type="void" /> <description> @@ -565,6 +580,9 @@ <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false"> If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. </member> + <member name="visibility_layer" type="int" setter="set_visibility_layer" getter="get_visibility_layer" default="1"> + The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask. + </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 35fe7bdbd2..1c02d58299 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -499,6 +499,14 @@ Sets if the [CanvasItem] uses its parent's material. </description> </method> + <method name="canvas_item_set_visibility_layer"> + <return type="void" /> + <param index="0" name="item" type="RID" /> + <param index="1" name="visibility_layer" type="int" /> + <description> + Sets the rendering visibility layer associated with this [CanvasItem]. Only [Viewport] nodes with a matching rendering mask will render this [CanvasItem]. + </description> + </method> <method name="canvas_item_set_visibility_notifier"> <return type="void" /> <param index="0" name="item" type="RID" /> @@ -3143,6 +3151,14 @@ If [code]true[/code], sets the viewport active, else sets it inactive. </description> </method> + <method name="viewport_set_canvas_cull_mask"> + <return type="void" /> + <param index="0" name="viewport" type="RID" /> + <param index="1" name="canvas_cull_mask" type="int" /> + <description> + Sets the rendering mask associated with this [Viewport]. Only [CanvasItem] nodes with a matching rendering visibility layer will be rendered by this [Viewport]. + </description> + </method> <method name="viewport_set_canvas_stacking"> <return type="void" /> <param index="0" name="viewport" type="RID" /> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 5706d098e8..78013a8f4b 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -45,6 +45,13 @@ Returns the currently active 3D camera. </description> </method> + <method name="get_canvas_cull_mask_bit" qualifiers="const"> + <return type="bool" /> + <param index="0" name="layer" type="int" /> + <description> + Returns an individual bit on the rendering layer mask. + </description> + </method> <method name="get_final_transform" qualifiers="const"> <return type="Transform2D" /> <description> @@ -176,6 +183,14 @@ If none of the methods handle the event and [member physics_object_picking] is [code]true[/code], the event is used for physics object picking. </description> </method> + <method name="set_canvas_cull_mask_bit"> + <return type="void" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="enable" type="bool" /> + <description> + Set/clear individual bits on the rendering layer mask. This simplifies editing this [Viewport]'s layers. + </description> + </method> <method name="set_input_as_handled"> <return type="void" /> <description> @@ -205,6 +220,9 @@ <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener_3d" getter="is_audio_listener_3d" default="false"> If [code]true[/code], the viewport will process 3D audio streams. </member> + <member name="canvas_cull_mask" type="int" setter="set_canvas_cull_mask" getter="get_canvas_cull_mask" default="4294967295"> + The rendering layers in which this [Viewport] renders [CanvasItem] nodes. + </member> <member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1"> Sets the default filter mode used by [CanvasItem]s in this Viewport. See [enum DefaultCanvasItemTextureFilter] for options. </member> |