Skip to content

Conversation

@decryptedchaos
Copy link
Member

@decryptedchaos decryptedchaos commented Jan 6, 2026

Summary by CodeRabbit

  • New Features

    • Read editor settings directly from disk and expose a new default editor base color; added a public accessor for boot splash background color.
  • Refactor

    • Centralized boot splash and editor background color selection for consistent visuals across startup, splash, and editor views.
  • Bug Fixes

    • Improved fallback when settings are missing or unreadable during startup.
  • Documentation

    • Updated default clear color and cleaned up boot-splash setting description.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

Walkthrough

Adds EditorSettings helpers to read a setting directly from the on-disk editor settings file and provide a default base color; centralizes boot splash background color selection into Main::get_boot_splash_bg_color(); updates rendering to use this central color and registers a new project default/application boot color.

Changes

Cohort / File(s) Summary
EditorSettings API
editor/settings/editor_settings.h, editor/settings/editor_settings.cpp
Added static Variant get_setting_directly(const String &p_setting, const Variant &p_default = Variant()) (parses on-disk editor settings via VariantParser/rp_new), static Color get_default_base_color() (returns Color(0.06,0.09,0.14)), and an internal _parse_direct_resource_dummy(...) callback; added #include "core/variant/variant_parser.h".
Main / Boot Color Logic
main/main.h, main/main.cpp
Added static Color get_boot_splash_bg_color() to centralize boot splash/background color resolution; in editor/tools path it queries EditorSettings (with direct-on-disk fallback), otherwise reads GLOBAL_GET("application/boot_splash/bg_color"); added GLOBAL_DEF default for application/boot_splash/bg_color.
Rendering Integration
servers/rendering/renderer_viewport.cpp
Added #include "main/main.h" and replaced editor-path default clear color retrieval with Main::get_boot_splash_bg_color() in draw_viewports.
Project Defaults & Docs
core/config/project_settings.cpp, doc/classes/ProjectSettings.xml
Registered new default project setting application/boot_splash/bg_color (Color(0.14,0.14,0.14)); updated documented default for rendering/environment/defaults/default_clear_color to Color(0.14,0.14,0.14,1) and removed inline description for application/boot_splash/bg_color.
Declarations / Forward-declare
main/main.h
Added struct Color; forward declaration and public static get_boot_splash_bg_color() in Main header.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Renderer as RendererViewport
  participant Main as Main::get_boot_splash_bg_color()
  participant Editor as EditorSettings
  participant Disk as VariantParser/rp_new

  Note over Main,Editor: Resolve boot/clear background color

  Renderer->>Main: request boot splash bg color
  alt Editor/tools context
    Main->>Editor: query "interface/theme/base_color" (in-memory)
    alt in-memory present
      Editor-->>Main: return Color
    else
      Editor->>Disk: parse editor settings file (VariantParser / rp_new)
      Disk-->>Editor: parsed Variant or error
      Editor-->>Main: extracted Color or get_default_base_color on failure
    end
  else not editor/tools
    Main-->>Main: read GLOBAL_GET("application/boot_splash/bg_color")
  end
  Main-->>Renderer: resolved Color
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: refactoring how splash background color is handled by centralizing the logic across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f00bae1 and deb187d.

📒 Files selected for processing (3)
  • core/config/project_settings.cpp
  • doc/classes/ProjectSettings.xml
  • main/main.cpp
🚧 Files skipped from review as they are similar to previous changes (2)
  • core/config/project_settings.cpp
  • doc/classes/ProjectSettings.xml
🧰 Additional context used
🧬 Code graph analysis (1)
main/main.cpp (1)
editor/settings/editor_settings.cpp (6)
  • get_singleton (1221-1223)
  • get_singleton (1221-1221)
  • get_setting_directly (1247-1287)
  • get_setting_directly (1247-1247)
  • get_default_base_color (1289-1291)
  • get_default_base_color (1289-1289)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: 🐧 Linux / Minimal template (target=template_release, everything disabled)
  • GitHub Check: 🐧 Linux / Editor with ThreadSanitizer (target=editor, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
  • GitHub Check: 🐧 Linux / Template w/ Mono, release (target=template_release)
  • GitHub Check: 🏁 Windows / Template (target=template_release)
  • GitHub Check: 🐧 Linux / Template w/ Mono, debug (target=template_debug)
  • GitHub Check: 🐧 Linux / Editor w/ Mono (target=editor)
  • GitHub Check: 🍎 macOS / Template (target=template_release)
  • GitHub Check: 🌐 Web / Template w/o threads (target=template_release, threads=no)
  • GitHub Check: 🤖 Android / Template arm32 (target=template_release, arch=arm32)
  • GitHub Check: 🏁 Windows / Template w/ GCC (target=template_release, use_mingw=yes)
  • GitHub Check: 🏁 Windows / Editor (target=editor)
  • GitHub Check: 🍎 macOS / Editor (target=editor)
  • GitHub Check: 🍏 iOS / Template (target=template_release)
  • GitHub Check: 🤖 Android / Template arm64 (target=template_release, arch=arm64)
  • GitHub Check: 🌐 Web / Template w/ threads (target=template_release, threads=yes)
🔇 Additional comments (4)
main/main.cpp (4)

3168-3170: Good: Global defined before first use.

The global setting is correctly defined at line 3168 before being used at line 3169 via get_boot_splash_bg_color(). This addresses the critical issue raised in previous reviews where the global was defined too late or in the wrong code path.


3765-3776: Well-structured helper function with good fallback logic.

The function correctly centralizes boot splash background color retrieval with a robust fallback chain:

  1. EditorSettings singleton (if available)
  2. Direct file read from EditorSettings
  3. Global project setting

The context-dependent behavior (editor uses theme base color vs game uses boot splash color) appears intentional and reasonable - in the editor, viewports should match the UI theme; in games, they should match the boot splash aesthetic.


3484-3484: Note: Context-dependent default value.

The default clear color uses get_boot_splash_bg_color() as its default, which returns different values depending on whether code is running in the editor (EditorSettings base color) or at game runtime (boot splash color).

This means for new projects, the default clear color will differ based on whether the project is first opened in the editor vs run directly. Once a user explicitly sets this value in project settings, it will be consistent. This behavior appears intentional to provide context-appropriate defaults, but worth noting for awareness.


3824-3825: Correct: Boot splash color usage during startup, then reset.

The code correctly applies the boot splash background color during the boot logo display phase (lines 3824-3825, 3837-3838), then resets the default clear color to the configured value afterward (lines 3851-3854) for game runtime. The conditional at line 3851 appropriately skips this reset for editor/project_manager contexts.

This ensures the viewport uses the boot splash aesthetic during startup, then transitions to the project's configured clear color.

Also applies to: 3837-3838, 3851-3854


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Fix all issues with AI Agents 🤖
In @servers/rendering/renderer_viewport.cpp:
- Line 40: The current change calls Main::_get_boot_splash_bg_color() every
frame from RendererViewport::draw_viewports(), but that function may call
EditorSettings::get_setting_directly() and reparse the editor settings file per
call; modify Main::_get_boot_splash_bg_color() to first check
EditorSettings::get_singleton() and, if present, read
"interface/theme/base_color" from the singleton (in-memory) and only use
EditorSettings::get_setting_directly() as a fallback when the singleton is null
(early boot); keep the RendererViewport::draw_viewports() call to
set_default_clear_color(Main::_get_boot_splash_bg_color()) so runtime uses the
fast in-memory lookup.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
main/main.cpp (1)

3171-3175: Improve performance of boot background color lookup in hot rendering path

The refactor to _get_boot_splash_bg_color() centralizes boot/background color decisions well, but has a performance issue in editor mode:

_get_boot_splash_bg_color() is called from RendererViewport::draw_viewports() every frame in editor mode. Currently, it always calls EditorSettings::get_setting_directly("interface/theme/base_color", ...), which opens and parses the editor settings file from disk on each invocation. This is inefficient once EditorSettings is initialized.

Recommended fix: Use the in-memory cached settings when the singleton is available:

Color Main::_get_boot_splash_bg_color() {
#if defined(TOOLS_ENABLED)
	if (editor || project_manager) {
		if (EditorSettings::get_singleton()) {
			// Use cached in-memory settings
			return EditorSettings::get_singleton()->get_setting("interface/theme/base_color").operator Color();
		}
		// Early boot: singleton not yet initialized, fall back to direct file read
		return EditorSettings::get_setting_directly("interface/theme/base_color",
				EditorSettings::get_default_base_color());
	}
#endif
	return GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color);
}

This preserves early-boot behavior while eliminating per-frame disk parsing during editing and project execution from the editor.

Note: The behavior divergence between editor builds (using theme base color) and runtime builds (using project rendering default) is intentional per the code structure, so that aspect is fine.

editor/settings/editor_settings.cpp (1)

1-1: Fix clang-format violations.

The CI pipeline indicates that formatting changes were applied by the clang-format hook. Please run clang-format on this file and commit the formatting changes to resolve the pipeline failure.

#!/bin/bash
# Run clang-format to fix formatting issues
clang-format -i editor/settings/editor_settings.cpp
🧹 Nitpick comments (2)
main/main.h (1)

40-41: Public helper naming and dependency on incomplete Color type

The new public static _get_boot_splash_bg_color() is fine mechanically, but two small nits:

  • A public method with a leading underscore reads like a private/internal helper; consider exposing it as get_boot_splash_bg_color() (and optionally keeping a private _get_... if you want) for clarity.
  • With only struct Color; here, any translation unit using this function must already include the real Color definition via some other header; that’s currently true, but a direct #include "core/math/color.h" here would make the dependency explicit and reduce the chance of call‑site compile surprises later.

Also applies to: 78-78

editor/settings/editor_settings.h (1)

141-142: Clarify intended usage and cost of get_setting_directly() in the API

The new helpers are useful, but get_setting_directly() is a fairly “heavy” operation (direct file parse) and bypasses the normal in-memory EditorSettings state:

  • Consider documenting (in a brief comment in the header) that this is meant for early-boot or exceptional cases where the singleton isn’t available yet, and shouldn’t be used in per-frame or other hot paths.
  • Where the singleton exists, callers should generally prefer EditorSettings::get_singleton()->get_setting(...) so changes made in the current session are respected and lookups stay cheap.

This helps future callers (including plugin authors) avoid accidentally using the disk-based path in tight loops.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 377a20a and 7ff5d3b.

📒 Files selected for processing (5)
  • editor/settings/editor_settings.cpp
  • editor/settings/editor_settings.h
  • main/main.cpp
  • main/main.h
  • servers/rendering/renderer_viewport.cpp
🧰 Additional context used
🧬 Code graph analysis (3)
servers/rendering/renderer_viewport.cpp (1)
main/main.cpp (2)
  • _get_boot_splash_bg_color (3767-3775)
  • _get_boot_splash_bg_color (3767-3767)
editor/settings/editor_settings.h (1)
editor/settings/editor_settings.cpp (4)
  • get_setting_directly (1247-1287)
  • get_setting_directly (1247-1247)
  • get_default_base_color (1289-1291)
  • get_default_base_color (1289-1289)
main/main.h (1)
main/main.cpp (2)
  • _get_boot_splash_bg_color (3767-3775)
  • _get_boot_splash_bg_color (3767-3767)
🪛 GitHub Actions: 🔗 GHA
servers/rendering/renderer_viewport.cpp

[error] 1-1: clang-format: formatting changes were applied by the hook.

editor/settings/editor_settings.h

[error] 1-1: clang-format formatting check failed. Changes were made by the hook.

main/main.h

[error] 1-1: clang-format formatting check failed. Changes were made by the hook.

editor/settings/editor_settings.cpp

[error] 1-1: clang-format: formatting changes were applied by the hook.

main/main.cpp

[error] 1-1: clang-format: formatting changes were applied by the hook.

🔇 Additional comments (5)
main/main.cpp (1)

1933-1942: Fallback to project manager when project load fails looks correct

On globals->setup() failure in tools builds, forcing editor = false and project_manager = true mirrors the later “no project found ⇒ open project manager” logic and avoids hard erroring when no valid project is present. This is a sensible refinement of the startup behavior.

editor/settings/editor_settings.cpp (4)

46-46: LGTM!

The include is necessary for the new get_setting_directly function that uses VariantParser.


586-586: Good refactoring to centralize the default base color.

Centralizing the default base color allows it to be reused in other parts of the codebase (such as boot splash initialization).


1289-1291: Verify the significant change in default base color.

The default base color changed from Color(0.2, 0.23, 0.31) to Color(0.06, 0.09, 0.14), which is considerably darker:

  • Old: RGB(51, 59, 79)
  • New: RGB(15, 23, 36)

This is a major visual change that will affect the default editor theme. Please confirm this is intentional and aligns with the design goals for the splash screen and editor theme.


1243-1287: No changes needed. Verification confirms get_setting_directly is called only once during boot splash initialization in _get_boot_splash_bg_color(). The current implementation is appropriate for this single early-startup use case. Performance concerns about multiple calls and caching suggestions are not applicable here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
main/main.cpp (1)

3483-3485: Consider clarifying or simplifying the clear color setup logic.

The default clear color is set at line 3485, then conditionally reset at lines 3851-3852 for non-editor/project-manager builds from the same project setting. This appears redundant for game builds.

If there's a specific reason for this two-phase setup (e.g., the setting might change between these points, or there are ordering dependencies), please add a comment explaining the intent. Otherwise, consider simplifying by removing the redundant assignment.

Also applies to: 3850-3853

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ff5d3b and a9ebac7.

📒 Files selected for processing (1)
  • main/main.cpp
🧰 Additional context used
🧬 Code graph analysis (1)
main/main.cpp (1)
editor/settings/editor_settings.cpp (6)
  • get_singleton (1221-1223)
  • get_singleton (1221-1221)
  • get_setting_directly (1247-1287)
  • get_setting_directly (1247-1247)
  • get_default_base_color (1289-1291)
  • get_default_base_color (1289-1289)
🔇 Additional comments (3)
main/main.cpp (3)

3169-3170: LGTM - Early boot color setup looks correct.

The early window clear color is properly set using the new helper function before display server initialization.


3823-3823: LGTM - Boot logo color usage is correct.

The boot splash background color is now consistently retrieved using the centralized helper function.


1936-1947: The fallback to project manager mode when project loading fails is intentional and well-handled.

This behavior is by design in TOOLS_ENABLED builds—when globals->setup() fails, the engine gracefully falls back to project manager mode instead of aborting. The code appropriately handles this state:

  • The found_project flag tracks whether project initialization succeeded
  • Subsequent initialization code treats editor || project_manager consistently (WorkerThreadPool, InputMap, rendering setup)
  • There's a secondary fallback at line ~2018: project_manager = !found_project && !cmdline_tool; that reinforces this pattern
  • In non-TOOLS builds, the error path is correctly preserved

No changes needed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
editor/settings/editor_settings.cpp (1)

1243-1291: Direct settings reader is useful; consider making the resource stub consume tokens

EditorSettings::get_setting_directly() cleanly encapsulates the early-on-disk read logic currently needed from main.cpp, with conservative fallbacks on any failure paths and no impact on the regular EditorSettings lifecycle. Two small robustness notes:

  • _parse_direct_resource_dummy() currently just returns OK without consuming any tokens. For settings whose values are Resources, a future reuse of get_setting_directly() could run into parsing issues. Mirroring the behavior of _parse_resource_dummy in main.cpp (i.e., actually advancing past the resource expression) would make this safer.
  • Inside the loop you ignore non-OK, non-ERR_FILE_EOF parse errors and continue. That’s acceptable for this narrow use-case (base color as a Color), but if the helper is reused more broadly, you might want to bail out early on the first parse error and return p_default to avoid spinning on a malformed file.

Functionally, for the current caller (interface/theme/base_color as a Color), this should work as intended and correctly falls back to get_default_base_color() when anything goes wrong.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9ebac7 and dbddacc.

📒 Files selected for processing (4)
  • editor/settings/editor_settings.cpp
  • main/main.cpp
  • main/main.h
  • servers/rendering/renderer_viewport.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • servers/rendering/renderer_viewport.cpp
🧰 Additional context used
🧬 Code graph analysis (2)
main/main.h (1)
main/main.cpp (2)
  • get_boot_splash_bg_color (3765-3776)
  • get_boot_splash_bg_color (3765-3765)
main/main.cpp (1)
editor/settings/editor_settings.cpp (6)
  • get_singleton (1221-1223)
  • get_singleton (1221-1221)
  • get_setting_directly (1247-1287)
  • get_setting_directly (1247-1247)
  • get_default_base_color (1289-1291)
  • get_default_base_color (1289-1289)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: 🐧 Linux / Template w/ Mono, debug (target=template_debug)
  • GitHub Check: 🐧 Linux / Editor w/ Mono (target=editor)
  • GitHub Check: 🐧 Linux / Template w/ Mono, release (target=template_release)
  • GitHub Check: 🏁 Windows / Editor (target=editor)
  • GitHub Check: 🐧 Linux / Editor with ThreadSanitizer (target=editor, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
  • GitHub Check: 🍎 macOS / Template (target=template_release)
  • GitHub Check: 🐧 Linux / Minimal template (target=template_release, everything disabled)
  • GitHub Check: 🌐 Web / Template w/o threads (target=template_release, threads=no)
  • GitHub Check: 🏁 Windows / Template w/ GCC (target=template_release, use_mingw=yes)
  • GitHub Check: 🍎 macOS / Editor (target=editor)
  • GitHub Check: 🏁 Windows / Template (target=template_release)
  • GitHub Check: 🌐 Web / Template w/ threads (target=template_release, threads=yes)
  • GitHub Check: 🤖 Android / Template arm32 (target=template_release, arch=arm32)
  • GitHub Check: 🤖 Android / Template arm64 (target=template_release, arch=arm64)
  • GitHub Check: 🍏 iOS / Template (target=template_release)
🔇 Additional comments (8)
main/main.h (1)

38-41: New Color forward declaration and boot splash accessor look correct

Using a forward declaration for Color here is sufficient for the static accessor declaration, and exposing Main::get_boot_splash_bg_color() as a central API for callers is a clean design choice with no obvious ABI or correctness issues.

Also applies to: 73-79

main/main.cpp (5)

1938-1940: Treating failed project load as project manager context is reasonable

Switching to project_manager = true on globals->setup() failure (TOOLS builds) makes subsequent initialization (thread pool sizing, display, hints) consistently follow the project manager path instead of a half-editor/half-game state. No functional regressions spotted.


3169-3171: Centralized boot background for early window clear

Using Color boot_bg_color = get_boot_splash_bg_color(); and passing it to DisplayServer::set_early_window_clear_color_override() ensures the OS window clear color matches the eventual splash background in both editor and game contexts. This is a solid cohesion improvement.


3484-3485: Default clear color fallback now aligned with boot splash color

Using:

Color clear = GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", get_boot_splash_bg_color());

means a fresh project without an explicit default clear color will inherit the boot splash color, which is a sensible and backwards-compatible default.


3765-3776: get_boot_splash_bg_color() logic is sound and respects editor vs project settings

The new accessor cleanly separates behavior:

  • In TOOLS builds with editor || project_manager:

    • Prefer EditorSettings::get_singleton()->get_setting("interface/theme/base_color") when the singleton is initialized.
    • Otherwise, fall back to EditorSettings::get_setting_directly(..., EditorSettings::get_default_base_color()), which safely reads the on-disk config or returns the internal default.
  • In non-editor contexts, defer to GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color) as before.

This centralizes all splash background decisions and avoids duplicating the early-EditorSettings parsing logic in main.cpp.


3823-3853: Boot logo now consistently uses centralized boot color, with correct post-boot clear reset

  • setup_boot_logo() now reuses get_boot_splash_bg_color() for both custom and default splash rendering, which keeps editor/project-manager and game boot visuals in sync with the chosen base color.
  • The new block:
if (!editor && !project_manager) {
	RenderingServer::get_singleton()->set_default_clear_color(
			GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
}

ensures that for games the runtime clear color reverts to the project’s default_clear_color after the boot logo, while editor/project-manager sessions keep using the editor base color as their default clear. This matches expectations for decoupling splash vs in-project background without breaking existing editor behavior.

editor/settings/editor_settings.cpp (2)

49-49: VariantParser include is appropriate for new direct parsing helper

Adding #include "core/variant/variant_parser.h" is required for the new direct settings reader and is scoped correctly to this implementation file.


586-587: Base color default now shared via helper – good centralization

Using get_default_base_color() in:

EDITOR_SETTING_BASIC(Variant::COLOR, PROPERTY_HINT_NONE, "interface/theme/base_color", get_default_base_color(), "")

eliminates the hard-coded literal and ensures the editor default, boot splash background, and any other callers of get_default_base_color() stay consistent.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
doc/classes/ProjectSettings.xml (1)

290-292: Fix dangling docs references to removed application/boot_splash/bg_color (breaks make-rst)

application/boot_splash/bg_color is no longer a documented member, but two descriptions still link to it, causing the reported XML doc build failures. Reword those notes to drop the [member ...] reference.

Proposed XML diff to remove broken member links
@@
-       <member name="application/boot_splash/show_image" type="bool" setter="" getter="" default="true">
-           If [code]true[/code], displays the image specified in [member application/boot_splash/image] when the engine starts. If [code]false[/code], only displays the plain color specified in [member application/boot_splash/bg_color].
-       </member>
+       <member name="application/boot_splash/show_image" type="bool" setter="" getter="" default="true">
+           If [code]true[/code], displays the image specified in [member application/boot_splash/image] when the engine starts. If [code]false[/code], only displays a plain background color.
+       </member>
@@
-       <member name="display/window/size/transparent" type="bool" setter="" getter="" default="false">
-           If [code]true[/code], enables a window manager hint that the main window background [i]can[/i] be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling [member rendering/viewport/transparent_background].
-           [b]Note:[/b] To use a transparent splash screen, set [member application/boot_splash/bg_color] to [code]Color(0, 0, 0, 0)[/code].
-           [b]Note:[/b] This setting has no effect if [member display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
-           [b]Note:[/b] This setting has no effect on Android as transparency is controlled only via [member display/window/per_pixel_transparency/allowed].
-       </member>
+       <member name="display/window/size/transparent" type="bool" setter="" getter="" default="false">
+           If [code]true[/code], enables a window manager hint that the main window background [i]can[/i] be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling [member rendering/viewport/transparent_background].
+           [b]Note:[/b] To use a transparent splash screen, ensure the boot splash background color is fully transparent, for example [code]Color(0, 0, 0, 0)[/code].
+           [b]Note:[/b] This setting has no effect if [member display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
+           [b]Note:[/b] This setting has no effect on Android as transparency is controlled only via [member display/window/per_pixel_transparency/allowed].
+       </member>

Also applies to: 1026-1031

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dbddacc and 30f9304.

📒 Files selected for processing (1)
  • doc/classes/ProjectSettings.xml
🧰 Additional context used
🪛 GitHub Actions: 🔗 GHA
doc/classes/ProjectSettings.xml

[error] 1-1: make-rst: Unresolved member reference "application/boot_splash/bg_color" in property "application/boot_splash/show_image" description. 2 errors were found in the class reference XML.


[error] 1-1: make-rst: Unresolved member reference "application/boot_splash/bg_color" in property "display/window/size/transparent" description.

🔇 Additional comments (2)
doc/classes/ProjectSettings.xml (2)

2800-2802: Doc default for rendering/environment/defaults/default_clear_color updated correctly

The new default color value is consistent with the PR’s refactor of splash/background color; the member docs stay accurate and self‑contained.


3163-3165: Mobile renderer override default switched to gl_compatibility

The updated default for rendering/renderer/rendering_method.mobile matches the engine change and keeps the description valid.

@decryptedchaos
Copy link
Member Author

decryptedchaos commented Jan 6, 2026

@Arctis-Fireblight After reviewing this, i can see what is happening, i just don't know why.

--doctool generates the new documents from the code with the member definition removed because i guess its not needed? But the CI fails because it wants the member to be defined. unclear.

But if i add the member definition manually it failed to build the rst files because its a undefined member?? i'm confused atm.. Will work on it tomorrow.

Remove Unneeded files
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI Agents
In @main/main.cpp:
- Around line 4030-4031: The global property "application/boot_splash/bg_color"
is only registered in the doctool-only path, so Main::get_boot_splash_bg_color()
(which calls GLOBAL_GET) can see an undefined/default Color at runtime; fix by
registering the global in the normal startup path (move or add the
GLOBAL_DEF(PropertyInfo(..., "application/boot_splash/bg_color"), Color(...))
outside the doctool-only block), e.g. in start() before the doctool check or
alongside other boot splash GLOBAL_DEF calls in setup(), or change
get_boot_splash_bg_color() to call GLOBAL_DEF instead of GLOBAL_GET so the
setting is defined on first access.
- Line 1939: The assignment project_manager = true in main.cpp's project-loading
error path appears unintended for non-tools builds; either remove this
assignment from the error path or wrap it with #ifdef TOOLS_ENABLED so it only
takes effect in tools builds, and ensure the project-loading failure handling
code (the branch that currently sets project_manager) remains unchanged for
non-tools builds so the variable is not erroneously toggled where project
manager code is not compiled.
🧹 Nitpick comments (2)
doc/classes/ProjectSettings.xml (1)

3165-3169: Mobile renderer override change is significant; confirm engine default matches

Switching the documented mobile override from "mobile" to "gl_compatibility" meaningfully changes expectations for new mobile projects. Please double‑check that:

  • The core registration actually uses "gl_compatibility" as the default for rendering/renderer/rendering_method.mobile, and
  • This aligns with current mobile support policy (Vulkan/Mobile vs GL Compatibility) so docs and runtime behavior stay in sync.

If this value comes from regenerated doctool output, that likely already reflects the engine default, but it's worth explicitly confirming given the behavioral impact.

main/main.cpp (1)

3851-3854: Consider adding a comment to explain the conditional logic.

The conditional logic correctly ensures that in editor/project_manager mode, the clear color remains as the boot splash background color (editor theme color), while in game mode it uses the project's configured clear color. However, this behavior might not be immediately obvious to future maintainers.

🔎 Suggested documentation
+	// In editor/project_manager mode, keep the boot splash background color.
+	// In game mode, switch to the project's configured clear color.
 	if (!editor && !project_manager) {
 		RenderingServer::get_singleton()->set_default_clear_color(
 				GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
 	}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 685515a and 1c0ec7b.

📒 Files selected for processing (2)
  • doc/classes/ProjectSettings.xml
  • main/main.cpp
🧰 Additional context used
🧬 Code graph analysis (1)
main/main.cpp (1)
editor/settings/editor_settings.cpp (6)
  • get_singleton (1221-1223)
  • get_singleton (1221-1221)
  • get_setting_directly (1247-1287)
  • get_setting_directly (1247-1247)
  • get_default_base_color (1289-1291)
  • get_default_base_color (1289-1289)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: 🐧 Linux / Editor with ThreadSanitizer (target=editor, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
  • GitHub Check: 🐧 Linux / Minimal template (target=template_release, everything disabled)
  • GitHub Check: 🐧 Linux / Template w/ Mono, debug (target=template_debug)
  • GitHub Check: 🏁 Windows / Template (target=template_release)
  • GitHub Check: 🤖 Android / Template arm32 (target=template_release, arch=arm32)
  • GitHub Check: 🐧 Linux / Template w/ Mono, release (target=template_release)
  • GitHub Check: 🐧 Linux / Editor w/ Mono (target=editor)
  • GitHub Check: 🌐 Web / Template w/o threads (target=template_release, threads=no)
  • GitHub Check: 🍎 macOS / Template (target=template_release)
  • GitHub Check: 🌐 Web / Template w/ threads (target=template_release, threads=yes)
  • GitHub Check: 🤖 Android / Template arm64 (target=template_release, arch=arm64)
  • GitHub Check: 🏁 Windows / Template w/ GCC (target=template_release, use_mingw=yes)
  • GitHub Check: 🍏 iOS / Template (target=template_release)
  • GitHub Check: 🏁 Windows / Editor (target=editor)
  • GitHub Check: 🍎 macOS / Editor (target=editor)
🔇 Additional comments (4)
doc/classes/ProjectSettings.xml (1)

2802-2804: Updated default clear color doc looks consistent

The new default_clear_color value is documented correctly and the description still matches how projects override it. No further changes needed here.

main/main.cpp (3)

3169-3170: LGTM!

Correctly uses the centralized get_boot_splash_bg_color() function to set the early window clear color override during display server initialization.


3484-3485: LGTM!

Correctly uses get_boot_splash_bg_color() as the default value for the rendering/environment/defaults/default_clear_color setting. This ensures the default clear color matches the boot splash background color.


3824-3825: LGTM!

Both usages correctly centralize boot splash background color retrieval:

  • Line 3824: For custom boot logo rendering
  • Line 3837: For fallback default boot splash

The centralization improves maintainability and ensures consistent color handling.

Also applies to: 3837-3838

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI Agents
In @main/main.cpp:
- Line 3791: The GLOBAL_DEF for "application/boot_splash/bg_color" is defined
inside setup_boot_logo() but get_boot_splash_bg_color() (which uses GLOBAL_GET)
is called earlier in setup2(), causing an undefined/transparent color; move the
GLOBAL_DEF(PropertyInfo(...), Color(0.14,0.14,0.14)) into setup2() before the
first call to get_boot_splash_bg_color() (i.e., place it just before the
existing use in setup2()), and remove the duplicate GLOBAL_DEF from
setup_boot_logo() so the global is always defined before any GLOBAL_GET or
get_boot_splash_bg_color() invocation.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c0ec7b and f00bae1.

📒 Files selected for processing (3)
  • core/config/project_settings.cpp
  • doc/classes/ProjectSettings.xml
  • main/main.cpp
✅ Files skipped from review due to trivial changes (1)
  • core/config/project_settings.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • doc/classes/ProjectSettings.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: 🐧 Linux / Editor w/ Mono (target=editor)
  • GitHub Check: 🐧 Linux / Template w/ Mono, debug (target=template_debug)
  • GitHub Check: 🐧 Linux / Template w/ Mono, release (target=template_release)
  • GitHub Check: 🐧 Linux / Minimal template (target=template_release, everything disabled)
  • GitHub Check: 🍏 iOS / Template (target=template_release)
  • GitHub Check: 🏁 Windows / Template (target=template_release)
  • GitHub Check: 🏁 Windows / Editor (target=editor)
  • GitHub Check: 🍎 macOS / Editor (target=editor)
  • GitHub Check: 🐧 Linux / Editor with ThreadSanitizer (target=editor, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
  • GitHub Check: 🏁 Windows / Template w/ GCC (target=template_release, use_mingw=yes)
  • GitHub Check: 🍎 macOS / Template (target=template_release)
  • GitHub Check: 🌐 Web / Template w/o threads (target=template_release, threads=no)
  • GitHub Check: 🤖 Android / Template arm32 (target=template_release, arch=arm32)
  • GitHub Check: 🌐 Web / Template w/ threads (target=template_release, threads=yes)
  • GitHub Check: 🤖 Android / Template arm64 (target=template_release, arch=arm64)
🔇 Additional comments (1)
main/main.cpp (1)

3764-3775: Well-structured helper function.

The centralization of boot splash background color retrieval is clean and properly handles both editor and game contexts with appropriate fallbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants