Skip to content

Cherry-pick: Expose Viewport::is_camera_3d_override_enabled method to GDScript - #1456

Open
JoltedJon wants to merge 1 commit into
Redot-Engine:masterfrom
JoltedJon:cherry-2
Open

JoltedJon wants to merge 1 commit into
Redot-Engine:masterfrom
JoltedJon:cherry-2

Conversation

@JoltedJon

@JoltedJon JoltedJon commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Brings in godotengine/godot#105046

Summary by CodeRabbit

  • New Features
    • Added Viewport.is_camera_3d_override_enabled() to check whether camera override mode is active in the Game tab.

@JoltedJon
JoltedJon requested review from a team October 1, 2026 17:11
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Redot-Engine/redot-engine/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b6174a2f-c796-4eca-a132-21d490c14d9c

📥 Commits

Reviewing files that changed from the base of the PR and between 80d31f7 and 38bb614.

📒 Files selected for processing (2)
  • doc/classes/Viewport.xml
  • scene/main/viewport.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

The Viewport API adds the documented is_camera_3d_override_enabled() method and registers it as script-callable.

Changes

Viewport camera override query

Layer / File(s) Summary
Document and bind the query
doc/classes/Viewport.xml, scene/main/viewport.cpp
The documentation describes the boolean method. Viewport registers the method binding.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: arctis-fireblight, decryptedchaos

Merge Risk: ⚪ Minimal · up to 38bb6

This change adds the documented Viewport query without introducing an identified merge-blocking risk.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 38bb6

The new script API reports an existing boolean state without granting camera-control authority. No introduced or worsened security risk was identified in this API change.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The added exposure is limited to scripts learning whether camera override is enabled on an accessible Viewport instance. This method does not provide camera mutation authority.

Trust Boundaries and Controls

  • observed — The existing debugger message handlers invoke camera-override enablement and setters. The new Viewport registration exposes only the getter; the inspected bindings do not register the override mutators.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: exposing Viewport::is_camera_3d_override_enabled to GDScript.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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