Path3d cherrypick#1302
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughPath3D 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. ChangesPath3D collider snapping
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
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
editor/scene/3d/path_3d_editor_plugin.cppeditor/scene/3d/path_3d_editor_plugin.heditor/settings/editor_settings.cpp
…ss frames on unused feature

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