Commit Graph
179 Commits
Author SHA1 Message Date
chasse20 0d8f00ce30 Auto: Fix bake cancellation and integrate upstream desktop changes
Keep eligible maps from an interrupted bake in one undo step and preserve completed texture sets. Add resource status, update, and relink commands and the desktop Resources Updater.

Integrate Xwayland pointer support for Linux pens, Russian language selection and packaging metadata, private staging for MaterialCraft handoffs, and release-change notifications. Update tests and documentation for the affected behavior.
2026-11-27 21:47:23 +00:00
chasse20 b93c1a285d Merge validated target into TextureCraft bake review 2026-11-27 21:36:52 +00:00
Chris Hassebrook ffb2ecf390 Merge pull request #836 from vangel76/feat/wayland-tablet-816
Linux: open the window through Xwayland when a pen is attached on Wayland, so the pen works
2026-11-27 16:01:12 -05:00
chasse20 e274358a56 Auto: Integrate main and fix bake freshness and cancellation
Preserve Resources Updater links and bake provenance when replacing or clearing mesh maps. Keep unrelated maps on unchanged UV atlases, discard partial results from failed workers, and reject overflowing texture-set indices.

Track vertex colors, part assignments, tangent frames and the packed file used by material-color bakes. Share the common source fingerprint across each task's selected maps. Add reimport, cancellation and atlas regressions, update the control protocol, and clarify the affected code.
2026-11-27 21:00:57 +00:00
SteamSmith c53813e6ac Merge pull request #691 from JaffarSk24/i18n-offer-russian
i18n: offer Russian in the language picker.

- ru (Русский) is added to LANGUAGES. A Russian system (ru-RU, ru-SK, ru_RU.UTF-8) now starts in Russian once the catalog (storytold/craft-i18n#334) is embedded; the locale test covers those tags.
- Cyrillic no longer counts as a script needing a fallback font: the bundled UI fonts already carry every Russian letter, including Ё/ё and «».
- Docs (ROADMAP, features, localization-parity) now list eleven languages.

Without the catalog the picker entry falls back to English, as for other languages. Tests pin the UI harnesses to English where needed.
2026-11-27 15:02:57 -05:00
chasse20 59270b4a52 Auto: Validate Xwayland setup before selecting X11 and integrate main
Keep native Wayland when the local X server rejects setup or lacks the requested screen. Cover rejected and accepted replies, document pointer support and Flatpak access, and retain the PhotoCraft copyright and license notices.

Focused Linux desktop, titlebar and framework tests passed, along with Clippy, formatting, layers and wasm checks.
2026-11-27 19:58:00 +00:00
Kirill M b4e9c17575 docs: the CJK and Arabic picks need a font for their script
The language picker greys out a language whose script no available font covers, so a web build with catalogs but without craft-fonts cannot pick Japanese, Chinese, Korean or Arabic.
2026-11-27 07:16:23 +01:00
Rebornim e3c299963b List the Baking Log, out-of-date mesh maps and Auto-rebake in the features 2026-11-27 06:13:17 +00:00
chasse20 87b70dae3f Auto: Preserve material image links and defer offscreen previews
Share bounded resource naming across image, PBR and MaterialX imports so duplicate names survive a project round trip. Stream changed images into one undo step, preserve mesh-map ownership, and restore decoded pixels after a rejected edit.

Load updater thumbnails as they enter view. Expose package explanations and update outcomes to assistive technology, and keep the public MaterialX byte loader compatible.

Integrate main's autosave naming, export-normal option and generator inspection. Borrow geometry for default GLB and USD exports. Remove the duplicate native UI test dependency.
2026-11-27 05:53:05 +00:00
a2andClaude Sonnet 5.5 d98fb4c640 chore(i18n): merge main; drop the English test pins now that the UI language is per thread (#797)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-26 19:42:32 -05:00
autocraft-bot[bot] 1b32764b7a Merge main into fix/851-autosave-names 2026-11-26 21:48:58 +00:00
vangel76 8b11099717 Merge storytold main into feat/resources-updater-817
Conflicts resolved:
- crates/engine/tests/it/main.rs, crates/ui-egui/tests/it/main.rs: kept both
  test modules (rebuilt_uv_layout, resource_updater; resources_updater,
  sample_project) in name order.
- crates/ui-egui/src/lib.rs: Toast keeps main's announce field and this
  branch's action field; both constructors set both.
- docs/control-protocol.md: main's ui.menu.invoke and Open Sample Project
  rows, with this branch's note that the Resources Updater button is enabled
  while a project is open.
2026-11-26 19:40:00 +01:00
vangel76 3a25b45ea6 Merge storytold main (1f77416a) into feat/wayland-tablet-816
docs/features.md: kept main's title-bar sentence (prefs.system_title_bar through ui.set) and this branch's Wayland pen entry.
2026-11-26 19:04:50 +01:00
autocraft-bot[bot] eda265b470 Apply requested fixes
- crates/ui-egui/src/autosave_name.rs
- docs/features.md
2026-11-26 07:21:04 +00:00
Morion 23d3f9ae71 Autosave: give each project its own copy
The copy was named after the project, whose name comes from the mesh file, so projects made from one mesh overwrote each other's autosave. It is now `<stem>-<suffix>.tcraft`: from the saved file and its path, or a suffix of its own while the project is unsaved. A project opened from its copy keeps writing to it.

Fixes #851
2026-11-26 00:27:10 -05:00
chasse20 fd39434e6c Auto: Integrate main and fix Settings and shortcut validation
Preserve the Nightly data root, viewport resolution and saved key bindings when applying Settings. Restore the system language on Reset UI, use the persistent preview-cache default, and release automatic bake previews when disabled.

Check the adapter selected by the baker against its shader requirements. Show reference keys in both shortcut editors and cache conflicts until the bindings or platform change. Correct the documented Bake mode key and add regressions for the repaired interactions.
2026-11-26 04:16:27 +00:00
chasse20 21b86d98f6 Auto: Validate rebuilt UV layouts and trim save and reload allocations
Integrate main's dialog and bake-state changes. Reject inconsistent saved layouts at archive and session boundaries, and preserve vertex splits between independently packed materials.

Stream UV coordinates in bounded batches, transfer stored mesh bytes on successful reopen or reimport, and skip import reports that those callers discard. Set the archive version on the owned save snapshot to avoid copying the layer graph twice.

Cover material boundaries, malformed snapshots, locked coordinates and keyboard activation. Update the format and command documentation.
2026-11-26 01:03:44 +00:00
chasse20 05ffb1cc30 Auto: Integrate main and preserve existing sample projects
Stage bundled samples and install them without replacing a file that
appears during the copy. Record the Material Ball’s provenance and
clarify the desktop picker fallback and browser behavior.

Validated with Linux UI tests, focused release tests, formatting,
Clippy, layer checks, and WebAssembly compilation.
2026-11-25 22:50:07 +00:00
vangel76 e26002d230 Open the window through Xwayland for a pen on Wayland
winit 0.30 doesn't bind the Wayland tablet protocol, so on compositors that don't emulate a
pointer for the pen (KWin) the pen did nothing in the window. With a pen attached on a Wayland
desktop, and Xwayland able to run the window, the app now opens on X11, where the pen works as
the pointer. TEXTURECRAFT_NATIVE_WAYLAND=1 keeps native Wayland. Adapted from PhotoCraft.

Fixes #816.
2026-11-25 16:52:25 +01:00
vangel76 cbc6669f48 Ship the sample project as assets/samples and copy it into the Samples folder 2026-11-25 16:44:16 +01:00
vangel76 7b37306c47 Say the Samples folder is desktop-only in the docs 2026-11-25 13:39:48 +01:00
vangel76 9c2393655e Open Sample Project starts in a Samples folder that holds the built-in sample 2026-11-25 11:21:23 +01:00
vangel76 cf54cc20de Resources Updater: review fixes
Remember file verdicts per size and time so an unchanged file is read
once; recheck the open window at most twice a second; outdated rows
first. Record image files from PBR folder, MaterialX and mesh map
imports too, and resample an imported mesh map from its changed file
while it still holds that file's pixels. Relink only image resources;
decode updated bytes the way undo and reopening do. Notices carry their
project and are reset when another project opens, which is checked once.
Escape closes the window only while it has the keyboard. Keep the
reference's Shelf line and show the file on its own line. A dedicated
automation refusal message, translated status labels, tempfile in tests.
2026-11-25 11:16:41 +01:00
vangel76 2c6222ecde Move texture resolution to Display Settings and apply review fixes
Remove the Viewport section from Settings; the texture resolution is in
Display Settings > Render settings and the GPU memory toasts point there.
Add hovers to the Data folder and RAM slider, name the R button for screen
readers, test that Show world axes hides the 3D axes, and fix the docs
that still named the removed sections.
2026-11-25 01:18:07 +01:00
vangel76 6120bdd79d Resources Updater: find changed resource files on disk and update or relink them
Image resources imported from a file remember its path and modification
time. resource.status lists each resource as outdated, missing, up to date
or without a file; resource.update reads changed files again and
resource.relink points a resource at another file, each as one undo step
that recomposites every layer using the resource. Undo and redo drop
pixels decoded from bytes they replace under the same name.

The shelf's Resources Updater button opens a window with the project's
resources (outdated first), status and name filters, Update, Select new
resource, Show in folder, Refresh and Update All. When the app gets the
focus back after files changed, a notice offers to update them.
Automation refuses the three commands, since they read host paths the
project names.
2026-11-25 00:48:58 +01:00
vangel76 8f60ded96f Save the rebuilt UV layout in the project file
A project with rebuilt mesh UVs now stores the UV of every triangle
corner in uv_layout.bin. Reopening and reimporting the project's own
mesh apply that layout instead of running the unwrapper again, so a
later unwrapper change cannot move saved paint. A format 4 project
with rebuilt UVs but no valid layout is refused.
2026-11-25 00:42:46 +01:00
vangel76 f4a8283d74 Export templates: subfolders and spec-based URP/USD templates 2026-11-25 00:15:22 +01:00
vangel76 e1577e3686 Bind only the textures the export kept in the USD asset
Each usdAsset entry now carries the reservedNames its command ran with, and the
asset applies the same reservation rule as the texture export (reserved file
names and UDIM patterns, then earlier files of the job), so it never binds a
file the export skipped.
2026-11-23 23:13:32 +01:00
vangel76 0924e1314d Merge main into feat/786-export-usd-asset 2026-11-23 23:03:53 +01:00
chasse20 7ff8f65f77 Auto: Keep MaterialX references safe across texture sets
Reuse compatible template maps and write dedicated OpenPBR maps for the remaining supported inputs. Reserve earlier filenames and UDIM patterns before rendering, and omit inputs whose textures would belong to another set.

Report when an export writes no files. Cover map compatibility, collision handling, and empty exports with regressions and document the resulting behavior.

Integrate main without target-side content changes. Validated by the retained Linux cargo xtask ci run.
2026-11-23 21:15:39 +00:00
vangel76 8f7c956335 Document unbound UDIM maps and the implicit default material in the USD asset 2026-11-23 21:59:01 +01:00
vangel76 4be73547bf Fix USD asset review findings: UDIM name clashes, material-less meshes, normal convention, sent params, docs 2026-11-23 21:56:35 +01:00
vangel76 c0523d2f68 Write the model as a USD file that uses the exported textures from the export window 2026-11-23 21:27:42 +01:00
vangel76 c9640bae07 Keep the files of earlier texture sets of an export when writing the MaterialX maps 2026-11-23 20:23:09 +01:00
vangel76 927fedf313 Show the export's warnings in the export console 2026-11-23 20:18:21 +01:00
vangel76 fa47c2c183 Force an OpenGL normal and keep the bit depth for the MaterialX maps 2026-11-23 19:40:01 +01:00
vangel76 b84f7b56e4 Write the OpenPBR maps for the MaterialX whatever template is selected 2026-11-23 19:23:50 +01:00
vangel76 b53c931248 Add a MaterialX export option to the export window 2026-11-23 18:57:39 +01:00
chasse20 8b2821e163 Auto: Integrate main and fix material preview and picker state
Preserve linked fills and imported alpha images, bind cached composites to their mesh, and keep delayed orb results from evicting newer previews. Avoid rendering hidden picker tiles, redundant queue scans and an extra HDR image buffer.

Correct picker cancellation, native pointer ownership, channel selection and single-parameter pattern edits. Update the Material controls guide, retain the approved Studio Small 09 attribution, and exercise the mask projection through its accessible control.
2026-11-22 22:19:46 +00:00
Kirill M ab13dc9870 i18n: format the locale test; features.md says a build without catalogs offers English only 2026-11-20 06:53:12 +01:00
Kirill M c25c984395 i18n: offer Russian
LANGUAGES gains ru (Русский); ru-RU, ru-SK and ru_RU.UTF-8 resolve to it. Its texturecraft.tsv catalog comes from craft-i18n; Cyrillic is drawn by egui's built-in fonts. Docs list eleven languages.
2026-11-20 06:53:12 +01:00
chasse20 311bf89885 Auto: Integrate texture export and preserve browser log sources
Keep per-set export settings and case-insensitive filename deduplication. Route browser warnings and completion counts through MapExporter, and retain both the 2D view and texture export parity sections.
2026-11-20 01:19:32 +00:00
vangel76 3cbe724030 UI batch 3: view mode picker, display settings, shortcuts, 2D view, log, templates and Window menu
Combines issues #675, #676, #677, #678, #679, #682, #683, #680, #681 and #684.

- View mode combo with section titles, reference names, Other... image picker and an unlit switch
- Display Settings: environment picker grid and drop slot, reference slider ranges, background color, environment alignment, shadow computation mode and opacity
- Settings > Shortcuts with sections, Reset all to default, Delete to clear and conflict warnings; reference action names and default keys
- 2D view: rotate, snap rotate, drag zoom, F reset, wider zoom limits, UV tile grid, numbers, hover label and one mesh wireframe switch
- Log panel with sources, level colours, selection, copy and clear; the exported log keeps each entry's time, level and source
- Save as template, reference template names and a remembered template
- Window menu with Toolbars, per-mode layouts, Hide UI check mark and views per mode
2026-11-19 08:15:57 +01:00
vangel76 222343ae8f Export textures window: per-set and per-map overrides, more file types, progress console, output templates layout
Adds the reference's export settings page (lists, menus, tooltips, Cancel undoes),
per texture set overrides for template, file type, size and padding, per output map
file type and bit depth, JNG/PGM/PSD/32-bit float TIFF writers with bit depth per
file type, dithering and diffusion padding, a progress bar with Cancel Export, a
console and a tree in the list of exports, and the Output templates tab layout with
its right-click menu.
2026-11-19 08:07:39 +01:00
chasse20 4ff9cab867 Auto: Integrate main and fix UI state, bake reporting, and export plans
Preserve main's procedural patterns and linked-material changes. Keep camera navigation, pending dialogs, Settings drafts, shortcut capture, and shelf contents consistent across project and UI state changes.

Mark persisted panel edits as modified. Accept existing bake settings in presets, count newly baked maps, and open failed bakes on the General log channel. Record log times and severity when each event occurs.

Reuse selected export plans, move completed JSON results into place, and avoid copying cached shelf paths or building unused preset catalogs. Add regression coverage and update the control protocol examples.
2026-11-19 01:47:14 +00:00
vangel76 914799e462 Merge main into the UI batch
# Conflicts:
#	crates/ui-egui/src/state.rs
#	crates/ui-egui/src/windows.rs
#	crates/ui-egui/tests/it/file_dialogs.rs
2026-11-18 23:45:39 +01:00
chasse20 26bf15cf3c Auto: Fix procedural mask scale and reduce fill picker allocations
Apply scalar scale once when creating a procedural mask. Preserve explicit two-axis placement and the projection stored in existing projects. Read placement directly from the command parameters during edits.

Render procedural swatches only for visible picker tiles. Reserve space for the full selection and sort project images in the finished row list. Update the fill documentation for image imports, pattern resolution, and the Gradient Map menu.
2026-11-18 22:38:56 +00:00
chasse20 6f8e984d7a Auto: Integrate main and reduce repeated procedural sampling work
Reuse two fur seed tables per worker, share knot noise, and skip invisible decay and brocade detail. Normalize each catalog lookup once while preserving label and saved-name aliases.

Consolidate periodic sampling helpers, move FurLock into its own module, and strengthen coverage of coarse-grid fallback and saved pattern names. Preserve main's project and Assets changes and document the expanded catalog.
2026-11-18 21:52:15 +00:00
vangel76 ff647b38c3 UI parity batch: settings window, side panels, camera, bake presets, F4 view swap, Help menu
Fixes #637, #642, #649, #651, #655, #664.

- Edit > Settings with General, Shortcuts and Libraries pages, OK and Cancel (#637)
- Right-bar panels pop out with Undock; Export panel, Log tabs, Display and Shader Settings pages (#642)
- Free camera rotation, snap rotate and next/previous camera commands, Normal+height+mesh view (#649)
- Named bake presets, apply bake settings to all texture sets, bake summary toast (#651)
- Swap 3D/2D views with F4 (#655)
- Help > Release notes... and Export log...; tests for Join the community (Discord)... (#664)

Combination: one shared unavailable::NOT_AVAILABLE hint, snapped orbit uses the Settings
rotation speed and levels a free camera, Swap 3D/2D in the Viewport reference order,
symmetry test harness widened for the longer top bar, docs/parity.md regenerated.
2026-11-18 21:40:53 +01:00
chasse20 9feb78523a Auto: Integrate main and fix project creation and resource imports
Preserve main's empty startup and project-bound dialog behavior. Check for unsaved edits at Create, reject stale mesh picks, and release closed forms' mesh buffers. Transfer the desktop mesh input into the new session after validation.

Retain failed import rows for retry, keep duplicate names within the archive limit, and preserve the active brush alpha during unused-resource cleanup. Remove repeated row scans and idle UV-tooltip formatting, and keep baked-map filenames visible on separate rows.
2026-11-18 17:12:29 +00:00