Commit Graph
158 Commits
Author SHA1 Message Date
chasse20 cd45779684 Auto: Integrate main's RFC-0018 CLI changes
Keep the approved export repairs alongside the new CLI and packaging. Preserve both branches' Cargo dependency declarations and protocol documentation.
2026-11-28 00:30:16 +00:00
chasse20 091869033a Auto: Preflight export paths and label tiled atlas previews
Reject selections that use one output path as both a file and a folder before rendering or starting a desktop export. Expose tile metadata in export.plan and use it to label atlas previews, including ambiguous filenames.

Write quantized 8-bit PSD rows directly into the merged-image buffer. Cover path conflicts in both orders, partial desktop writes, and visible atlas captions with regression tests.
2026-11-28 00:21:21 +00:00
FredApps bd03a0411f texturecraft-cli: follow RFC-0018 (clap, thiserror, run(args, out, err), packaged completions and man pages) (#875)
* texturecraft-cli: follow RFC-0018 (clap, thiserror, run(args, out, err), packaged completions and man pages)

Closes #866. Part of storytold/craft-contrib#95.

* fix(cli): enable clap env, and close replacement and token gaps

- Enable clap's `env` feature so TEXTURECRAFT_CONTROL_TOKEN compiles in a
  standalone `-p texturecraft-cli` release build (the FreeBSD package job).
- An inherited token no longer implies --bridge; only a command-line
  --token does.
- Compare run/bake/new outputs to the path Headless::save actually writes
  (it appends .tcraft when the extension is missing).
- Apply the same replacement rule to batch (save vs open), with --in-place.
- Build man-and-completions for the host when CARGO_BUILD_TARGET is set.
- Don't panic in the blank-token test when the environment already has a
  token.

* fix(cli): require both roots for headless mcp

AGENTS.md rule 18 says an agent entry point must refuse to start without
--automation-read-root and --automation-write-root (the --read-root /
--write-root aliases here). Headless mcp now exits 2 unless both are
set; --bridge is unchanged. The missing-CLI_DOCS diagnostic also names
the host-example env -u CARGO_BUILD_TARGET prefix already used to build it.
2026-11-28 01:01:49 +01:00
RebornimandClaude Opus 5.5 088a217d7b Merge main into feat/export-pass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 23:00:30 +00: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
Rebornim de7515bf1a Keep a stroke's box and the stroke count through undo and reimport, and give the bake rows' reasons to screen readers
The painted box of an auto-rebake map now lives in the document, so
undoing the rebake of a stroke makes the map due again (the stroke stays
painted while the map goes back to its pixels from before it), and a
rolled-back bake.run needs no hand-kept copy. A mesh reimport carries the
stroke count on; before, a bake after a reimport saw every earlier stroke
as newer and kept its box.

The Baking Log rows, the out-of-date clock and the generator's bake note
put their reasons in the accessibility tree, not only in a tooltip, and a
folding high poly row exposes whether it is expanded. bake.log is kept off
the shortcut list. PressEdit gets its own file, region_keeps_pixels moves
beside RegionBake, and auto_rebake_due computes each map's source once.
2026-11-27 06:13:17 +00:00
Rebornim ff51384164 Keep a canceled bake's finished maps and name the rebaked map in the footer
Cancelling a bake threw away the maps the running texture set had already
finished, so the Baking Log turned their ticks into warnings. The set now
keeps them as one undo step, also when the preview closed because Bake
mode was left; only maps that had not finished warn, and a map it did not
finish keeps its out-of-date mark. A bake at a new output size keeps none,
since storing them would drop the set's other maps.

An auto-rebake started its preview with every checked map of the set, so
the progress footer named the set's first map ("Baking Normal (1/7)") while
it rebaked AO. The preview now lists only the maps the rebake makes.
2026-11-27 06:12:44 +00:00
Rebornim f39e99069c Turn Auto-rebake on for the Normal map when skew painting starts
The first skew stroke of a texture set turns Auto-rebake on for its
Normal map, unless the set already has an auto-rebake map; it is part
of the stroke's undo step.
2026-11-27 06:12:44 +00:00
Rebornim 4a56683bb9 Rebake the auto-rebake map inside a skew or cage stroke
A skew or cage stroke on a set that bakes from a high poly marks its UV
box; in Bake mode the app then bakes the set's auto-rebake map again
only there (one texel wider, for the paint map's sampling), keeps the
rest of the stored map and pads the whole map, so its pixels match a
whole bake. Maps scaled by their whole range (curvature, height,
thickness), UV-tiled sets and a map stored at another size bake whole.
A stroke painted while that bake runs is baked by the next one. The bake
crate gains bake_tiles_in with a texel box.
2026-11-27 06:12:44 +00:00
Rebornim 9e36885648 Rebake the auto-rebake map when its settings change
Each texture set can turn on Auto-rebake for one mesh map (bake.autoRebake,
saved with the project; older projects have none). In Bake mode the app
rebakes that map alone in the background once what it is baked from has
stopped changing for half a second; a change during that bake cancels it
and the newest settings bake instead. Only a failed rebake makes a toast.
2026-11-27 06:12:44 +00:00
Rebornim 530541a97a Remember what each baked map was baked from
Each bake records, per map, fingerprints of the low poly geometry, the
high poly and cage files, the settings every map shares (with the UV
tiles baked) and the map's own settings, taken when the set's bake
starts. A map whose inputs differ now is out of date, with what changed;
project.inspect lists those per texture set as outOfDate.

The record is saved with the project and left out when empty, so
projects saved before it open unchanged and their maps never show out of
date. Imported maps keep no record either.
2026-11-27 06:12:35 +00:00
Rebornim 373159ec5e List how the bake paired parts by name in the Baking Log 2026-11-27 06:12:35 +00:00
Rebornim c0839e873e List each set's high poly files in the Baking Log 2026-11-27 06:12:35 +00:00
Rebornim dfafec43c1 Report the Baking Log's rows through bake.log
Automation gets the latest bake map by map with each map's state and
the error of a failed one, the same rows the Baking Log shows.
2026-11-27 06:12:35 +00:00
chasse20 6703898b94 Auto: Integrate IOR reflectance with the Resources Updater
Merge main's IOR reflectance setting alongside resource source tracking.
Preserve both archive fields, integration test modules, and protocol
sections, along with the approved image-link, preview, and export repairs.
2026-11-27 06:02:22 +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
chasse20 03edcaa1c6 Auto: Integrate main into the reviewed IOR changes
Preserve the approved IOR save and reflectance changes alongside main’s per-project autosave names, opt-in mesh normal recomputation, and legacy generator inspection. The prepared merge required no manual conflict resolution.
2026-11-27 04:59:40 +00:00
chasse20 d9926733a9 Auto: Preserve IOR edits across background saves
Track IOR-related display changes in the save revision and preserve the exact legacy reflectance scale at IOR 1.5. Improve the shader checkbox outline and cover its contrast and keyboard behavior.

Reuse wrapped CPU trace coordinates, shorten tracer staging lifetimes, and avoid per-set template channel ID allocations. Document the separate glass-interface Fresnel calculation.

Verified with local workspace gate coverage, affected release suites, software rendering, and the shader rail snapshot.
2026-11-27 04:53:09 +00:00
aiongg d6dfd69bcd Merge pull request #850 from Ap3pp3rs94/feat/mesh-export-recompute-normals
feat(mesh): make normal recomputation a real export option
2026-11-26 18:01:18 -05:00
vangel76 da7dab8118 Merge storytold main (1f77416a) into feat/749-ior-specular-f0 2026-11-26 21:55:19 +01:00
vangel76 f2205d5591 Resources Updater: list linked MaterialCraft materials as rows without a file
resource.status gains the status material for the package of every linked
MaterialCraft material (fill layers and material effects); such a row
cannot be updated or relinked from disk, and its status tooltip says it
updates when MaterialCraft cooks it again. Tests also check that an
environment map and a brush alpha are tracked like other images.
2026-11-26 21:18:37 +01: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
chasse20 11597318ab Merge remote-tracking branch 'origin/main' into HEAD 2026-11-26 16:52:39 +00:00
Chris Hassebrook d422c821f2 Merge pull request #772 from vangel76/fix/effect-stacks-769
Toggle material and mask effects from their thumbnails
2026-11-26 06:36:38 -05:00
chasse20 3adefe418a Auto: Integrate main and preserve shortcut recording
Integrate main at 6b01f32e with the shared UI runtime and warp toolbar. Initialize main’s shortcut dispatcher alongside the PR’s lazy conflict cache.

Preserve Escape modifiers when the runtime routes the press as a window cancel. Add a regression test for the reserved Shift+Escape warning in Settings.
2026-11-26 11:36:06 +00:00
FredApps 6b64c5b9af Merge main into feat/export-pass 2026-11-26 09:05:57 +01:00
FredApps 2cbbebfd3f Preserve texture set hover in the IOR branch merge 2026-11-26 08:27:47 +01:00
autocraft-bot[bot] 6a3b3c1ba0 Merge main into feat/mesh-export-recompute-normals 2026-11-26 07:13:22 +00:00
ATOM 8700efc30c feat(mesh): make normal recomputation a real export option 2026-11-25 22:45:46 -06:00
chasse20 499591c387 Auto: Integrate main and protect effect names on reopen and undo
Discard pending names when their project or effect disappears, including while the Layers panel is hidden. Cover File Open and removal followed by undo in the UI tests.

Reuse effect slices and label layouts. Skip checkerboards and placeholder meshes for fully clipped thumbnails.
2026-11-26 04:35:45 +00: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 d0b1c7e3ac Auto: Integrate main and fix warp placement, resets and stale drags
Preserve main’s perspective ring fit and use the displayed radius when deciding whether a ring can be grabbed. Keep surface placement on the edited fill’s texture set and end captured drags when the loaded mesh or projection changes.

Preserve toolbar settings across layout changes, honor Ctrl snapping, and expose the manipulator settings as keyboard-adjustable sliders. Reset stored projector rotation and scale when keeping corners, and reject invalid reset arguments before editing.

Skip hidden handle geometry, reuse projected axes, and remove temporary selection and hit-test vectors.
2026-11-26 04:13:53 +00:00
Rebornim f304cea242 Export: describe the browser PSD limits as estimates of PSD buffers and output, not a total memory bound 2026-11-26 02:34:00 +00:00
Rebornim 7a41c2c03c Export: say PSD names can be sanitized or disambiguated and point clients to export.plan 2026-11-26 02:33:55 +00:00
FredApps 9e0e971c47 Merge main into texture effect-stack disclosure 2026-11-26 03:18:39 +01: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
Rebornim 00238575c8 Export: document PSD file names, layer names and limits
A PSD export writes one <mesh>_<texture set>.psd per UV tile, and the template's file names become its layer names instead of file names (review on #827). docs/control-protocol.md says so, with the size limits and the browser-only memory budgets.
2026-11-26 00:52:42 +00:00
Rebornim f67270d6ae Export: JPEG 2000 back to greyed; its writer moves to craft-libs
The j2k/jp2 writer is a codec, so it goes to craft-image-codecs first (review on #827); the export wires it in again once craft-libs ships it.
2026-11-25 23:10:25 +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
chasse20 47c6ea8f21 Auto: Fix headless export options and reduce export memory use
Integrate main and honor per-map sizes and shader sidecars through MCP. Preserve texture writes when an optional sidecar fails, and cover both outcomes through the tool transport.

Bound layered PSD working memory, preserve set and UDIM names, and report effective dithering. Match previews to stored channels and identify linear grayscale JP2 samples correctly.

Reuse sample buffers, cache unchanged template plans, and share identical grayscale preview textures. Remove the obsolete direct XML dependency. Apply the maintainer’s preset attribution decision and retain the ICC credit and codec notices.
2026-11-25 21:48:17 +00:00
chasse20 2a765088c6 Auto: Fix export bounds, preview allocations, and dialog controls
Preserve native PSD layer sizes and UDIM suffixes, validate the canvas before allocation, and keep MaterialX and USD references compatible with the exported files. Record linear JP2 data correctly and protect browser shader sidecars from path collisions.

Borrow preview coverage, reuse built-in presets, group PSD plans by tile, and avoid redundant codec and diffusion buffers. Release preview textures on dismissal and keep map controls reachable, distinguishable, and readable across themes.

Integrate main's layer menus and Cargo debug configuration. Update dependency notices, preset attribution, and export documentation.
2026-11-25 19:55:35 +00:00
chasse20 54ae40b14a Auto: Integrate main and fix bake selection and preview lifetimes
Validate every selected texture set before starting a real or quick bake. Apply linked settings atomically, reject invalid copy selectors, and preserve only the maps needed by a display preview.

Reuse fitted geometry across streamed maps, bound cage projection scratch, and stop discarded work. Release stale scene and thumbnail resources on project replacement. Keep pending imports safe across updates and restore keyboard focus after bake menus and dialogs close.

Add regressions for selection, cancellation, project replacement, and keyboard navigation. Retain main's packaging, dependency, and export changes.
2026-11-25 19:55:33 +00: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 95fac86e4e Resources Updater: recheck files while the window stays open; a mesh map follows its latest imported file 2026-11-25 13:43:31 +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
FredApps 6b6d77ae4e Merge main into IOR specular reflection branch
Preserve the current export template tests and the authored Specular/Glossiness IOR regression.
2026-11-25 11:19:25 +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 d88bb3ea4b Correct the UV persistence note in the control protocol docs 2026-11-25 10:41:37 +01:00
Rebornim 276f5d9f78 Output templates: hovering a channel swatch shows the file its output writes, small, with each channel and its source; export.preview samples one output map 2026-11-25 05:49:03 +00:00