Skip to content

Path3d cherrypick#1302

Open
Tekkitslime wants to merge 3 commits into
Redot-Engine:masterfrom
Tekkitslime:path3d_cherrypick
Open

Path3d cherrypick#1302
Tekkitslime wants to merge 3 commits into
Redot-Engine:masterfrom
Tekkitslime:path3d_cherrypick

Conversation

@Tekkitslime

@Tekkitslime Tekkitslime commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

cherry pick commits godotengine/godot@3cfcedd (make changing path3d editor plugin gizmo tilt disk size not require engine restart) and godotengine/godot@365f8fd (add option to snap path3d editor plugin path handles to colliders in the scene).

it works on my machine :)

Summary by CodeRabbit

  • New Features
    • Added a “Snap to Colliders” option for Path3D editing.
    • When enabled, placing points and dragging handles will snap to 3D collision surfaces.
  • Improvements
    • Path3D gizmo snapping interaction is now applied during the physics update for more accurate alignment.
    • Snap-related physics processing runs only while the plugin is visible.
  • Settings
    • Updated the Path3D tilt disk size setting so changes take effect without restarting the editor.

cherry picked commits 3cfcedd6d57e171b54a342842bf807479b0c903e (make changing disk size for path3d editor plugin tilt gizmo not require engine restart) and 365f8fd038ec47b8f22f4960e13c11264be0b515 (add option to snap handles to colliders in path3d editor plugin) from Godot.
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: de84cee2-f096-40f2-b3b3-791e285df04f

📥 Commits

Reviewing files that changed from the base of the PR and between 525cc84 and 18e80fb.

📒 Files selected for processing (1)
  • editor/scene/3d/path_3d_editor_plugin.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • editor/scene/3d/path_3d_editor_plugin.cpp

Walkthrough

Path3D editing adds optional collider snapping for point placement and primary-handle dragging through deferred physics-frame raycasts. Gizmo disk sizing now reads editor settings directly, and a menu checkbox controls snapping.

Changes

Path3D collider snapping

Layer / File(s) Summary
Editor state and gizmo contracts
editor/scene/3d/path_3d_editor_plugin.h
Adds collider-snap state and physics interaction data while removing gizmo disk-size constructor parameters and storage.
Deferred collider snapping
editor/scene/3d/path_3d_editor_plugin.cpp
Defers point placement and primary-handle movement, performs collider raycasts during physics processing, applies plane fallbacks, and commits point additions.
Gizmo sizing and snap controls
editor/scene/3d/path_3d_editor_plugin.cpp, editor/settings/editor_settings.cpp
Reads tilt disk size from editor settings, adds the “Snap to Colliders” menu option, updates gizmo construction, and removes the restart requirement for the disk-size setting.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Editor as Path3DEditorPlugin
  participant Physics as PhysicsDirectSpaceState3D
  participant Gizmo as Path3DGizmo
  participant History as UndoRedo
  Editor->>Editor: Store click or handle ray state
  Editor->>Physics: intersect_ray on physics frame
  Physics-->>Editor: Collider hit or plane fallback
  Editor->>Gizmo: Apply snapped handle position
  Editor->>History: Commit snapped point addition
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too generic and does not describe the actual Path3D editor changes. Use a concise, specific title such as "Add collider snapping and adjustable Path3D tilt gizmo size".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@editor/scene/3d/path_3d_editor_plugin.cpp`:
- Around line 703-713: Update the deferred snap/edit flow around make_visible,
the waiting flags, and the processing paths near the ray setup and commit logic
to clear pending state whenever the plugin is hidden or the active Path3D
changes. Capture the target Path3D, curve, camera, and matching _edit.gizmo when
deferring the edit, then validate they remain valid and unchanged before
committing; otherwise cancel the deferred operation without dereferencing null
or stale objects.
- Around line 125-133: Update the deferred movement branch in the path gizmo
handling code to apply only when collider snapping is enabled, matching the
existing point-placement behavior near the collider-snap check. When snapping is
disabled, continue primary-handle movement immediately instead of setting the
physics wait state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d7c8713e-e891-4695-a043-7e2284ed20b6

📥 Commits

Reviewing files that changed from the base of the PR and between 58d31dd and 525cc84.

📒 Files selected for processing (3)
  • editor/scene/3d/path_3d_editor_plugin.cpp
  • editor/scene/3d/path_3d_editor_plugin.h
  • editor/settings/editor_settings.cpp

Comment thread editor/scene/3d/path_3d_editor_plugin.cpp Outdated
Comment thread editor/scene/3d/path_3d_editor_plugin.cpp
@JoltedJon

Copy link
Copy Markdown
Contributor
image

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.

4 participants