Commit Graph
67 Commits
Author SHA1 Message Date
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
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
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
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
SteamSmithandClaude Sonnet 5.5 0546dd58c6 fix(engine): end undo merge runs at gesture and request boundaries
merge_key was cleared only by edit/undo/redo/reset_history, so two drags
of one slider, two "New random seed" clicks and two MCP/control
node_param calls collapsed into one undo entry. Add Session::end_merge,
call it on pointer release and around each control/MCP command, and
restore the session when a merged edit fails.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:57:14 -05:00
SteamSmithandClaude Sonnet 5.5 a6c7fd46f2 fix(review): keep the open graph open after deleting an earlier one; clamp huge sample coordinates
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:39:22 -05:00
Rafael Mendes 821c7172b5 Add DirectX normal-map interpretation to the 3D view 2026-11-05 00:04:50 -03:00
PiJellyPin 8bdae1157d Fixed Heightmap 2026-11-05 02:38:04 +01:00
Rafael Mendes 6a249c66ff Merge remote-tracking branch 'origin/main' into feat/alpha-3d-and-wire-editing
# Conflicts:
#	README.md
2026-11-04 20:11:35 -03:00
AndreIsraelAO 3947e3c6f5 Merge main into feat/22-graph-context-export 2026-11-04 17:53:40 -03:00
PiJellyPin 66fdba878f Testing a bunch of stuff 2026-11-04 08:47:10 +01:00
Chris Hassebrook d62ca9ac53 Merge branch 'main' into 49-change-to-sbs-instead-of-mcraft 2026-11-04 01:11:49 -05:00
PiJellyPin 6310230ecd Load sbs files
save, load etc.. for sbs files
2026-11-04 07:03:54 +01:00
Zachary Aflalo c97f92abff Start desktop and browser sessions with an empty graph (#29) 2026-11-04 06:17:40 +01:00
A-Gift-Of-FlameandClaude Sonnet 5.5 ef8ab335c2 feat(automation): material_export MCP tool for portable .mcmat
Sandboxed agents could not hand a material to TextureCraft: the workspace
sandbox refuses `file.*` commands and there was no MCP tool for `.mcmat`.

Add `material_export {path, graph?, size?, values?}` (RPC method
`material.export`). It cooks the graph through the same engine code as
`file.exportMaterial` and writes the `.mcmat` only through
AuthorizedWorkspace (cap-std, `--write-root`): no write root, a malformed
path or an escape is an error, the parent folder must exist, and the file is
capped at what `package_open` may read back. Bridge mode refuses it like the
other path tools. The engine gets a shared `material_request` helper so the
command and the tool parse graph/size/values identically.

Tests: file written and readable, bad requests, denied without a write root
(Denied and read-only workspace), path escapes (`..`, absolute, backslash,
drive, symlink) and the MCP tool end to end. docs/control-protocol.md lists
the method and tool.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 23:55:13 +01:00