From 8a88e5ea07d9638730290f3f739c5744e54ba570 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Sat, 23 Mar 2024 14:02:59 +0100 Subject: [PATCH] Add missing `RenderInfoType` enum to `Viewport` --- doc/classes/Viewport.xml | 8 +++++++- scene/main/viewport.cpp | 1 + scene/main/viewport.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 13d84d96d6fe..dcc817427b26 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -497,10 +497,16 @@ Represents the size of the [enum RenderInfo] enum. + Visible render pass (excluding shadows). + Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. - + + Canvas item rendering. This includes all 2D rendering. + + + Represents the size of the [enum RenderInfoType] enum. Objects are displayed normally. diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index c8d2d71c2afa..92aa0901b6c5 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -4843,6 +4843,7 @@ void Viewport::_bind_methods() { BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_VISIBLE); BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_SHADOW); + BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_CANVAS); BIND_ENUM_CONSTANT(RENDER_INFO_TYPE_MAX); BIND_ENUM_CONSTANT(DEBUG_DRAW_DISABLED); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 29ccdc5426bc..21832a454c4f 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -138,6 +138,7 @@ class Viewport : public Node { enum RenderInfoType { RENDER_INFO_TYPE_VISIBLE, RENDER_INFO_TYPE_SHADOW, + RENDER_INFO_TYPE_CANVAS, RENDER_INFO_TYPE_MAX };