Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The format is based on Keep a Changelog, and this project follows semantic versi
- **History thumbnails skip GPU readback** when the History section is hidden, and new rows append instead of rebuilding the list.

### Changed
- **Dock services are split by responsibility** ([#22](https://github.com/saworbit/hammerforge/issues/22)): file-dialog and import/export callbacks live in `dock_file_handler.gd`, visgroup/group/cordon workflows live in `dock_visgroup_handler.gd`, and settings plus `LevelRoot` signal wiring live in `dock_connections.gd`. `dock.gd` retains thin compatibility delegates.
- **Exported levels skip editor-only subsystem initialization** ([#21](https://github.com/saworbit/hammerforge/issues/21)): export templates keep the brush, entity, bake, paint, and file core needed to load and run levels, but do not load or construct grid, drag, snap, selection, preview, prefab-authoring, validation, spawn-authoring, displacement, bevel, undo, or other editor services. Editor builds and headless editor tests retain the complete tool graph.
- **Atlas gutter fill uses `blit_rect` / `fill_rect`** instead of a per-texel `get_pixel` / `set_pixel` loop: 4 * GUTTER + 4 native calls per tile rather than one call per gutter texel. Measured 11x faster on a 128px tile, which matters now that each PBR slot builds its own atlas.
- **Face paint composites are memoised** ([#39](https://github.com/saworbit/hammerforge/issues/39)): `FaceData.get_painted_albedo()` caches its result against a key covering `max_size`, layer count, each layer's texture identity/size, blend mode, opacity, and a content hash of its weight image. `rebuild_preview()` runs from 27 call sites — including once per surface-paint sample — and previously recomposited every painted face of the brush each time. Measured on Godot 4.7 at 256x256: 61.7 ms cold, 0.077 ms on a cache hit. Call `invalidate_painted_albedo()` after mutating paint layers through any path the key does not cover.
Expand Down
3 changes: 3 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ addons/hammerforge/
dock_entity_handler.gd Objects-tab property/create/I/O handlers
dock_manage_handler.gd Test-tab bake/play/spawn/validation handlers
dock_paint_handler.gd Paint-tab layer/heightmap/scatter/sculpt handlers
dock_visgroup_handler.gd Manage-tab visgroup/group/cordon handlers
dock_file_handler.gd File-dialog and import/export handlers
dock_connections.gd Settings and LevelRoot signal wiring
shortcut_hud.gd Context-sensitive shortcut overlay (dynamic per mode) + persistent grid size indicator with flash-on-change
brush_instance.gd DraftBrush node
baker.gd CSG -> mesh bake pipeline (per-face materials, atlas integration, snapshot-based non-blocking face bakes, convex collision shapes)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ HammerForge uses a **coordinator + subsystems** pattern:

```
plugin.gd EditorPlugin — input routing, toolbar, viewport overlay
├─ dock.gd Four-tab UI coordinator with focused handler modules
└─ level_root.gd Thin coordinator — owns containers, exports, signals
├─ HFBrushSystem Brush CRUD, hollow, clip, tie, move, UV justify, caching
├─ HFDragSystem Two-stage draw lifecycle + preview management
Expand Down
6 changes: 3 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ channel swizzling — the one operation with no native `Image` equivalent.
The May 2026 simplification phase 1 landed shared utilities and migrated low-risk call sites. The following items continue that initiative but each requires a dedicated session with interactive UI/bake validation, or a profiling pass, before landing safely.

### Continued dock.gd decomposition
The current 6,051-line file is still dominated by `_on_*` signal handlers wired to dock-internal state.
- Split into per-tab handler files: `dock_brush_handler.gd` (done), `dock_paint_handler.gd` (done), `dock_entity_handler.gd` (done), `dock_manage_handler.gd` (Test-tab bake/play done). Target dock.gd shell at ~1,500 lines. File I/O, visgroups, and cordon still live on dock.gd.
- Extract signal-wiring into `dock_connections.gd`.
The current 5,475-line file is still dominated by `_on_*` signal handlers wired to dock-internal state.
- Split into per-tab handler files: `dock_brush_handler.gd` (done), `dock_paint_handler.gd` (done), `dock_entity_handler.gd` (done), `dock_manage_handler.gd` (Test-tab bake/play done), and `dock_visgroup_handler.gd` (visgroups, grouping, and cordon done). Target dock.gd shell at ~1,500 lines.
- File dialogs and import/export callbacks delegate to `dock_file_handler.gd`; settings and `LevelRoot` signal lifecycle delegate to `dock_connections.gd`.
- Consolidate the entity-properties UI builder and the external-tool-settings UI builder (both schema-driven; share ~100 lines of dispatch logic).
- Migrate `paint_tab_builder.gd` (50 call sites) and `manage_tab_builder.gd` (58 call sites) from `dock._make_*` to direct `HFUIFactory` calls. Mechanical churn — wait until shared with another tab-builder change.

Expand Down
Loading