Commit Graph
338 Commits
Author SHA1 Message Date
Chris Hassebrook fec8d059e2 Merge pull request #177 from dotCooCoo/feat/shared-ui-crates
feat(ui): move window, dialogs, shortcuts and quit to the shared crates
2026-11-09 01:37:03 -05:00
dotCooCoo c2d38135a6 Window: name the default and minimum window sizes 2026-11-08 22:25:41 -08:00
dotCooCoo 472d73eb87 feat(ui): move window, dialogs, shortcuts and quit to the shared crates
Bump craft-ui to craft-libs 1b34eba and add craft-keymap, craft-dialogs,
craft-quit, craft-menu (macOS) and craft-window.

File dialogs no longer block the event loop. Shortcuts dispatch through
craft-keymap and match exactly their modifiers. On macOS, Quit asks about
unsaved work and the app quits through the platform. On a Wayland desktop
that leaves the frame to the app, the menu bar is the title bar.
2026-11-08 21:41:59 -08:00
Dylan M. Taylor 96a8ae35d0 Merge pull request #174 from dotCooCoo/feat/self-updater
feat(ui): check for new releases and update the app from inside it
2026-11-09 00:15:33 -05:00
dotCooCoo d23d6c76f1 feat(ui): check for new releases and update the app from inside it
Add Help > Check for updates... (ui.help.checkForUpdates), a check at
startup, the update prompt and result dialog from craft-update, and the
Windows update helper entry point.

A copy of the app downloaded directly was never told about a new version.
Runs driven by --control or MATERIALCRAFT_NO_PREFS skip the startup check.
Shortcuts wait while the prompt or a modal result dialog is open. The
update code builds on desktop only; the web build is unchanged.
2026-11-08 20:25:11 -08:00
Chris Hassebrook d6c7f2126d Merge pull request #171 from storytold/162-standard-functionssbs-parity
Standard Functions Library Parity
2026-11-08 19:11:55 -05:00
chasse20 b1cef33336 Fix texture cleanup in native close test 2026-11-08 19:01:41 -05:00
chasse20 43d706f3d9 Merge main and align integration tests 2026-11-08 18:40:04 -05:00
chasse20 158e1c85e3 Fix graph editing and make undo configurable 2026-11-08 18:11:10 -05:00
chasse20 a0032d6ac2 Add SBS function library and Explorer graph editing 2026-11-08 17:25:08 -05:00
Chris Hassebrook 767dd65817 Merge pull request #168 from SteamSmith/fix/view3d-moving-edges
fix(ui): draw the moving 3D view with 2x2 rays, sized to a frame budget
2026-11-08 13:21:04 -05:00
SteamSmith 09bccc3a8c fix(ui): draw the moving 3D view with 2x2 rays and grow it to fit the frame budget
A moving frame was one ray per pixel at half size, so edges showed as visible
stair-steps until the full-quality frame landed. It now uses 2x2 rays and picks the
largest of four levels (half size 1 ray, half size 2x2, three-quarter 2x2, full 2x2)
whose last frame took under 32 ms, dropping a level when a frame goes over. The lowest
level is the previous frame, so a slow machine does no worse than before.
2026-11-08 12:38:24 -05:00
FredAppsandFredApps 8ba59822af ci: reduce repeated integration test compilation in platform gates (#163)
* ci: reduce integration test executables and skip unused tool install

* test: retain process isolation for language switching

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-08 11:42:57 +01:00
Chris Hassebrook 7019d44f95 Merge pull request #159 from storytold/158-create-helpful-pr-guidelines-doc
PR Review Guidelines Helper
2026-11-08 00:02:00 -05:00
chasse20 03bbe5eef3 Added helpful PR review guidelines doc to help keep things readable and friendly 2026-11-07 23:51:45 -05:00
Chris Hassebrook eb7d861965 Merge pull request #156 from storytold/144-sbs-based-nodes
Graph Node Instancing
2026-11-07 23:12:08 -05:00
chasse20 06c4881a58 Keep saved file paths canonical 2026-11-07 22:54:40 -05:00
chasse20 0c9321237c Fix startup path assertion 2026-11-07 19:13:51 -05:00
chasse20 82486ea477 Fix instance shortcuts and restore version 2026-11-07 18:42:00 -05:00
chasse20 570bc528a6 Add linked graph instances 2026-11-07 18:23:51 -05:00
chasse20 8101e8da68 Refine graph outputs and Explorer 2026-11-07 17:00:36 -05:00
chasse20 b99ca7f361 Improve function editing and link swaps 2026-11-07 15:49:40 -05:00
FredApps 6c387db41f Merge pull request #142 from eliets2/feat/mc-port-41-formats-bound-package-load-memory-check-image
Bound mesh vertex memory before collecting positions
2026-11-07 15:38:47 +01:00
eliets2 af2893e4ed Address review findings 2026-11-07 11:36:01 +02:00
eliets2 2a7ce968a6 Address remaining review requests 2026-11-07 11:17:08 +02:00
eliets2 d7878b30de Repair review branch integration 2026-11-07 10:49:50 +02:00
eliets2 611e2c690b Address review for pull request 142 2026-11-07 08:39:10 +02:00
eliets2 98af9a3dfd Address review findings 2026-11-07 08:39:10 +02:00
eliets2 4b6c02a83f Address remaining review requests 2026-11-07 08:39:10 +02:00
eliets2 c2e4b20cb0 Bound mesh vertex memory before collecting positions
Loading a mesh should fail with a package error instead of allocating unbounded vertex buffers first, matching the existing triangle limit intent.

Add a vertex-count bound checked while parsing OBJ and glTF positions so excess vertices are rejected before the full mesh is collected, with a regression test using an OBJ whose vertex count exceeds the bound but whose triangle count does not.

Test: obj_with_excess_vertices_is_rejected failed before the change and passes after.
2026-11-07 08:39:10 +02:00
Chris Hassebrook 0bfbbf1887 Merge pull request #127 from eliets2/feat/mc-port-99-reject-colliding-filenames-before-exporting-ma
Reject export filenames that already exist in the destination
2026-11-07 01:19:24 -05:00
Chris Hassebrook efb93a2a17 Merge pull request #130 from eliets2/feat/mc-port-86-fix-formats-choose-srgb-or-linear-when-reading
Decode material input bitmaps as linear for data usages
2026-11-07 01:18:20 -05:00
Chris Hassebrook 5cee091e62 Merge pull request #145 from Belligerently/fix/expose-input-unique-id
Let a parameter be exposed as a graph input on more than one node
2026-11-07 01:17:03 -05:00
Chris Hassebrook 38292f430b Merge pull request #131 from Belligerently/fix/dot-drag-area
Let dots be dragged from their body at any zoom
2026-11-07 01:12:48 -05:00
Chris Hassebrook 5047abf524 Merge pull request #132 from eliets2/feat/mc-port-78-fix-cook-catch-panics-in-the-cook-worker-and-i
Catch panics in cook worker and control commands
2026-11-07 01:12:05 -05:00
Chris Hassebrook 12ee6ab956 Merge pull request #128 from eliets2/feat/mc-port-65-fixed-heightmap
Honor displacement depth in headless renders without HQ
2026-11-07 01:10:56 -05:00
Chris Hassebrook b0e2dcdffa Merge pull request #134 from eliets2/feat/mc-port-63-make-round-parameter-values-reachable-by-dragg
Snap toolbar slider drags to round values
2026-11-07 01:07:29 -05:00
Chris Hassebrook 00aefb4a37 Merge pull request #136 from Belligerently/fix/dodge-burn-edges
Keep black and white backgrounds in Color dodge and Color burn
2026-11-07 01:05:29 -05:00
Belligerently 3be36016d2 Let a parameter be exposed as a graph input on more than one node
The properties panel's "Expose as graph input" sent the bare parameter
id as the new input's id, so exposing Opacity on a second Blend node
failed with "an input is already called `opacity`". graph.exposed.add
now accepts a bound input without an id and names it after the
parameter, kept unique (opacity, opacity_1, ...), and the menu relies on
that. An explicit id must still be free.
2026-11-06 23:42:57 -05:00
eliets2 c1dcac31b8 Address review findings 2026-11-07 01:46:04 +02:00
eliets2 ccfb7b3022 Format the files this pull request changes 2026-11-07 00:16:45 +02:00
eliets2 19e6bb4b65 Address review for pull request 134 2026-11-07 00:12:33 +02:00
eliets2 78db9092cc Address review for pull request 132 2026-11-07 00:07:05 +02:00
Belligerently be871550c0 Keep black and white backgrounds in Color dodge and Color burn
The W3C color-dodge formula keeps a black background black even under a
white foreground, and color-burn keeps a white background white even
under a black foreground. blend_channel checked the foreground first, so
both edge cases came out inverted.

Fixes #135
2026-11-06 13:04:13 -05:00
eliets2 446cf794cf Snap toolbar slider drags to round values
The main parameter slider already snaps to round values, but the toolbar slider does not, so the same drag cannot land on exact values there.

Apply the same aim-radius smart_aim calculation used by slider to bar_slider, and add a drag test through the existing slider harness that aims near a round value on a bar slider.

Test: bar_slider_drag_reaches_exact_round_values failed before the change and passes after.
2026-11-06 19:27:34 +02:00
Belligerently 7768559e9a Let dots be dragged from their body at any zoom
A dot is 14 units wide with a port on each edge, and each port's 9 px
hit circle covered the whole dot, so pressing it started a wire (or did
nothing) instead of moving it unless the view was zoomed in. The dot's
body now wins over its ports, and its grab area keeps a 16 px minimum
on screen. Wires still start from just outside the dot.

Fixes #100
2026-11-06 11:43:11 -05:00
eliets2 07db78c7e2 Catch panics in cook worker and control commands
A panicking cook or control command should become an error reply and toast, not crash the app and lose unsaved work.

Make guard report a non-empty unknown-panic message for non-string payloads, and wrap control dispatch and session.inspect cooking with guard so panics are caught in the worker, app, and control paths.

Test: guard_reports_unknown_panic_payload_instead_of_empty failed before the change and passes after.
2026-11-06 18:34:43 +02:00
eliets2 e6f24fcb74 Decode material input bitmaps as linear for data usages
Data maps read as sRGB get the wrong values when a material is exported, shifting normals and scalar maps.

Choose the decode color space from the input node's usage (linear for non-sRGB usages, sRGB otherwise) when reading input bitmaps in export_material, with a regression test using a mid-gray data input.

Test: export_material_decodes_data_inputs_as_linear failed before the change and passes after.
2026-11-06 17:59:05 +02:00
eliets2 d01a28bb20 Reject export filenames that already exist in the destination
An export that collides with a file already in the destination currently overwrites it without warning, losing the existing file. Rejecting the collision before writing protects existing files and makes the failure explicit.

Check every target path in the destination directory before creating or writing any output, and return a file.export error naming the colliding filename if one already exists. Add a regression test that places a sentinel file at an output name, runs file.export with unique identifiers, and asserts the export fails and the sentinel is unchanged.

Test: export_rejects_existing_file_in_destination_before_writing failed before the change and passes after.
2026-11-06 17:51:19 +02:00
eliets2 776eb419e4 Honor displacement depth in headless renders without HQ
Callers setting a displacement depth expect the height relief to change, but today it is silently ignored unless the HQ flag is also set.

Use the requested displacement depth whenever it is provided, falling back to the view height_scale only when it is absent, and add a regression test rendering with and without displacement and without hq.

Test: render_displacement_applies_without_hq failed before the change and passes after.
2026-11-06 17:47:35 +02:00