Merge upstream main into the branch. The streamed bake now returns the same Arc buffers it handed to the preview, and the document stores those, so a preview never holds a second copy of a map. A cancel leaves the set being baked as it was; sets that finished earlier stay applied.
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.
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.
A project file could set mesh_path to any host file, and automation allows a
file.reimportMesh without a path, so that command would have read it without
workspace authorization. A command without a path now always uses the
project's own copy again. The desktop UI passes the remembered path itself
(Session::remembered_mesh_path, one rule for "remembered and still there"),
and asks for a file when there is none. Also moves the misplaced doc comment
on read_mesh and documents the touched functions.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reimport mesh re-read the project's own stored copy of the mesh when it had
one, so saving a change to the mesh file and reimporting did nothing. The
project now remembers the path the mesh was imported from (mesh_path, the
spec's "3D mesh path") and Reimport reads that file again. When the file is
gone the menu asks for one, and a command without a path still falls back to
the stored copy. Projects saved before this have no path and ask once.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Share visualization settings between scene shading and GPU sync, and use then_some for the conditional low-poly pass. Cover per-set distances, selected-set filtering, missing inputs and ownership with engine tests.
Properties gets tolerance, a Colors list (swatch, R/G/B, re-pick, remove)
and a Pick color mode: the pointer becomes an eyedropper, both views show
the ID mesh map and the next click adds the ID color under it.
effect.set takes colors; effect.colorSelection.pick samples the texel the
mask evaluates and skips hidden texture sets.
The UI state was saved as RON through eframe's storage, and a dock read
through a JSON value lost RON's enum variant names, so every saved layout
loaded as the default. The UI state is now saved as JSON in a store of
its own: ui.json beside eframe's settings on the desktop, a storage key on
the web. A saved state this build cannot fully read is kept beside it
before the next save, and the state earlier builds saved still loads.
The reach job was only polled while the high poly was drawn, so leaving
bake mode or hiding the high poly mid-reach kept busy() true and the view
repainting every frame. Poll it at the start of every sync.
The resend test now waits for the rebuilt cage's reach before checking
that a resend starts none, so it no longer depends on thread timing.
Add filter still adds a neutral HSL filter, and its slot now opens the
picker straight away; Esc keeps the HSL and one undo removes it.
effect.set naming the filter the effect already is edits its parameters
instead of rebuilding it from defaults. The picker's filter list is
worked out once. The slot cuts long names short between the thumbnail
and the caret, stays highlighted while its picker is open and shows an
outline while it has keyboard focus. More engine tests: a swap on a
mask, an explicit name, refused swaps leave no change and no undo step.
Shader Settings starts with the shader model; its description moves to the
model's tooltip. The height to normal strength stays in the texture set
settings only. Subsurface scattering and Transmission are collapsible
sections. The History and Log lists fill their panel's height.
Curvature and edge wear generators read the baked curvature map one
texel at a time, so they only marked the sharpest edges. They now take a
mode (edges, cavities, both, raw) and seven detail size weights: the map
itself and the map blurred at 1 to 32 texels at 2K, padded past the UV
islands and built once per map and layout. Each size's edges and
cavities combine like a screen blend.
New curvature and edge wear generators use detail sizes. Generators saved
without them, and smart masks, read the map exactly as before.
effect.set takes filter: <id> to swap a filter effect's type in place,
keeping its place, blending, opacity and visibility (one undo step).
A reusable resource_picker shows grouped, searchable shelf tiles at a
slot; the filter slot uses it, and Add filter adds a neutral filter.
The 3D view in bake mode gets a Baking Visualization panel (high poly, cage,
UV seams, low poly, selected texture set only). The cage is built from the
bake's own ray starts (a RayFrame now shared by the bake and the view), so it
grows and shrinks with the distance sliders exactly as the rays do, and
high-poly vertices the transfer rays cannot reach are drawn red.
Refs #330
New command tool.swapMaskValue (mask value becomes 1 - value), default
shortcut X, enabled only while the selected layer's mask or one of its
mask effects is the paint target. Ctrl+X stays cut. Closes#332.
- Each tiled file is keyed by its own tile number and its image passed to
use_images, so tiles named differently or renamed on import still match
- Files of a tiled set without one of its tiles, and maps missing a tile, go
to unmatched instead of failing the import
- Nothing to import leaves no undo step
- The map is read from the file name after the set name
- Toast counts maps; a failed import keeps the file list
- Cap the bytes one import reads; whole-method cleanup of set, use_images,
tile_images and new_project
New project > Advanced settings gets the project's normal map format and
Import baked maps: Add lists image files, and Create imports them with the
new textureSet.meshMap.import command, which sets each file as the mesh map
of the texture set and slot its name names (Body_ambient_occlusion.png,
Body_normal.1001.png) in one undo step and reports the files it left out.
The 2D view keeps the end of the last finished stroke in texture coordinates,
with its texture set, so a line drawn after zooming or panning joins the same
texels, and previews the line while Shift is held, as the 3D view does. A
cancelled stroke (Escape) leaves the line start where it was.
Session::continue_stroke_uv stamps a long segment in batches of 4096 up to
1 << 17 stamps instead of stopping at 4096, keeps its carry within one step,
and seeds stamps from the stroke's running count (UvStrokeState) so noise
alphas don't repeat every pointer sample. The line preview is clipped to the
view, keeping its dash phase.
Refs #306
- A box drag always finishes: on release (even after a failed move), before
any edit, undo, redo or tool change, and when a scripted box fails or
starts while another drag is open. A camera move mid-drag (wheel zoom)
keeps the drag and selects again from the new camera.
- A drag projects the mesh once, skips repaints whose box hasn't moved,
and builds each grouping once; triangle edges are computed once.
- 2D clicks read the triangle from the set's UV G-buffer at the clicked
texel, so collapsed UV faces can't take the click.
- Brush strokes no longer record the nearest-triangle buffer; only polygon
fill asks for it (EyeDepth::render_with_triangles). Screen projection is
shared through paint::screen_point.
- A box touching the view's edge or zero-size on whole pixels selects
exactly the pixels it covers.
- Click fills never merge into a box drag's undo step; FillMode moves to
its own file; partial box parameters get their own error.