Commit Graph
83 Commits
Author SHA1 Message Date
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
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 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
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
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
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 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 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 cc9a5b3c82 Keep bitmap color-space requests unambiguous and inspectable 2026-11-05 15:19:39 -03:00
Belligerently a3cbbd8e9a Reject colliding filenames before exporting maps 2026-11-05 13:05:36 -05:00
Rafael Mendes cc1ecfd476 Merge pull request #77 from SteamSmith/fix/stale-cook-result
fix(cook): drop a stale background cook that a newer sync cook superseded
2026-11-05 14:50:18 -03:00
Belligerently 6ac573dab9 Clear parameter drivers when restoring defaults 2026-11-05 12:44:34 -05:00
Rafael Mendes 8c6086c04c Merge branch 'fix/stale-cook-result' of https://github.com/SteamSmith/materialcraft into review/pr-77 2026-11-05 14:43:06 -03:00
Rafael Mendes d821e8921b Remove unused mutable test closure 2026-11-05 14:38:24 -03:00
Belligerently 868346ecae Preserve graph seed when grouping selected nodes 2026-11-05 12:37:55 -05:00
Rafael Mendes 3dd0705b54 Merge branch 'fix/graph-delete-and-sample-overflow' of https://github.com/SteamSmith/materialcraft into review/pr-73 2026-11-05 14:36:45 -03:00
Rafael Mendes cd4c2dfa43 Merge reviewed preview changes and retain normal convention controls 2026-11-05 14:35:58 -03:00
Belligerently 5b3a081217 Use declared input order when deleting and relinking nodes 2026-11-05 12:24:12 -05:00
SteamSmithandClaude Sonnet 5.5 e0227222d9 chore(merge): bring fix/undo-merge-ends up to date with main
Kept the per-request end_merge calls and upstream's preview-size preference sync in
command.run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 12:23:31 -05:00
SteamSmithandClaude Sonnet 5.5 a54c16e42f chore(merge): bring fix/compound-undo-entries up to date with main
Kept both test modules in graph_view.rs and both session fields (undo group and the
hash-keyed decoded-image memo).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 12:16:12 -05:00
Belligerently 2a88e98d24 Validate view settings before applying partial changes 2026-11-05 12:13:52 -05:00
Rafael Mendes cc7c6b0192 Merge pull request #70 from storytold/fix/18-sbs-parameter-functions
Import numeric parameter expressions from SBS XML
2026-11-05 14:12:16 -03:00
SteamSmithandClaude Sonnet 5.5 47b69c0f3a chore(merge): bring fix/bitmap-colour-space up to date with main
Upstream's ResourceBytes and decode limits kept; decode keeps the linear flag, and the
decoded-image memo is now keyed by (content hash, linear) so sRGB and data reads of the
same file don't collide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 12:10:10 -05:00
Rafael Mendes 99f2932c09 Merge branch 'fix/18-sbs-parameter-functions' of https://github.com/storytold/materialcraft into review/pr-70 2026-11-05 14:09:26 -03:00
Rafael Mendes 977f6c1f24 Merge pull request #69 from storytold/fix/18-function-math
Add missing base-two and Cartesian function primitives
2026-11-05 14:09:24 -03:00
Rafael Mendes cee6a7a38f Merge branch 'fix/18-function-math' of https://github.com/storytold/materialcraft into review/pr-69 2026-11-05 14:07:01 -03:00
SteamSmithandClaude Sonnet 5.5 8fe0e0cc4f chore(merge): bring fix/stale-cook-result up to date with main
Kept upstream's cancellation flag and the epoch check: a stale snapshot is dropped
if cancelled, an edit is pending, or a newer synchronous cook ran.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 11:54:01 -05:00
Rafael Mendes 6b6f8728c2 Bound relief workers and integrate real height previews 2026-11-05 12:25:44 -03:00
Rafael Mendes 96574eaba7 Integrate MCP material export with the current control protocol 2026-11-05 11:35:48 -03:00
Rafael Mendes 4897dab15d Merge branch 'review/pr-43' into review/pr-44 2026-11-05 11:16:47 -03:00
Rafael Mendes a026ddaaf9 Integrate cache keys with SBS and bound graph traversal 2026-11-05 11:02:15 -03:00
Simon Hull e39a227ca1 Merge commit 'e153b8b' into advisor/005-cook-only-what-changed 2026-11-05 07:52:55 -06:00
Simon Hull e153b8b603 Merge remote-tracking branch 'origin/main' into advisor/004-correct-cache-keys 2026-11-05 07:52:44 -06:00
Rafael Mendes a7def58061 Guard export dimensions and verify graph context export 2026-11-05 10:19:26 -03:00
Rafael Mendes 854764bddb Merge remote-tracking branch 'origin/main' into review/pr-25 2026-11-05 10:16:37 -03:00
SteamSmithandClaude Sonnet 5.5 105bfd5a4a fix(engine): record multi-command gestures as one undo entry
Rewiring a dragged link (Disconnect + Connect), dragging a frame (Edit
frame + Move nodes) and Import bitmap (import + add node + set param)
each made 2-3 history entries. Add Session::begin_group/end_group and
Session::group: edits inside a group share one snapshot, an untouched
group records nothing, and a failing group() restores everything. The
UI uses begin/end_group around those gestures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 07:20:50 -05:00
SteamSmithandClaude Sonnet 5.5 ee903c96ad fix(formats): choose sRGB or linear when reading bitmaps
decode() sRGB-decoded every 8/16-bit color bitmap, so an RGB normal map
(0.5, 0.5, 1) became (0.214, 0.214, 1). decode now takes a linear flag. The
Bitmap node gets a Color space choice (sRGB by default, so existing files cook
the same) and graph input preview images can be bound as linear data maps
(graph.input.bind linear: true, stored in input_images_linear).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:58:19 -05:00
SteamSmithandClaude Sonnet 5.5 858dde47a1 fix(cook): drop a stale background cook that a newer sync cook superseded
A background cook of version A could land after session.inspect had
synchronously cooked version B and cleared dirty, overwriting B's results
with no recook. Sessions now count synchronous cooks (cook_epoch) and the
cooker discards a result whose start epoch is out of date.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:57:43 -05:00