Commit Graph
115 Commits
Author SHA1 Message Date
chasse20 7de078d8d9 Merge main and tidy mask-value shortcut tests 2026-11-10 07:15:02 -05:00
FredApps c54f3fdf0c Merge pull request #270 from Aalzard/live-bake-preview
Live bake preview: each mesh map shows on the model as it finishes
2026-11-10 10:22:44 +01:00
Chris Hassebrook 54576658c1 Merge pull request #346 from Rebornim/fix/panel-tidy
Tidy the Shader, Display, History and Log panels
2026-11-10 02:46:28 -05:00
chasse20 7e2b3c7e6a Move bake preview setup into the engine 2026-11-10 01:58:43 -05:00
chasse20 832a7f9e89 Fix live bake preview review findings 2026-11-10 01:34:02 -05:00
MistyMystery 0c1f66d1f5 Live bake preview: update for the bake refactor, share streamed map buffers, narrow the cancel guarantee
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.
2026-11-09 19:49:07 +04:00
dotCooCoo 7f52b87b85 UI: use the shared craft-libs crates for dialogs, shortcuts and quit
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.
2026-11-08 22:07:12 -08:00
chasse20 c573250601 Merge latest main into baked map import
Preserve both module and translation additions. Register the baked map tests in the consolidated integration suites.
2026-11-08 21:42:24 -05:00
chasse20 12eb4a45da Merge main and resolve color selection UI conflict 2026-11-08 20:25:00 -05:00
chasse20 3a5c90ad82 Merge main and resolve UI persistence conflicts 2026-11-08 19:53:38 -05:00
chasse20 74c68e005a Merge main and resolve translation conflicts 2026-11-08 18:55:48 -05:00
Chris Hassebrook 7b5cccf1af Fix bake preview safety, seams and visibility 2026-11-08 18:49:05 -05:00
FredAppsandFredApps 117bfd5c1d ci: reduce integration test executables and skip unused tool install (#355)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-08 11:34:56 +01:00
Chris Hassebrook 9aebba686b Fix color selection picking and inspection 2026-11-08 09:13:46 +00:00
Rebornim 433ae07387 Add color selection editor and ID map picking
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.
2026-11-08 09:13:46 +00:00
Chris Hassebrook be989fba6f Harden baked map imports and fix TGA decoding 2026-11-08 08:58:07 +00:00
Chris Hassebrook 933720e907 Preserve UI settings when persistence fails 2026-11-08 08:58:03 +00:00
Rebornim a3f7fbc741 Panel layouts survive a restart
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.
2026-11-08 08:58:03 +00:00
Chris Hassebrook 8e9ffe24ba Merge main and resolve UV stroke conflicts 2026-11-08 08:47:14 +00:00
Chris Hassebrook 13b2e77e76 Fix UV stroke anchors and pressure handling 2026-11-08 03:43:07 -05:00
Chris Hassebrook 8ad3803746 Merge pull request #301 from Rebornim/feat/smart-material-orb-previews
Smart material previews on the preview orb
2026-11-08 03:37:09 -05:00
Chris Hassebrook e729def8da Merge main and resolve translation conflicts 2026-11-08 07:59:02 +00:00
Chris Hassebrook b177ecc912 Merge pull request #323 from Rebornim/feat/polygon-fill-parity
Polygon fill: box selection, polygon mode, hit-test, visible polygons only and the 2D view
2026-11-08 02:49:29 -05:00
Chris Hassebrook 52d0579bb4 Fix web preview repaint scheduling 2026-11-08 02:47:55 -05:00
Chris Hassebrook e8145421c3 Fix curvature detail handling and merge main 2026-11-08 07:31:13 +00:00
Chris Hassebrook c87247c6d3 Fix polygon fill drag state and visibility 2026-11-08 02:23:39 -05:00
Chris Hassebrook b966d13da2 Fix filter picker visibility and swap error context 2026-11-08 01:42:22 -05:00
Rebornim e2a69c4d12 Filter picker: Add filter opens the picker, same-id set edits in place
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.
2026-11-08 01:15:26 +00:00
Rebornim f5d07ced6b Pick the display tone mapping from a dropdown
The AO intensity is set in Shader Settings, so Display Settings no longer
repeats it.
2026-11-08 00:18:46 +00:00
Rebornim 63fc993644 Tidy the Shader Settings, History and Log panels
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.
2026-11-08 00:18:46 +00:00
Rebornim ca19e714a0 Filter picker: swap a filter's type from its Properties slot
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.
2026-11-08 00:09:49 +00:00
Rebornim 3836730030 X inverts the mask paint value while painting a mask
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.
2026-11-07 12:26:07 +00:00
Rebornim 6eed52435d Match UV tiles per file, skip empty imports, review cleanups
- 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
2026-11-07 09:14:41 +00:00
Rebornim cfe837b86c Import baked maps when creating a 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.
2026-11-07 09:14:40 +00:00
Chris Hassebrook 594f114ccc Merge pull request #313 from Rebornim/fix/section-headers
Collapsible UV transformations section for fill projections
2026-11-07 03:26:50 -05:00
Rebornim 695a3eed91 Shift+click paints straight lines in the 2D view
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
2026-11-07 08:22:27 +00:00
Rebornim 49bd4a1273 Polygon fill: review fixes
- 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.
2026-11-07 07:52:40 +00:00
Rebornim 0426275895 Tidy the fill editors and test the fill effect and cylindrical paths
Name the fill's two gaps, give the edited offsets and hardness their own
names, reuse the fill's id salt for the section, shorten the doc comments,
and cover a fill effect's own open state and the cylindrical Axis.
2026-11-07 07:13:04 +00:00
Rebornim 538220069d Name the fill slider ranges and the test's sizes and frame counts
The tri-planar hardness range is the one layer.fill.projection clamps to;
scale and rotation get named slider ranges as well.
2026-11-07 07:00:18 +00:00
Rebornim 3b302b88dc Polygon fill: box selection, polygon mode, hit-test, visible polygons only and the 2D view
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.
2026-11-07 07:00:12 +00:00
Chris Hassebrook eb9b736520 Merge pull request #311 from Rebornim/fix/curvature-default-mesh
Bake curvature from the mesh by default
2026-11-07 01:24:45 -05:00
Rebornim 3a6a160d33 Right-click in a view opens the Properties panel's contents at the cursor
A plain right click in the 3D or 2D view (no drag, no Ctrl/Alt/Shift) opens what
the Properties panel shows in a popup at the cursor; a click outside, Escape or
leaving Painting closes it, and the closing click doesn't paint. Every right-drag
gesture is unchanged.

Closes #149
2026-11-07 03:16:42 +00:00
Rebornim b0c07454af Collapsible UV transformations section for fill projections
Fill Properties keep the projection kind, its axis and the tri-planar
hardness visible, and move scale, rotation and offsets into a collapsible
"UV transformations" section, open by default, so the material channels
sit higher. Each fill keeps its own open or closed state. The tri-planar
"Blend sharpness" slider is now labelled "Hardness"; its range and effect
are unchanged.
2026-11-07 00:05:59 +00:00
Rebornim b1f377b8eb Bake curvature from the mesh by default
The normal-map method cannot see the low poly's own edges: a box baked
from itself gets flat curvature, and a box baked from a beveled high poly
gets a dark line along its convex edges. New projects now start on the
mesh method; projects that store a method keep it.
2026-11-06 23:46:46 +00:00
RebornimandClaude Opus 5.5 19f75c3a00 Smart material previews on the preview orb
Smart material shelf tiles and hover previews render the real material,
applied with materials::apply to the baked preview orb and composited by
the compositor, lit in a dark studio of soft boxes. MaskPreview becomes
OrbPreview (masks and materials share one bake and one worker). Tiles
show a loading icon until their preview arrives; the web takes one
worker request per frame. preview::material keeps plain materials only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 08:16:05 +00:00
chasse20 03a9870db2 Fix shelf hover previews and clean up comments 2026-11-06 01:12:55 -05:00
chasse20 a13e96d8b5 Merge authoritative bake settings and UV tile controls 2026-11-06 00:17:28 -05:00
chasse20 b315cde16a Merge main into shelf hover previews 2026-11-05 23:57:27 -05:00
chasse20 747068dbdf Fix bake settings and UV tile controls 2026-11-05 22:39:42 -05:00
RebornimandClaude Opus 5.5 a4b62d6e08 Drop a shelf material on the texture set under the cursor
While a material or smart material is dragged over the 3D view, the
texture set under the cursor shows its mesh edges in the accent color;
a drop selects that set and applies the material there. A drop on the
background does nothing. The whole-view outline is gone for materials
in the 3D view; image drops, the 2D view and the brush zone are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 03:05:47 +00:00