Commit Graph
32 Commits
Author SHA1 Message Date
chasse20 85e0bf9247 Add parameter-owned function graphs 2026-11-10 04:07:54 -05:00
chasse20 b99ca7f361 Improve function editing and link swaps 2026-11-07 15:49:40 -05: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 2adbdf4aab Merge main while preserving native graph architecture 2026-11-06 00:58:56 -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
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 6b6f8728c2 Bound relief workers and integrate real height previews 2026-11-05 12:25:44 -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
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
PiJellyPin 6310230ecd Load sbs files
save, load etc.. for sbs files
2026-11-04 07:03:54 +01:00
Simon Hull 76684bc3a8 Cook: format and lint fixes 2026-11-03 14:38:35 -06:00
Simon Hull b991f4fb11 Eval: key nodes only on the graph inputs they read
An exposed-input change re-cooked 21 of 21 nodes in rusty_metal; now 1 (the reader).
Input-change cook (noisy, concurrent load): 1024 ~320 ms -> ~0.1 ms, 2048 ~1500 ms -> ~0.2 ms.
2026-11-03 14:30:34 -06:00
Simon Hull c4d7443218 Eval: key resources on content and graph instances on their whole sub-graph tree
Resources carry a content hash (ResourceBytes); the decoder memo is keyed on it and pruned.
Graphs that use themselves, directly or through other instanced graphs, give an explicit error.
2026-11-03 14:19:15 -06:00
Rafael MendesandClaude Opus 5.5 29dee321d9 feat(graph): select several wires and swap their sources with X
Shift+click adds a wire to the selection and Ctrl+click toggles it. With two
or more wires selected, X swaps where they come from: two wires trade
sources, more reverse them in target-node and input order, so selecting a
Blend node's foreground and background wires and pressing X swaps the two
layers. The wires stay selected, so X again swaps back. Delete and
Backspace remove every selected wire in one undo step, and the wire menu
gains Swap selected links and Delete selected links.

New commands graph.wire.swap and graph.wire.delete take
{wires: [{to, toPort}, ...]}; a swap that would make a cycle is refused and
changes nothing. Engine and UI tests (real clicks on a Blend node) cover
both; docs/wires-and-alpha.md documents the gestures, the ordering rule and
the commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 14:43:32 -03:00
Rafael MendesandClaude Opus 5.5 8f4dd5b6c1 feat: alpha in the 3D view; select, delete and reroute wires
3D view: the material's alpha (the Opacity output, else the Base color's
alpha channel) now makes the mesh see-through. Rays composite front to back
through up to eight transparent layers and back faces shade toward the
viewer, so the inside of a cut-out mesh and the environment show through.
view.3d takes `transparency` (default on) and `alphaView`; the Display menu
and a bottom-bar button toggle an unlit view of the alpha channel.

Graph editor: click a wire to select it (Delete or Backspace removes it),
drag a wire to pull a reroute Dot out of it, double-click a wire to drop a
Dot there, right-click a wire for Insert reroute dot and Delete link. The
new graph.wire.insertDot command splits a wire with a Dot in one undo step.

Docs: docs/wires-and-alpha.md (gestures, commands, rendering, tests) with
two snapshot screenshots, plus architecture, parity, control protocol,
README and ATTRIBUTION updates.

Clean-room implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 14:32:48 -03:00
AndreIsraelAO e816ad75bb Keep export proportions and expose size in the CLI and MCP
size is now the larger side in pixels and the other side keeps its
proportion; 0 means the graph's size. Adds --size to the CLI export,
size to the MCP outputs_export, and the docs line. The resolution combo
shows the graph's real size.

Refs #22
2026-11-03 07:29:07 -03:00
AndreIsraelAO 3a104b4e72 Add a resolution option to Export outputs
Adds size to file.export and a Resolution selector to the export window.
Only open the export window when the graph opened.

Refs #22
2026-11-03 00:26:12 -03:00
ljkx f8f8d8c2c0 3D view: make the pan limit and speed preferences
Review: no hardcoded limit. The two MAX_TARGET constants are gone.

- Engine: CameraPrefs { pan_limit, pan_speed } with the defaults in one
  place (Default: 5 mesh radii, speed 1), sanitized against NaN and
  negative values. Session::set_camera_prefs stores them and pulls the
  orbit target back inside a lowered limit; view.3d clamps targets to it;
  session.inspect shows it.
- App: Prefs.camera persists with the other preferences (older saved
  preferences load the defaults), apply_prefs pushes it into the session,
  and Edit > Preferences has "3D pan limit" and "3D pan speed" sliders.
  The drag uses the pan speed.
- Renderer: no limit of its own. camera() falls back to the scene center
  for a non-finite target and pan() returns the unbounded offset.
2026-11-03 00:28:44 +01:00
ljkx f786a2d4c3 3D view: pan the camera with Alt+drag or middle-drag
The 3D view could only orbit around the mesh center and zoom, so there was
no way to look at an off-center part of a mesh up close.

- View3d gains `target`, the orbit point's offset from the mesh center in
  mesh radii (world axes, so orbiting after a pan turns around the new
  point). `view.3d {target: [x, y, z]}` sets it, validated before anything
  changes and clamped to 5 radii; view.3d.reset clears it.
- The renderer orbits around the offset target, and `pan` turns a drag
  (in view heights) into a new target so the mesh follows the pointer.
- Alt+drag or middle-drag pans in the 3D view, like the graph. Double-click
  and the Camera presets recenter. The headless render honours the target.
2026-11-02 20:30:01 +01:00
bflatasticandClaude Opus 5.5 53ab0f2d6a Cross-app materials: .mcmat portable materials for TextureCraft
- formats: .mcmat (zip: material.json manifest, maps/<usage>.png, source.mcraft) with
  read/write and caps; color usages 8-bit sRGB, data maps 16-bit linear
- engine: file.exportMaterial {path, size?, values?, inputs?}, file.sendToTextureCraft
  (TextureCraft's library folder), graph.input.bind/unbind; file.open reads .mcmat
- core/eval: Graph::input_images preview images for input nodes (mesh maps from
  TextureCraft); caller images win; grayscale inputs convert to gray
- ui: File > Export material..., File > Send to TextureCraft, Open accepts .mcmat,
  input previews in the graph properties
- docs: control protocol (portable materials), file formats, gaps, parity ≈ 67%,
  roadmap, architecture, AGENTS convention for shared formats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:06:09 +07:00
bflatasticandClaude Opus 5.5 80f4977023 Dynamic parameters, graph presets and one shared input editor
Parameters can be driven by function graphs evaluated against graph inputs
(graph.node.function); graphs store input presets (graph.preset.*). Graph
inputs and graph-instance parameters share one editor for floats, ints,
bools, enums and colors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 04:51:01 +07:00
bflatasticandClaude Opus 5.5 6e952a9a10 Node engine: document model, image buffers, 120 nodes, cached graph cooking, packages, session and commands
A clean-room, pure-Rust foundation for MaterialCraft's node-based material
authoring: the package/graph/node model, float image planes, the node
library (atomic nodes, tileable noises, patterns, filters, PBR utilities,
function graphs for the pixel processor), a content-addressed cooking cache,
.mcraft packages and texture export, and the command-driven session with
snapshot undo. Infrastructure (xtask, CI, packaging) copied from TextureCraft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 02:58:46 +07:00