Commit Graph
22 Commits
Author SHA1 Message Date
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