Commit Graph
31 Commits
Author SHA1 Message Date
dotCooCoo 7f52b87b85 UI: use the shared craft-libs crates for dialogs, shortcuts and quit
Bumps craft-ui and craft-window to craft-libs 1b34eba4 and replaces the
app's own dialog, shortcut and quit code with the shared crates.

File dialogs go through craft-dialogs and no longer stop the frame. An
action that needs a path asks for it and continues when the dialog
answers. An answer that acts on the project does nothing, with a toast,
when another project was opened meanwhile. The browser build keeps its
pickers and the startup and crash message boxes stay blocking.

Shortcuts run through craft-keymap's dispatcher, in the main window and
in floating panels. Saved shortcuts keep their stored form, and the
Keyboard shortcuts window and the shortcut labels do not change. A
shortcut on a symbol that needs Shift is recorded without Shift, and
saved shortcuts in the old form still run. A shortcut now runs only on
its exact chord: an extra Shift or Alt no longer runs a plain-key
shortcut.

A window close quits through craft-quit, and the close check runs in
logic, so closing a minimized window with unsaved changes restores it and
asks. A close during a stroke finishes the stroke and asks. The macOS app
menu comes from craft-menu. The unsaved-changes prompt goes on once its
Save dialog has saved the project, and stays open after Cancel or a failed
save.

The window frame guard on Windows and the title bar's buttons stay in the
app, since craft-libs has no code for them.
2026-11-08 22:07:12 -08:00
dotCooCoo c8ed91f6b3 Updates: Help > Check for Updates and a check at start
TextureCraft is updated only through the launcher, so a copy downloaded
directly is never told about a new version. The desktop app now checks
GitHub releases at start and from Help > Check for Updates, through
craft-update at craft-libs 1b34eba4. A run with --control skips the check
at start. A ready update installs when the app closes, and it waits for
unsaved changes, a stroke, a bake or a resize. The update prompt and the
modal result window hold the keyboard, so shortcuts do not act on the
project behind them. The web build is unchanged.
2026-11-08 20:32:44 -08:00
Dylan M. Taylor 347bda840d Release TextureCraft 0.3.1 2026-11-04 12:34:09 -05:00
RebornimandClaude Opus 5.5 bced280aa1 Bake: curvature from short rays around each texel, on the GPU when there is one
Replace the per-vertex mesh curvature with short ray rings around each
texel, so triangle size no longer decides the result: walls beside the
point (concave), hard edges (convex), the spread of the smooth normals and
true curvature where shading and faces agree. A high poly uses a small
true-curvature radius, and with match by mesh name a part only reads
itself. Rays go through RayScene::closest in bounded chunks, so they run
on the GPU tracer when there is one. Ray is laid out as the shader reads
it and uploads without a copy. Output stays 0..1 with 0.5 flat;
curvatureStrength and curvature_from_normal keep their meaning.
Clean-room implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 07:02:23 +00:00
Brandon ThomasandClaude Opus 5.5 85475143fa Release 0.3.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 19:25:19 -05:00
BFlat 19da5379d7 Merge pull request #131 from storytold/feat/cross-app-materials
MaterialCraft materials: .mcmat fills with live graph inputs
2026-11-02 14:36:20 +07:00
bflatastic 6c4b549669 Say why when the app cannot start or has to close
A Windows release build has no console, so when the GPU could not be
set up or the app panicked, the window never showed or vanished without
a word. Such errors now also go to errors.log beside the settings and,
on the main thread, to a message box that names the log file.

Fixes #106.
2026-11-02 13:52:12 +07:00
bflatasticandClaude Opus 5.5 2bf551f2a2 Merge origin/main into feat/cross-app-materials
Keeps both sides of the translation tables, AGENTS rules and the formats module list;
material files in the browser load before the ask-to-save step (they add a layer, not a
new project); Arabic for the eight MaterialCraft strings; menu parity regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:45:27 +07:00
bflatasticandClaude Opus 5.5 c092e7766b MaterialCraft materials: .mcmat fills with live graph inputs
- core: Fill::link (MaterialLink: package resource, graph, exposed inputs, presets,
  image inputs, size); BakedMap::interop_id / for_input shared mesh-map identifiers
- formats: own .mcmat reader (no MaterialCraft dependency) and 16-bit mesh-map PNGs
- engine: material.load takes .mcmat and .mcraft; material.link.set / .preset / .cook /
  .saveSource; LinkJob re-cooks through materialcraft-cli at the texture set's
  resolution with baked mesh maps as graph inputs; fresh resource names per cook keep
  undo and the decoded-image cache consistent; packages count as used resources
- ui: linked-material section in fill properties (presets, sliders, colors, toggles,
  options) cooking on a worker thread, one process per layer, stale results redone;
  Open in MaterialCraft; File > Import material...; .mcmat drops; library shelf lists
  .mcmat and rescans on focus; 8 new strings in every language
- tests: materialcraft_link (import, params, undo, duplicates, mesh maps, save, and a
  real materialcraft-cli round trip when MATERIALCRAFT_CLI is set)
- docs: README, features, control protocol, architecture, AGENTS, ROADMAP, parity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:12:00 +07:00
Agapenordev 9328250c6a Merge remote-tracking branch 'origin/main' into fix/import-gpu-oom
# Conflicts:
#	crates/ui-egui/src/i18n/ar.rs
#	crates/ui-egui/src/i18n/de.rs
#	crates/ui-egui/src/i18n/es.rs
#	crates/ui-egui/src/i18n/fr.rs
#	crates/ui-egui/src/i18n/it.rs
#	crates/ui-egui/src/i18n/ja.rs
#	crates/ui-egui/src/i18n/ko.rs
#	crates/ui-egui/src/i18n/pt_br.rs
#	crates/ui-egui/src/i18n/zh_hans.rs
2026-11-01 23:10:43 +01:00
Agapenordev b0cd961e90 Merge remote-tracking branch 'origin/main' into fix/import-gpu-oom 2026-11-01 22:23:11 +01:00
AgapenordevandClaude Opus 5.5 3591e02758 Address review: WebGPU verdicts, repaints, lasting memory notice
- Allocation checks never take an unanswered error scope as success:
  native backends block on the verdict; the browser's WebGPU answers
  later, so the full-size texture waits beside the bound placeholder
  (tiles go into it under discarded scopes) and Renderer::prepare
  installs it on success, or keeps the placeholder and reports the set
  on failure. The UI keeps drawing frames while a verdict is pending.
- The GPU side wakes the UI when it records an uncaptured error or an
  allocation failure, so the notice shows even when the app is idle;
  failures are collected after prepare, where late verdicts land.
- Sets the GPU could not hold share one sticky notice (dismissible,
  listing them) instead of a six-second toast each, since they are not
  retried.
- The out-of-memory error is reported as the cause rather than the
  follow-on invalid-texture error.
- The notice no longer uses "▸", which the UI fonts lack (egui panics
  on a missing glyph).

Tests: a late texture stays unbound until accepted; a late rejection
keeps the placeholder and is reported once; a verdict that never comes
counts as a failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 22:12:12 +01:00
bflatastic 0c9627573e Merge remote-tracking branch 'origin/main' into tools/text-alpha 2026-11-02 04:07:38 +07:00
bflatastic 7fdd9be0a3 Text: draw text in any installed font as a brush alpha or a decal
resource.text draws one or more lines of text, shaped with harfrust (kerning,
ligatures, joined scripts) from the font's outlines (skrifa) and filled by a
non-zero scanline rasterizer, cropped to the ink, as an image resource: white
for the brush alpha, or a color for a decal. text.fonts lists the installed
families and styles, read from each font file's name table only (246 families in
80 ms here); Ubuntu Light and Hack from the UI's built-in fonts are always there
and are the fallback in the browser.

- Properties > Alpha > Text: the text, a font and style, Use as brush alpha and
  Place as decal (in the tool's base color).
- Image alphas keep their proportions (their longer side spans the stamp), so a
  line of text stays a line; image thumbnails are letterboxed and show alpha.
- harfrust 0.12 and skrifa 0.44 are the versions egui already builds, so the
  lockfile gains no packages.

Fixes #40
2026-11-02 04:07:37 +07:00
bflatastic 7e2b12442b Merge remote-tracking branch 'origin/main' into deps/zip-9 2026-11-02 03:29:23 +07:00
bflatastic 8ffc94e286 zip 9: entry names are fallible; pin 9.0.5
zip 9 decodes entry names on demand, so ZipArchive::file_names and ZipFile::name
return a Result. Package lookups (FBX, usdz) skip names that do not decode, and a
project entry with a bad name is a malformed project. The usdz test reads
data_start as an Option. The lockfile pins 9.0.5 rather than the two-day-old 9.2.0.
2026-11-02 03:12:29 +07:00
AgapenordevandClaude Opus 5.5 098602ec49 Never crash importing meshes with many materials
Every texture set (one per mesh material) allocated full-size display
textures (base color, emissive, ORM, normal, height, aux, with mips) as
soon as it was created: ~130 MB of GPU memory per set at the default
2048 import size. A 16-material OBJ ran a 4 GB laptop GPU out of memory
and wgpu's default error handler panicked, closing the app.

- Display and aux textures start as 1×1 neutral placeholders and get
  their full size with the first non-neutral tile (or aux image), so an
  import costs no GPU memory until its sets are painted.
- That allocation runs in an error scope: on failure the texture keeps
  its placeholder (no retry per tile), the failure is logged and the UI
  shows a toast naming the texture set and the Viewport ▸ Texture
  resolution setting. Painting and export are unaffected.
- The app installs an uncaptured-error handler that logs and reports
  wgpu errors as toasts instead of panicking.
- The GPU path tracer takes each set's size from its largest texture,
  since any kind (base color included) may now be a placeholder.

Tests: 40 sets of 2048 allocate nothing until painted, one painted kind
allocates alone, the aux texture allocates on its first upload, painted
placeholders render, and the GPU tracer matches the CPU with a default
base color beside varying roughness (fails with the old size logic).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 21:05:50 +01:00
bflatastic ecec51d616 Merge remote-tracking branch 'origin/main' into deps/zip-9 2026-11-02 03:01:47 +07:00
AgapenordevandClaude Opus 5.5 5a065c1e15 Control channel: harden the token file and the app's control server
The desktop app wrote its control token to <temp>/texturecraft-control-<port>.token with
default permissions (world-readable in a shared /tmp), from a hash-based generator, and
compared it non-constant-time with no connection limit. Any local user could read the token
and drive the app, whose command.run takes host paths.

- Token files are created new (remove, then O_EXCL) with mode 0600, so a planted file or
  symlink can neither keep its permissions nor redirect the write; one that cannot be
  replaced disables the server with a hint to set TEXTURECRAFT_CONTROL_TOKEN.
- Clients only read a token file that is a regular file owned by them with no group or
  other permissions, opened without following symlinks or blocking on a FIFO.
- The app's control server uses the shared security module: OS-random 256-bit token,
  constant-time compare, validated and trimmed env token, bounded lines and at most 16
  connections.
- Connections must authenticate within 10 s (AuthDeadline) and get one attempt.
- The app and `serve --port` bind before writing the token file, so a server whose port is
  busy no longer replaces the running server's token.

Regression tests cover owner-only files over an existing open file, symlink and FIFO
handling, the auth deadline, the connection limit and the app's token checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:16:37 +01:00
bflatastic b00372e0e5 Version 0.2.0 2026-11-02 00:17:41 +07:00
BFlat c44f8b8508 Merge pull request #30 from storytold/ui/inter-and-even-gaps
Inter, even gaps and readable selections
2026-11-01 20:40:48 +07:00
bflatastic bdac5a22d2 Custom title bar: app icon, menus and window buttons in one strip
The top menu strip is now the window's title bar wherever the app draws the
frame (crates/ui-egui/src/titlebar.rs), using craft-window for the decision
and for the draggable empty area:

- Windows: no OS frame. App icon at the very left, the menus, empty space
  that moves the window (double-click maximizes), the mode label, then
  minimize, maximize/restore and close (46 pt wide, crisp pixel-snapped
  glyphs, close turns red on hover, dimmed while inactive). Invisible edge
  and corner zones resize the window. A per-frame guard ported from
  VectorCraft keeps the undecorated window borderless and a maximized one
  clear of the taskbar (winsafe, no unsafe), and the taskbar gets the big
  app icon.
- macOS: the traffic lights over the strip (full-size content view, hidden
  title), centred on it with eframe's traffic-light API, the app icon after
  their inset, and AppKit's movable flag synced by craft-window.
- Linux and the BSDs: craft-window's probe decides; where the compositor
  leaves the frame to the app (GNOME) the strip draws the buttons in the
  desktop's button layout.
- Wherever the system draws the frame (and on the web) the strip stays the
  menu bar, with the app icon at its left. No line under the strip.

TEXTURECRAFT_TITLEBAR=app|system overrides the decision. Settings ›
Interface › System title bar (applies on restart) brings the OS frame back;
it is read from the saved settings before the window opens and is settable
over the control channel as prefs.system_title_bar. ui.inspect reports
titleBar. New strings are translated in every language, and the offscreen
snapshots render the app-drawn and macOS variants.
2026-11-01 19:46:06 +07:00
bflatastic b0eb1e960a Inter, even gaps and readable selections
- The interface font is Inter (regular and semibold) from craft-fonts' Latin catalog, on
  VectorCraft's type scale: 11 small print, 13 body and controls, 15 semibold headings, 11.5
  values. build.rs embeds it without its Private Use Area, where the icon font draws. CI and
  release builds move to the craft-fonts commit with the Latin catalog.
- The tool bar, tool shelf, rail and bake panel are square tiles like the dock's groups, with
  one 6 pt gutter between all of them and no separator lines.
- Selected options and selected text are lettered in the strong colour instead of the accent on
  its own tint; a theme test keeps that readable in every brightness and accent.
- Section captions are semibold; the Layers action row fits one line again.
2026-11-01 19:42:59 +07:00
bflatastic 7956ed2366 UI design pass: IBM Plex, one type and spacing scale, cleaner titles and forms
- fonts: IBM Plex Sans (one variable file at 400, 500 and 600) and IBM Plex Mono for the
  interface when built with craft-fonts (its Latin catalog, opted into from build.rs); the
  ui-medium and ui-semibold families always exist and fall back to the regular font; CJK
  fallbacks cover them too and align to the interface font's baseline
- type scale 11 / 12.5 / 14 (headings semibold), values in the monospace face; spacing on a
  2-4-6-8-12 scale (rows 4 apart, button padding 8x3, window margins 12); windows share the
  card radius
- panel tabs, section captions and window titles in the medium weight, as written instead of
  small capitals
- layer rows: the opacity field fits its slot (compact padding, small print)
- Settings: every section an aligned two-column form, like Export and New project
- tests/ui_snapshots.rs: renders the whole window offscreen (egui_kittest + wgpu) to PNGs for
  checking layout without a visible screen; AGENTS.md says how
- ATTRIBUTION, NOTICE and packaging list the Plex faces and ship their licences
2026-11-01 17:37:57 +07:00
dependabot[bot] 8fe14a9eec Bump zip from 2.4.2 to 9.0.5
Bumps [zip](https://github.com/zip-rs/zip2) from 2.4.2 to 9.0.5.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.4.2...v9.0.5)

---
updated-dependencies:
- dependency-name: zip
  dependency-version: 9.0.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-01 08:39:27 +00:00
aiongg 5803904622 Move to egui 0.37 and craft-ui's shared panel docking
egui, eframe and the craft-ui pin go to the suite's egui 0.37 forks and craft-libs f8f8829c.
The panels dock through craft_ui::docking (native floating windows on desktop) in place of
egui_dock, which has no egui 0.37 release. The viewport is the protected central canvas.
Layouts saved before load into the new workspace; an unreadable one becomes the default.
egui-phosphor has no egui 0.37 release, so a copy with the egui requirement raised is vendored.
2026-11-01 05:37:02 +00:00
bflatasticandClaude Opus 5.5 5c33d2005f Modern theme matching VectorCraft: brightness levels, accent colours, rounded cards
Four brightness levels (Medium dark by default) and seven accent colours (Copper, from the app
icon, by default) in Settings › Interface, saved in the UI preferences and settable over the
control channel. Panels, dock groups and bars are rounded cards; tabs are pills, buttons flat and
rounded, popups shadowed; spacing follows VectorCraft. The 3D and 2D views keep a neutral studio
grey with overlay colours that stay readable on it. Widget colours come from craft-ui.

Also: `ui.resize` sets the window size for recordings and screenshots, and TEXTURECRAFT_NO_PREFS
keeps scripted runs off the user's saved layout and settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:58:47 +07:00
bflatasticandClaude Opus 5.5 1e88b9041f Smooth 8K strokes, decal handles, displacement, refraction, release readiness
- Strokes pre-blend their commit while painting and recompose committed tiles at low
  priority: the 8K stroke-end frame drops from 30-42 ms to 12-19 ms
- Texture set resize runs in the background (8K: 3 s to 0.5 s, UV padding map from island
  borders only)
- Decal move/scale/rotate handles; FBX and USD high-poly textures for the color map;
  viewport displacement from the height channel; screen-space refraction of the scene
- CI pinned to Rust 1.96.0; FreeBSD VM sized for hosted runners; release builds embed
  craft-fonts; file associations for FBX, COLLADA, USD and Alembic on every platform
- README, release checklist, NOTICE and attribution brought up to date

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:25:10 +07:00
bflatasticandClaude Opus 5.5 55387bf0fd GPU baking, Alembic, templates, translations and 8K responsiveness
- Baking: per-map ray settings (AO, thickness, bent normals), GPU ray-traced baking with CPU
  fallback (~12x), color map from textured glTF high polys
- Files: Alembic (Ogawa) and FBX 6 import, per-tile UDIM resolution, converting a set to UV
  tiles, project templates, preserving painted strokes on mesh reimport
- UI: translations (French, German, Spanish, Portuguese, Italian, Japanese, Chinese, Korean)
  with a live language picker and CJK fonts, closed panels reopen where they were, viewport
  texture resolution setting, frame-budgeted scene sync for 8K sets
- Web: loading screen, WebGL2 notice, app-captured shortcuts, touch navigation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:23:28 +07:00
bflatasticandClaude Opus 5.5 bdbb52c9b6 UDIM tiles, USD import/export, coat/sheen/anisotropy/subsurface shading
- UV tiles: auto-detected UDIM texture sets as one atlas per set, padding kept inside tiles,
  one file per tile with the $udim export token, builtin:udim_plane
- USD: usda/usdc/usdz import (Crate reader with LZ4) and export with UsdPreviewSurface
- Shader lobes: clear coat, sheen, anisotropy and subsurface scattering channels in the
  viewport and the path tracer; car paint, velvet, brushed steel, skin and wax materials;
  glTF clearcoat/sheen export
- Color swatch popups no longer stay open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:45:14 +07:00
bflatasticandClaude Opus 5.5 ec859420d5 TextureCraft: clean-room 3D texture painting in pure Rust
An open-source, clean-room implementation of a Substance 3D Painter-style texturing
workflow, written in pure Rust with egui and wgpu.

- Layer stack with 32 blend modes, masks, generators, content effects and anchor points
- Painting, projection, smudge, clone, path, lasso fill, particle brush and quick mask
- 43 procedural materials, 17 smart materials and 10 smart masks
- Mesh map baking with high-poly, cage and match-by-name support
- PBR viewport with HDR environments, TAA and a path-traced Rendering mode
- glTF, FBX, COLLADA, OBJ, PLY and STL import; texture export presets; OBJ and GLB export
- Dockable Painter-style UI, shortcut editor, web build, MCP server and CLI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:33:13 +07:00