Commit Graph

52 Commits

Author SHA1 Message Date
cd43ae6adc Fully disable AI in editor mode via SetActorTickEnabled
- Disable tick on both Pawn and AIController when not simulating
- Stops BT, perception, gaze, and all per-frame logic
- Simulate mode re-enables tick + RestartLogic on all spawned pawns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 14:38:25 +02:00
13da8293c1 Per-level catalogs, external scenarios dir, .pss extension, BP from mesh tool
- Add per-base-level Catalogs to FPS_Editor_BaseLevelEntry, merged with global
  catalogs when the base level is loaded
- Add SpawnManager::ClearCatalogs() and rebuild on LoadBaseLevelAsSublevel
- Move scenarios storage to C:/Asterion_VR/SCENARIOS/{LevelName}/ for easy
  transfer between client PCs; avoids name conflicts via level subdirectories
- Add GetSceneFilePathForLevel and refactor GetSavedSceneNames to scan subdirs
- Change scenario file extension from .json to .pss with .json legacy fallback
- Add content browser tool: right-click StaticMesh/SkeletalMesh → PS Editor
  section → Create Spawnable Blueprint (generates BP with mesh component,
  SpawnableComponent with pre-filled DisplayName, and EditableComponent)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 12:40:39 +02:00
82e76c01ff Additional sublevels, custom property options, BaseLevel highlight, lightmap fix
- Add AdditionalSublevels to FPS_Editor_BaseLevelEntry for always-loaded
  streaming levels that aren't auto-loaded when base level is a sublevel
- Add LoadBaseLevelAsSublevel overload with ExtraSublevels parameter
- Add GetCustomOptionsForProperty to IPS_Editor_EditableInterface for
  data-driven dropdowns (e.g. weapon lists from DataTables)
- Add custom options combo in property panel (interface-driven, no CachedEnum)
- Add BaseLevel selection highlight: selected card stays highlighted until
  validate or change
- Fix deferred lightmap refresh with 0.5s timer instead of NextTick
- Fix enum detection scope error in RebuildDynamicProperties

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 18:13:38 +02:00
1a2cc87160 Add ChildMovable interface, preload filter, IsInEditorMode, lightmap init
- Add IPS_Editor_ChildMovable interface for per-child editing of sub-elements
  (VR placement spots, etc.) with full gizmo, undo, and serialization support
- Add "Edit Children" button in toolbar when a ChildMovable actor is selected
- Add bPreload tag on SpawnableComponent for briefing/placement phase actors
- Add EPS_Editor_SceneLoadFilter enum (All, PreloadOnly, ExcludePreload) to
  LoadScene for selective loading of preload vs gameplay actors
- Add bPreload field to FPS_Editor_ActorData for JSON persistence
- Add static IsInEditorMode() getter on SceneLoader (BlueprintPure)
- Add Level::InitializeRenderingResources() call on sublevel load for lightmaps
- Update Pawn, PlayerController, UndoManager, SceneSerializer, SceneLoader,
  MainWidget to support ChildMovable alongside existing SplineEditable

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 18:02:17 +02:00
5859d3bf6a BaseLevel selection popup with thumbnail grid
- Add Thumbnail field to FPS_Editor_BaseLevelEntry (UTexture2D)
- Replace BaseLevel combo box with button that opens a selection popup
- Popup displays base levels in a 3-column grid with thumbnails (2:1 ratio)
- Validate/Cancel buttons to confirm or dismiss selection
- Gray placeholder shown for entries without thumbnail

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 08:42:03 +02:00
27ff2e8d8f temp for later 2026-04-14 20:40:06 +02:00
fb95d3b821 Simulate mode: AI start/stop, save lock, position restore
- Simulate button (orange) toggles AI on/off in editor
- StartSimulation: saves all actor transforms, RestartLogic on all BrainComponents
- StopSimulation: StopLogic on all BrainComponents, restores saved transforms
- Save blocked during simulation with help bar message
- AI auto-stopped per-pawn on spawn in editor (deferred next tick for AIController)
- SceneSerializer also stops AI on loaded pawns
- AIModule added to Build.cs dependencies

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:29:45 +02:00
16fdcb55da Debounced SplineNetwork rebuild on spline point changes
- ScheduleNetworkRebuild() called after AddPoint, RemovePoint, SetAllPointLocations
- 0.5s debounce timer avoids redundant rebuilds during rapid editing
- AI NPCs now detect and follow splines placed in the editor immediately

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:07:22 +02:00
1f11b79222 Auto-call OnRep on server after editor property change + ForceNetUpdate
- After ImportText, automatically call the property's RepNotifyFunc via reflection
- ForceNetUpdate ensures replication to clients (OnRep fires on both server and client)
- No BP changes needed — fully transparent for replicated properties

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 19:50:20 +02:00
6c39b5888f CustomDepth stencil 2 on spline meshes, SplineNetwork rebuild, PP occluded (disabled)
- Enable RenderCustomDepth + stencil value 2 on spline tube mesh
- Restore stencil 2 on deselect (selection sets stencil 1 for outline)
- Auto-generated M_PS_Editor_SplineOccluded PP material (stencil + depth compare)
- PP occluded effect disabled for now (depth comparison unreliable)
- AISpline triggers SplineNetwork::RebuildNetwork on BeginPlay (next tick)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 19:18:41 +02:00
24e50ab919 IPS_Editor_SplineEditable interface, spline visibility, snap-to-ground, Play without BaseLevel
Refactor spline system to use IPS_Editor_SplineEditable interface:
- New interface in Spline/PS_Editor_SplineEditable.h with all editing methods
- APS_Editor_SplineActor and APS_BehaviorEditor_AISpline both implement it
- All ~40 Cast<APS_Editor_SplineActor> replaced with Cast<IPS_Editor_SplineEditable>
- UndoManager SplinePointAction uses TWeakObjectPtr<AActor> + interface cast
- Any actor implementing the interface works with full editor spline editing

Spline visibility:
- SetVisualizationVisible() hides tube/handles/cube in gameplay (data stays for AI)
- SceneLoader calls it when stripping editor components
- SplineMatOccluded material added (unused for now, PP occlusion planned)

Other improvements:
- Snap spline CP to ground on placement (downward raytrace)
- Play button works without BaseLevel (uses current editor map)
- AISpline triggers SplineNetwork::RebuildNetwork on BeginPlay (next tick)
- PS_BehaviorEditor marked EnabledByDefault: false (only active in PROSERVE)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:05:53 +02:00
21e39ad3fa Add PS_BehaviorEditor bridge plugin with AI Spline actor
New plugin that bridges PS_Editor and PS_AI_Behavior:
- APS_BehaviorEditor_AISpline inherits from APS_AI_Behavior_SplinePath
  (detected by SplineNetwork, usable by BT tasks)
- Implements IPS_Editor_PointPlaceable (click-to-place flow)
- Full tube visualization + handles (adapted from PS_Editor_SplineActor)
- SpawnableComponent (catalogue category "AI") + EditableComponent
- Editable AI properties: SplineCategory, bBidirectional, SplineWalkSpeed, Priority
- Custom serialization for spline points + AI properties
- No modifications to PS_Editor or PS_AI_Behavior plugins

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 15:00:19 +02:00
c04bc2149b Loading screen overlay + camera fade on sublevel load
- Add loading overlay (black background + "Loading..." text) behind UI panels
- Overlay starts visible by default, hidden in NativeConstruct if no sublevel
- CameraFade to black before sublevel load, with deferred fallback for BeginPlay
- 2s delay after OnLevelShown before starting 2s fade-in from black
- ShowLoadingScreen helper on PlayerController via HUD->MainWidget

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 14:26:43 +02:00
5affbc7d0d IsLoadingFromScene via static flag, revert network replication on SpawnableComponent
- IsLoadingFromScene uses a simple static bool flag active during spawn loop
- Works server-side only (client relies on its own property replication)
- Removed replicated bLoadedFromScene/bPropertiesReady from SpawnableComponent
- Removed Multicast RPC and SetIsReplicatedByDefault (unnecessary complexity)
- SceneSerializer sets bIsCurrentlyLoading during load for consistent behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 13:36:12 +02:00
1d5d448bf1 Close button, OnPropertiesLoaded event, spawn raytrace, IsLoadingFromScene
- Add close button (X) in title bar with save confirmation overlay
- Add OnEditorClosed delegate on PlayerController (BP-bindable)
- Add OnPropertiesLoaded event to EditableInterface (fires after scene load)
- Add IsLoadingFromScene() helper for BP BeginPlay skip pattern
- ComputeSpawnLocation now raycasts to avoid spawning through floors
- Track dirty state for save confirmation on close
- Scene load uses PS_Editor_Loading tag via CustomPreSpawnInitalization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 09:26:41 +02:00
2b5015a9af Editor integration: editable interface, enum support, CameraStart, spawn options, crash fix
- Add IPS_Editor_EditableInterface with events: OnEditorPropertyChanged,
  OnEditorNeedsReinit, OnEditorNeedsRespawn, OnEditorModeChanged, OnEditorTick
- Add FPS_Editor_EditablePropertyEntry struct replacing separate property/display/respawn lists
  with unified Path + DisplayName + bNeedsReinit + bNeedsRespawn per entry
- Add enum property support in UI (SComboBox with display names)
- Add FVector2D property support in UI (X/Y fields)
- Add PS_Editor_CameraStart actor for initial camera position in base levels
- Add SpawnableComponent options: bAutoSnapToGround, bYawOnly, bUniformScaleOnly, GroundOffset
- Add bIsPlayMode to GameInstanceSubsystem for gameplay vs editor context
- Add PlayerController::Tick for editor tick dispatch to spawned actors
- Add SpawnManager::RespawnActorWithProperties, NotifyEditorModeChanged, TickEditorMode
- Fix recursive crash in ClearSelection/FinishPointPlacement loop
- Fix SScrollBox mouse wheel passthrough to camera
- Fix gizmo yaw-only: grey disabled arcs, block drag, preserve highlight
- Call OnEditorNeedsReinit after scene load (editor + gameplay) for property re-init

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:20:03 +02:00
83840d1626 Integration fixes: BaseLevelEntry with full map path, ECC_Camera traces, PP disable, thumbnails
- Replace TArray<FString> BaseLevels with TArray<FPS_Editor_BaseLevelEntry> (DisplayName + MapPath)
  so levels in subfolders (e.g. /Game/Maps/Warehouse) are found correctly
- Add BaseLevelPathMap lookup in MainWidget for Play, combo, and scene load
- Add optional MapPath parameter to LoadBaseLevelAsSublevel
- Switch all LineTrace channels from ECC_Visibility to ECC_Camera for better
  compatibility with characters that have Visibility disabled
- Add W key binding as alias for Z (translate mode) for AZERTY convenience
- Disable sublevel PostProcessVolume WeightedBlendables on load to avoid
  stencil conflicts with the plugin's selection outline
- Fix thumbnail generation: NeverStream + TEXTUREGROUP_UI + force alpha to 255

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:34:37 +02:00
7a8eb7f827 suppr external world partition 2026-04-12 18:43:15 +02:00
ea20f1c279 Force opaque UI backgrounds with WhiteBrush
Default SBorder brush is semi-transparent in PIE. Using explicit
WhiteBrush (solid 1x1 texture) ensures fully opaque panels everywhere.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:39:24 +02:00
bc33a8f64b Make UI panel backgrounds fully opaque (alpha 1.0)
Fixes inconsistency between PIE (transparent) and packaged (opaque).
All SBorder BackgroundColor alpha changed from 0.85 to 1.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:38:07 +02:00
a91aac1192 Fix Play button: unload sublevel + use full map path for OpenLevel
OpenLevel("test") was resolving to the streamed sublevel instance
(test_LevelInstance_5) instead of the actual map. Fix:
- Unload sublevel via LoadBaseLevelAsSublevel("None") before OpenLevel
- Use full path "/Game/{BaseLevel}" to avoid ambiguity

Also: all widget lambdas now get SpawnManager/SceneSerializer fresh from
PlayerController (critical fix for packaged builds where weak ptrs are null).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:35:52 +02:00
693cf143a3 Add Unreal/Build/ to gitignore and remove tracked build artifacts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:20:33 +02:00
7a008c7e60 Fix packaged build: weak ptr timing, factory module, hard refs, brace fix
Critical fixes for packaged builds:
- Widget weak ptrs (SpawnManager/SceneSerializer) are null in packaged due to
  HUD deferred init. All button lambdas now get references fresh from
  PlayerController via GetOwningPlayer() cast instead of cached weak ptrs.
- HUD BeginPlay deferred by one tick (SetTimerForNextTick) to ensure
  PlayerController has initialized SpawnManager before wiring.

Module split:
- Factories moved to separate PS_EditorTools module (Type: Editor)
  to fix UHT error with UFactory in packaging builds.
- PS_Editor module no longer depends on UnrealEd for factories.

Asset references:
- TSoftObjectPtr/TSoftClassPtr changed to TObjectPtr/TSubclassOf for
  MasterCatalog, SpawnCatalogs, and ActorClass entries. Hard references
  ensure assets are cooked in packaged builds.

Other fixes:
- GetActorLabel() replaced with GetClass()->GetName() (editor-only API)
- Missing brace in Browse dialog BaseLevel sync code
- BaseLevel sync only when scenario specifies a LevelName (no more clearing on empty)
- Save As dialog with native Windows file picker
- Debug info in catalog UI when empty (shows chain: Master→Catalogs→Entries)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:17:52 +02:00
aa4313057c Fix editor restore: init order, combo callback, scenario name
- SceneSerializer created before subsystem check (was nullptr crash)
- ComboBox OnSelectionChanged ignores ESelectInfo::Direct (programmatic)
  to prevent NativeConstruct from clearing the just-loaded scenario
- SaveNameField restored from LastEditedScenarioName on return
- Added ReturnToEditor/OpenEditor to GameInstanceSubsystem
- EditorMapName auto-saved on Play for return navigation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 16:23:32 +02:00
9c43fd523a Standalone editor: scenario workflow, BaseLevel combo, ReturnToEditor
Editor workflow:
- Removed auto-detection of BaseLevel (strip _Editor). Editor is standalone.
- User selects BaseLevel from ComboBox (populated from MasterCatalog.BaseLevels)
- "None" option for editing without a base level
- Selecting BaseLevel: clears current scenario, hides persistent level actors,
  loads sublevel. Selecting "None" restores persistent level actors.

UI terminology: Scene → Scenario (save field, buttons, notifications)

GameInstanceSubsystem:
- Renamed PendingSceneName → PendingScenarioName
- Added LastEditedScenarioName/LastEditedBaseLevel (persist after Consume)
- SetPendingScenario() stores in both Pending and LastEdited
- ReturnToEditor() restores Pending from LastEdited, opens editor map
- EditorMapName auto-saved on first Play, used by ReturnToEditor
- OpenEditor() / ReturnToEditor() callable from gameplay BP

Play button: resets input mode before OpenLevel (fixes cursor in FirstPerson GM)

Test assets: FirstPerson template for testing Play/ReturnToEditor flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 16:12:10 +02:00
472811b858 Add PROSERVE integration: sublevel loading, Play button, GameInstance subsystem
Architecture for single editor map workflow:
- MasterCatalog.BaseLevels lists available base levels
- BaseLevel selector in UI (cycle button) loads selected level as sublevel
- Sublevel provides visual context only — save/load only touches PS_Editor objects
- No auto-load at startup: user picks via UI or PROSERVE sets via subsystem

GameInstanceSubsystem (survives OpenLevel):
- PendingSceneName + PendingBaseLevel set by PROSERVE before opening editor
- Editor reads them at BeginPlay: loads sublevel + scene automatically
- ConsumePendingScene() for gameplay side to read and clear

Play button:
- Auto-saves current scene
- Stores scene name in GameInstanceSubsystem
- Opens the BaseLevel via OpenLevel

SceneLoader:
- bStripEditorComponents parameter (default true) removes Spawnable/Editable
  components after load for clean gameplay actors

SceneData v3: LevelName field associates scenes with base levels.
Scene list filtered by selected BaseLevel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:32:43 +02:00
aafcbbb7f9 Add BaseLevelNameOverride for dedicated editor maps
PlayerController gets a BaseLevelNameOverride property. When set (e.g. "Warehouse"),
scenes are tagged with that level name instead of the auto-detected map name.

Use case: editing on "Warehouse_Editor" map but scenes should be associated
with the "Warehouse" base level for PROSERVE runtime loading.

Save, load list, and scene filtering all respect this override.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 12:01:43 +02:00
4dc0f400b4 Add level-based scene organization and filtering
SceneData now includes LevelName field (auto-detected from current map on save).
Version bumped to 3. Backward compatible (empty LevelName for old files).

SceneLoader:
- GetSavedSceneNames(LevelFilter) filters by associated level
- GetSceneLevelName() reads level association without full parse
- GetSavedSceneNamesForCurrentLevel() convenience for game code

Editor UI:
- Scene list grouped: "This level" (highlighted) + "Other levels" (dimmed)
- Shows current level name above the list

PROSERVE integration pattern:
  // List scenarios for current level
  auto Scenes = UPS_Editor_SceneLoader::GetSavedSceneNamesForCurrentLevel(this);
  // Load a specific scenario
  UPS_Editor_SceneLoader::LoadScene(this, "Scenario_A", OutActors);

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:43:00 +02:00
77f2da027e Add standalone SceneLoader for game runtime initialization
UPS_Editor_SceneLoader is a BlueprintFunctionLibrary that loads PS_Editor
JSON scenes without any editor infrastructure (no PlayerController, Gizmo,
SelectionManager, or UI required).

Usage from any GameMode:
  TArray<AActor*> Actors;
  UPS_Editor_SceneLoader::LoadScene(this, "MyScene", Actors);

Handles: class loading (BP + C++), transforms, custom editable properties
via reflection (ImportText), and spline point data. All functions are
BlueprintCallable for BP GameMode usage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:32:09 +02:00
861c15c193 Unify spline creation/editing into single seamless mode
Major UX simplification:
- Removed SplineEditing mode — single SplinePlacement mode handles both
  creation and editing with identical behavior
- Actor spawned and tracked on first click (no "finish" step needed)
- Each point add/insert/move has individual undo
- Right-click always = camera fly (no special handling during creation)
- Escape/Done just exits edit mode, nothing to "finish"

Catalog system:
- MasterCatalog DataAsset groups multiple SpawnCatalogs (Tools, Characters, Props)
- PlayerController references one MasterCatalog instead of single catalog
- SpawnManager.AddCatalog() loads sub-catalogs incrementally
- Factory for MasterCatalog creation in Content Browser

Spline polish:
- SplineActor has built-in SpawnableComponent + EditableComponent
- SplineColor/SplineSelectedColor/SplineTag as UPROPERTY for BP variants
- All spline point operations use World coordinate space (fixes snap-to-ground)
- Snap-to-ground ignores gizmo actor (was hitting gizmo guide lines)
- Tube mesh collision forced with UpdateBounds after CreateMeshSection
- Tube insert and handle selection include active placement actor (not just selected)
- Notification bar shows contextual Delete Point button when CP selected

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 11:06:04 +02:00
ca4f7ee355 Refactor spline system with IPS_Editor_PointPlaceable interface
Architecture:
- New IPS_Editor_PointPlaceable interface for any actor using click-to-place-
  points placement. Decouples the placement system from SplineActor so future
  actors (patrol routes, area polygons) can reuse the same flow.
- SplineActor implements the interface. BP subclasses with SpawnableComponent
  appear in the catalog and automatically enter placement mode when spawned.
- PlayerController methods renamed: BeginPointPlacement/FinishPointPlacement/
  CancelPointPlacement (generic, interface-driven).

Features added:
- SplineColor, SplineSelectedColor, SplineTag as UPROPERTY for BP overrides
- UpdateSplineMaterials() for runtime color changes
- Tube visualization (8-segment cylinder) replacing cross-ribbon
- Spline editing mode with Edit/Done buttons in notification bar
- Delete spline point (Del key or Delete Point button, min 2 points)
- Insert point by clicking on tube mesh in edit mode
- Snap spline point to ground (End key)
- Append points to existing spline (S key or catalog when spline selected)
- Notification bar: contextual messages and buttons per mode
- Auto-generated M_PS_Editor_SplineLine material (unlit opaque, depth tested)
- Material swap: opaque when deselected, no-depth-test when selected
- Serialization of SplineColor/SplineTag in CustomProperties

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 09:44:26 +02:00
1f4b3994ff Add runtime spline creation and editing (WIP)
Spline placement: New Spline button (S key) enters placement mode where clicks
add control points. Right-click/Enter finishes, Escape cancels. Min 2 points.
Spline visualization as cross-shaped quad strip (vertical + horizontal ribbons).

Point editing: select spline to show handles, click a handle to position gizmo
on it, then use translate gizmo to move individual points. Undo supported via
full-state snapshots (SplinePointAction).

Visual feedback: auto-generated M_PS_Editor_SplineLine material (unlit opaque
with depth test) for normal state. Gizmo material (no depth test) for selected
state. Center cube at centroid for whole-spline selection. Handles highlight
on selection.

Serialization: spline points exported to CustomProperties (PointCount + Point_N).
C++ class fallback via FindObject for LoadScene. Spline appears in scene outliner.

Still WIP: depth material swap on selection, serialization edge cases, and
point editing polish to be refined.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:44:04 +02:00
50087e5dfb Add runtime property editing, scene outliner, and spawned-only selection
Property Editing:
- New EditableComponent with two-step dropdown (Select Component → Add Property)
  to declare which properties are exposed in the runtime editor
- Dynamic property panel below Transform: supports float, bool, string, FVector,
  FRotator, FLinearColor with per-tick refresh and keyboard focus guard
- PropertyAction undo/redo via ExportText/ImportText reflection
- Custom properties serialized to JSON (TMap in ActorData, version 2)
- Copy/paste/duplicate propagate custom property values

Scene Outliner:
- Scrollable list of spawned actors in the right panel
- Click to select, selected actor highlighted in blue
- Auto-refreshes when actors are added/removed

Selection Filter:
- Only actors spawned by the editor (catalogue, duplicate, paste, load)
  are selectable — static scene geometry is no longer clickable

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 21:15:07 +02:00
11945e90d2 Add duplicate (Ctrl+D) and copy/paste (Ctrl+C/V) with undo support
Duplicate clones selected actors with a small offset and selects the copies.
Copy stores actor class and relative transforms in an internal clipboard.
Paste spawns clipboard contents in front of the camera preserving relative positions.
All operations are tracked by SpawnManager and fully undoable/redoable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 13:08:13 +02:00
7ef566f3f3 Update test level and engine config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 12:51:13 +02:00
b33b7cf9d3 Revert rotation to simple perpendicular approach
The magnitude+sign approach caused confusing direction changes.
Back to perpendicular-only: only the mouse axis perpendicular to
the projected rotation axis drives rotation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 12:46:49 +02:00
76d2ccd249 Update project memory with Phase 2 gizmo details
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 12:46:02 +02:00
8dba2ab0fc Add World/Local space toggle, snap system, and gizmo polish
World/Local:
- Toggle button in toolbar (World/Local)
- Local mode: translate/rotate gizmo aligns with actor's local axes
- Rotation arcs dynamically follow local orientation during drag
- Scale always in local space
- RefreshGizmoOrientation after every drag completion

Snap System:
- Toggle button + configurable value field in toolbar
- Translation: snaps displacement along axis (no world-grid staircase)
- Rotation: snaps accumulated angle to nearest increment
- Scale: snaps scale values

Rotation improvements:
- Screen-space direction with magnitude-based speed (all mouse axes contribute)
- Fixed axis direction stored at drag start (prevents feedback loop)
- Smooth fallback when camera looks along rotation axis
- Keyboard shortcuts: Z/E/R (AZERTY convention)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 12:45:12 +02:00
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
88544c4c85 Update project memory and CLAUDE.md to reflect Phases 1-4 completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 22:31:08 +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