Commit Graph
252 Commits
Author SHA1 Message Date
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
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
3d399dd1a5 Keep typed graph name and attribute text across frames (#124)
* Keep typed graph name and attribute text across frames

Typing a graph name or attribute currently loses the text between frames, so the edit never reaches the engine command on focus loss. Persisting the draft across frames, as the slider and preset name already do, makes the edit commit correctly.

Store the in-progress graph name and attribute text in temporary UI data while editing, like presets_bar does, and commit the stored text on lost_focus. Add a harness test that types a new graph name across several frames, moves focus away, and asserts the renamed graph.

Test: graph_name_typed_across_frames_commits_on_focus_loss failed before the change and passes after.

* Graph properties: a draft field's id salt is a string

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:23:13 +01:00
d560df3392 Restore modified flag when undoing to saved state (#112)
* Restore modified flag when undoing to saved state

Undoing every edit should return the session to its saved, unmodified state so the unsaved-work prompt is not shown spuriously.

Make undo and redo preserve the restored snapshot's modified flag while still marking the graph dirty for cooking, and add a regression test that edits from a clean session and undoes to assert modified is false.

Test: undo_to_unmodified_state_clears_modified_flag failed before the change and passes after.

* Tests: add a node that exists on main

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:20:32 +01:00
0e160cd53a Fix 4K preview texture refresh in 2D view (#122)
Users switching to 4K previews saw stale low-resolution textures in the 2D view.

Include image dimensions in the texture cache key so a size change reloads the texture at the new resolution.

Test: four_k_preview_refreshes_texture_after_size_change failed before the change and passes after.

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-06 10:10:44 +01:00
a0180da9b6 Reply to non-UTF8 lines on the control channel (#118)
Clients cannot tell a refused non-UTF8 request from a dropped connection, unlike malformed JSON which gets an explicit error reply.

Make the TCP control servers reply with an error for non-UTF8 lines, closing before auth and continuing after auth like bad JSON.

Test: non_utf8_line_before_auth_gets_refusal_reply failed before the change and passes after.

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-06 10:10:38 +01:00
d05d2bf0a9 Clamp enum and degenerate-range parameters to hard limits (#115)
A hostile file or binding could supply an out-of-range enum or degenerate-range numeric value that reaches a cook unclamped, breaking the hard-limits guarantee for node parameters.

Make clamp_params bound enum values even with no options and bound numeric values even when min is not below max, using the same hard-span limits as other parameters.

Test: clamp_params_bounds_enum_without_options failed before the change and passes after.

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:10:32 +01:00
c479765c01 Reject non-finite glTF normals before normalizing them (#114)
A glTF file with NaN or infinite normals currently loads as a mesh with zero normals instead of being rejected like non-finite positions, UVs and OBJ normals.

Check raw glTF normals for finiteness before transforming them and return an error for non-finite values, matching the existing finish() checks.

Test: gltf_non_finite_normals_are_rejected failed before the change and passes after.

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-06 10:10:27 +01:00
0ce7a6aafb Hash bound input-image resources into graph instance cache keys (#110)
* Hash bound input-image resources into graph instance cache keys

A graph instance can show a stale preview image after its bound bitmap resource is replaced, because the instance cache key never changes. Hashing those resources makes the instance re-cook when the bitmap changes.

Include the content hashes of resources referenced by graph.input_images (and their linear flags) in graph_tree_hash, and add a regression test that cooks an instance, replaces the bound resource bytes, and asserts the new image is cooked instead of the cached one.

Test: bound_input_image_resource_change_recooks_instance failed before the change and passes after.

* Address review for pull request 110

---------

Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:10:21 +01:00
chasse20 74ff4a9dc3 Fix debug UI tests and remove redundant coverage 2026-11-06 01:22:07 -05:00
chasse20 2adbdf4aab Merge main while preserving native graph architecture 2026-11-06 00:58:56 -05:00
chasse20 fe88ee5c4d Unify graph editors and optimize material workflows 2026-11-06 00:13:10 -05:00
Belligerently a1af5a5cc8 Handle platform clipboard events for node shortcuts 2026-11-05 19:05:00 -05:00
chasse20 d318484b41 Checkpoint native SBS primitive workflow
Replace the legacy Rust procedural library with clean-room native primitives, typed function execution and FX-Map graphs. Save supported content as native SBS and organize the model, evaluators, codecs and editors into focused modules.

Add shared graph editing behavior, flat filtered node menus, frame and comment editing, named Explorer outputs and an original atomic sample. Document the tested scope and remaining interoperability work.
2026-11-05 18:23:06 -05:00
FredApps 96af836440 Memoize immutable input fingerprints safely 2026-11-05 22:35:45 +01:00
FredApps 9c08a25bb6 Fix preview sizing and input image cache keys 2026-11-05 22:07:18 +01:00
FredApps 56407b9470 Revert the batch rollback and restore prior main 2026-11-05 22:04:58 +01:00
Rafael Mendes a7b9194820 Revert reviewed PR batch and cancel 0.1.3 preparation
Restore tracked files to 91bb53f07a, immediately before the batch, at the maintainer request. Preserve the existing history and earlier work, including PR #38. Revert the 50 reviewed PR merges and the version bump in 441092c. The published 0.1.2 release is unchanged.
2026-11-05 17:48:14 -03:00
Rafael Mendes 6fc3c65a26 Reject case-insensitive export collisions before writing files 2026-11-05 16:01:19 -03:00
Rafael Mendes d4beea261e Merge remote-tracking branch 'origin/pr/99' into review/pr-99 2026-11-05 15:53:09 -03:00
Rafael Mendes 24601325ca Merge remote-tracking branch 'origin/pr/98' into review/pr-98 2026-11-05 15:53:09 -03:00
Rafael Mendes 288d534944 Merge remote-tracking branch 'origin/pr/97' into review/pr-97 2026-11-05 15:53:09 -03:00
Rafael Mendes 37a46b504d Merge remote-tracking branch 'origin/pr/96' into review/pr-96 2026-11-05 15:53:09 -03:00
Rafael Mendes 697a803017 Merge remote-tracking branch 'origin/pr/95' into review/pr-95 2026-11-05 15:53:09 -03:00
Rafael Mendes 7abc44eb0d Merge remote-tracking branch 'origin/pr/94' into review/pr-94 2026-11-05 15:51:22 -03:00
Rafael Mendes 0a4ef6f039 Keep failed command groups atomic and preserve redo history 2026-11-05 15:51:15 -03:00
Rafael Mendes 9b8eb0e783 Keep undo boundaries and restore failed edit state across guarded commands 2026-11-05 15:37:25 -03:00
Rafael Mendes 65e817fd17 Keep unsaved confirmation bound to its original action and package bytes 2026-11-05 15:29:17 -03:00
Rafael Mendes 9fa360bb69 Preserve decoder bounds and create atomic save files exclusively 2026-11-05 15:25:17 -03:00
Rafael Mendes f1cd7f4387 Stream mesh indices and stop before exceeding the triangle budget 2026-11-05 15:22:47 -03:00
Rafael Mendes 3fa7540b61 Merge remote-tracking branch 'review/latest87' into review/pr-87 2026-11-05 15:21:45 -03:00
Rafael Mendes cc9a5b3c82 Keep bitmap color-space requests unambiguous and inspectable 2026-11-05 15:19:39 -03:00
Rafael Mendes 30621629e8 Preserve shared package resources and enforce read and write size budgets 2026-11-05 15:17:30 -03:00
Rafael Mendes 0a561fa681 Integrate normal-to-height solver with the complete filter regression suite 2026-11-05 15:08:06 -03:00
Belligerently a3cbbd8e9a Reject colliding filenames before exporting maps 2026-11-05 13:05:36 -05:00