Add plugin system, Automations module, and the 3D Texturing plugin #31

Merged
parkerhdavis merged 14 commits from texturing-plugin into main 2026-05-29 22:55:51 -06:00
parkerhdavis commented 2026-05-29 22:55:42 -06:00 (Migrated from github.com)

Brings Packi's texture-tooling functionality into Garnet as its first plugin, and builds the general plugin plumbing it hooks into. The goal: a Garnet user has little reason to reach for standalone Packi.

Plugin system (compiled-in + registry)

First-party plugins compile into the single binary behind a real boundary: a frontend contribution registry where plugins self-register at startup, descriptive manifest.json mirrors in plugins/, and per-plugin enable/disable in AppSettings.enabled_plugins. The Plugins page is now a real manager. Dynamic loading (cdylib/sidecar) stays deferred — it only matters for an out-of-scope third-party story.

Workspace + Workflow model

A Workspace is a user-created entity with a type; a plugin contributes a Workflow — a specialized workspace-interior UI bound to a type. The base library type is a named, optionally-filtered view. A new workspaces table (migration v7) + commands back the sidebar list, New Workspace dialog (type picker), and a right-click → Settings dialog. Workflows can opt into a working folder + file filters (persisted on the workspace).

Automations module (base)

Garnet's version of Packi's Batch: a non-destructive pipeline (Convert / Resize / Rename) with a rayon-parallel runner, progress in the global footer, and reusable presets. Plugins extend the step palette through the same registry mechanism the built-in core plugin uses.

3D Texturing plugin

Ported from Packi and rendered as a workspace Workflow with a Packi-style sidebar (module list + INPUT browser + OUTPUT export dir):

  • Un/Pack — channel pack / unpack / swizzle + channel-packing presets
  • Adjust — normal-map ops (flip-green, height-to-normal, blend, normalize); general color adjust already lives in Garnet's editor
  • Size — texture info / VRAM budget / mip chain
  • Preview — 2D tiling + 3D PBR material, using Three's procedural RoomEnvironment (no bundled HDRIs); the 3D panel + three.js lazy-load so the entry bundle stays lean
  • Plus Flip Green / Normalize Automation steps

The working folder feeds the shared file UI: drop zones pre-target their picker to it, INPUT rows drag into any slot, and exports default to the OUTPUT directory.

Backend

New texturing/ module (channel pack, normal map, presets) and a base image_io.rs (EXR/TGA-capable, reusable); the editor's I/O now routes through it. exr + the tga image feature added.

Notes

  • The 3D Texturing plugin ships enabled by default (discoverable; one-line flip to opt-in).
  • Deferred: generic library-workspace furnishings (rule editors, asset membership), feeding scoped library assets into plugin tools, and a Rust crate shared with standalone Packi.

Quality: clippy -D warnings, Biome, tsc, and 114 Rust tests all pass.

Brings Packi's texture-tooling functionality into Garnet as its first plugin, and builds the general plugin plumbing it hooks into. The goal: a Garnet user has little reason to reach for standalone Packi. ## Plugin system (compiled-in + registry) First-party plugins compile into the single binary behind a real boundary: a frontend contribution registry where plugins self-register at startup, descriptive `manifest.json` mirrors in `plugins/`, and per-plugin enable/disable in `AppSettings.enabled_plugins`. The Plugins page is now a real manager. Dynamic loading (cdylib/sidecar) stays deferred — it only matters for an out-of-scope third-party story. ## Workspace + Workflow model A **Workspace** is a user-created entity with a `type`; a plugin contributes a **Workflow** — a specialized workspace-interior UI bound to a type. The base `library` type is a named, optionally-filtered view. A new `workspaces` table (migration v7) + commands back the sidebar list, New Workspace dialog (type picker), and a right-click → Settings dialog. Workflows can opt into a **working folder + file filters** (persisted on the workspace). ## Automations module (base) Garnet's version of Packi's Batch: a non-destructive pipeline (Convert / Resize / Rename) with a rayon-parallel runner, progress in the global footer, and reusable presets. Plugins extend the step palette through the same registry mechanism the built-in `core` plugin uses. ## 3D Texturing plugin Ported from Packi and rendered as a workspace Workflow with a Packi-style sidebar (module list + INPUT browser + OUTPUT export dir): - **Un/Pack** — channel pack / unpack / swizzle + channel-packing presets - **Adjust** — normal-map ops (flip-green, height-to-normal, blend, normalize); general color adjust already lives in Garnet's editor - **Size** — texture info / VRAM budget / mip chain - **Preview** — 2D tiling + 3D PBR material, using Three's procedural `RoomEnvironment` (no bundled HDRIs); the 3D panel + three.js lazy-load so the entry bundle stays lean - Plus **Flip Green / Normalize** Automation steps The working folder feeds the shared file UI: drop zones pre-target their picker to it, INPUT rows drag into any slot, and exports default to the OUTPUT directory. ## Backend New `texturing/` module (channel pack, normal map, presets) and a base `image_io.rs` (EXR/TGA-capable, reusable); the editor's I/O now routes through it. `exr` + the `tga` image feature added. ## Notes - The 3D Texturing plugin ships enabled by default (discoverable; one-line flip to opt-in). - Deferred: generic library-workspace furnishings (rule editors, asset membership), feeding scoped library assets into plugin tools, and a Rust crate shared with standalone Packi. Quality: clippy `-D warnings`, Biome, `tsc`, and 114 Rust tests all pass.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
parker/garnet!31
No description provided.