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.
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.
Divide each blurred detail size by the share of the blur window inside its
UV tile block, so texels near a block or map edge keep their strength
instead of fading toward zero. Raw mode reads mid gray when there is no
curvature to sample. The size cache keeps one layout per curvature map.
Mask previews of hidden layers build their sizes once before the tiles run
in parallel. effect.set rejects a sizes array with a non-numeric entry.
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.
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.
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 drag in the 3D or 2D view draws a rectangle and fills what it selects
live; releasing it records one undo step. A click still fills one target,
now also in the 2D view. Fill modes gain Polygon (the source quad or n-gon,
from the importer's diagonals), and Mesh fills connected geometry. The
hit-test picks polygons the rectangle touches or whose center it holds;
visible polygons only uses a nearest-triangle buffer next to the eye-depth
raster, leaving hidden texture sets out.
Polygon fill's properties show its own settings and, by selection, the
material, the mask gray, or why it can't fill. Wireframes show while the
tool is active without changing the saved toggles.
Commands: tool.fillMode takes polygon, tool.fillSelection sets hitTest and
visibleOnly, and tool.click takes a screen box, a UV point or a UV box.
A bake started in the app bakes the set's maps one after another (BakeTask::run_streaming, one bake per map, same pixels as a single bake) and streams each finished map from the worker thread. One map is installed per UI poll into the session's bake preview (not the document); the 3D view follows the newest map raw on the model, with maps and sets not baked yet shown neutral, and the bake bar names the stage. The bake bar picks Follow Newest Map, a finished map or Material. The previous view mode comes back when the bake ends, is cancelled or Bake mode is left; painting is paused while a bake is shown. bake.preview, ui.bake.start and ui.bake.cancel expose it on the control channel. New strings are translated in every shipped language.
Upstream removed bake/maps.rs, engine/tests/auto_rebake.rs and read_skew
(moved elsewhere); take the deletions. Convert two new chunks_exact uses in
bake/test/setting.rs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Clippy 1.99 flags chunks_exact and chunks_exact_mut with a constant
chunk size (chunks_exact_to_as_chunks). Switch those call sites to
as_chunks / as_chunks_mut. Behaviour is unchanged: the trailing partial
chunk was already dropped.
Fixes#233
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>