Commit Graph

12 Commits

Author SHA1 Message Date
48505bfb82 Add rotation arc rings, scale cubes, and gizmo improvements
Rotation gizmo:
- Quarter-arc rings via UProceduralMeshComponent (3D solid with depth)
- Dynamic arc facing: arcs flip to face camera based on octant
- Grey guide lines from center to arc endpoints
- Screen-space rotation direction (correct from any camera angle)

Scale gizmo:
- Arrow shafts + cube tips for per-axis scale
- Center cube (grey) for uniform XYZ scale
- Local space orientation (gizmo aligns with actor rotation)

Other:
- Runtime confirmation dialog (replaces FMessageDialog)
- ProceduralMeshComponent plugin dependency added

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 11:47:03 +02:00
03c79a2610 Add auto-generated selection outline post-process and gizmo polish
Selection Outline:
- Post-process material auto-generated in C++ (no manual UE editor work)
- 8-neighbor edge detection on CustomStencil buffer
- Dynamic pixel-accurate offsets via SceneTexture InvSize (any resolution/ratio)
- Lerp blending (no overexposure), color AF1500, 1px thickness
- BL_SceneColorAfterDOF placement (before TAA, matches stencil resolution)
- Deferred creation via OnPostEngineInit (no startup crash)
- Material saved as persistent .uasset, loaded at runtime

Gizmo Polish:
- Arrow shaft thickness halved (0.03), cone tips halved (0.075x0.1)
- Gizmo stays at initial position during rotation/scale (no jitter)
- Gizmo follows selection during translation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:36:53 +02:00
5be3a777f9 Add selection outline post-process setup (material pending)
- PostProcessComponent on Pawn (unbound, applies to entire scene)
- Auto-loads M_PS_Editor_SelectionOutline material at BeginPlay
- Removed debug bounding box from Tick
- Custom depth stencil already toggled on selected actors
- Material needs to be created in UE editor (edge detection on CustomStencil)
- Instructions: use TexCoord + Constant2Vector offsets for 4-neighbor sampling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 21:28:24 +02:00
36b04bee61 Add Phase 4: JSON scene save/load system
Serialization:
- SceneData USTRUCT with Version, SceneName, Timestamp, Actors array
- ActorData: ClassPath, Location, Rotation, Scale per spawned actor
- SceneSerializer: SaveScene/LoadScene/ClearScene/GetSavedSceneNames
- Files stored in Saved/PS_Editor/Scenes/{name}.json
- Uses FJsonObjectConverter for clean USTRUCT-to-JSON conversion

SpawnManager:
- Tracks all spawned actors in SpawnedActors array
- SpawnActorDirect: spawn from class/transform (used by scene loading)
- DestroyAllSpawnedActors: clean scene clear

UI:
- Save field + button in toolbar area
- New Scene button to clear all spawned actors
- Saved scenes list with click-to-load
- Auto-refreshes scene list after save
- Clears selection on load/new

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 20:31:15 +02:00
9f1604f57c Add Phase 3: object spawn system with catalogue UI
Spawn System:
- SpawnableComponent: marker component for Blueprint actors (name, category, thumbnail)
- SpawnCatalog DataAsset: lists all spawnable Blueprints with Factory for easy creation
- SpawnManager: loads catalog, spawns actors in front of camera, ensures Movable mobility
- Reads metadata from Blueprint component templates (no temp spawn needed)

Catalogue UI:
- Left panel with scrollable list grouped by category
- Thumbnail cards (80x80) with name below, click to spawn
- "Capture All Thumbnails" button on DataAsset: auto-generates from UE thumbnails

Undo/Redo improvements:
- SpawnAction: undo hides spawned actor, redo shows it
- Delete confirmation dialog (Yes/No) before soft-delete
- Undo/redo auto-deselects hidden actors and refreshes gizmo
- Proper cleanup of hidden actors when actions pruned from stack

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 20:17:57 +02:00
ccb154c44f Add undo/redo system, properties panel, and toolbar UI
Undo/Redo:
- Custom runtime UndoManager (UE transaction system is editor-only)
- Ctrl+Z / Ctrl+Y hotkeys, action stack with 50 history limit
- Records: gizmo translate/rotate/scale, snap to ground, UI edits
- Soft-delete on Delete key (hide actor, undo restores it)
- Gizmo follows restored position on undo/redo

UI:
- Properties panel (right side): editable Location/Rotation/Scale fields
- Real-time updates during gizmo drag, manual input with Enter to apply
- Toolbar: Translate(E)/Rotate(R)/Scale(T) buttons + Snap Ground
- Mode indicator in title bar, updated help text with all shortcuts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 19:11:40 +02:00
20017ff3fd Add snap to ground, screen-space rotate/scale, and input refinements
- End key snaps selected actors to ground (downward trace + bounds offset)
- Rotate/Scale now use screen-space mouse delta (X+Y combined) for intuitive control
- Accumulator-based drag for smooth incremental rotation and scaling
- Fixed rotation drag plane (perpendicular to axis instead of parallel)
- Movement: arrows + A (up) / Q (down), letter keys freed for hotkeys

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 18:49:04 +02:00
30c0078a1d Add rotate/scale gizmo modes, hotkeys, and delete
- E/R/T hotkeys to switch Translate/Rotate/Scale modes
- Rotate: drag gizmo axis to rotate selection around that axis
- Scale: drag gizmo axis to scale selection on that axis
- Delete key to destroy selected actors
- Movement keys: arrows only + A (up) / Q (down)
- Removed ZQSD movement to free letter keys for hotkeys

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:47:20 +02:00
7884d1de59 Add gizmo drag interaction and hover highlighting
- Click+drag on gizmo arrows to translate selected actors along axis
- Drag plane computation based on axis direction and camera orientation
- Axis-constrained movement with initial transform preservation
- Hover highlighting: gizmo arrows turn yellow on mouse-over
- Sphere sweep for easier gizmo clicking (generous hit radius)
- UE editor-style gizmo colors (dark red/green/blue)
- Fixed gizmo visibility toggle (component-level instead of actor-level)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:31:40 +02:00
8b2609669f Add Phase 2 selection system and translate gizmo
- Click-to-select with raycast (Movable actors only)
- Ctrl+click for multi-select, click empty to deselect
- Click vs drag detection (pixel threshold) to avoid accidental selection
- SelectionManager owned by PlayerController with OnSelectionChanged delegate
- Custom depth stencil toggling on selected actors
- Debug bounding box visualization for selection
- Custom translate gizmo actor with colored arrows (R/G/B) and cone tips
- Gizmo renders on top of scene (SDPG_Foreground + Translucent depth test disabled)
- Constant screen-size gizmo scaling based on camera distance
- Unlit gizmo material with Color vector parameter (M_PS_Editor_Gizmo)
- r.CustomDepth=3 enabled for future outline post-process

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:06:11 +02:00
cf1e2f8ccf Add .gitignore for plugin build artifacts and remove tracked binaries
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:34:42 +02:00
b089a20512 Add PS_Editor plugin Phase 1: GameMode + Camera navigation
Runtime editor plugin with UE viewport-style camera controls:
- ZQSD/Arrows movement (always active), E/A for up/down
- LMB: pan (horizontal move + yaw), RMB: free fly look
- Alt+LMB / MMB: orbit around focal point, scroll: zoom
- HUD with controls help, cursor auto-hide during camera ops

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:33:55 +02:00