The dialog is shown for any error run_native returns, including one after the
window was up, so "could not start its window" and "updating the graphics
driver usually fixes this" overstated what is known. From review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- Add full Arabic translation table (363 entries) in crates/ui-egui/src/i18n/ar.rs
- Implement live language switching, locale detection and RTL support in crates/ui-egui/src/i18n.rs
- Add system font fallbacks for Arabic (Segoe UI, SF Arabic, Noto Sans Arabic) in crates/ui-egui/src/fonts.rs
- Add language selector combo box to Preferences dialog in crates/ui-egui/src/windows.rs
- Add language preference persistence in crates/ui-egui/src/state.rs
- Update docs/localization-parity.md tracking Arabic support
Without a usable GPU, driver or desktop, no graphics backend can create a
window and MaterialCraft exited with code 1 and nothing on screen.
The reason now goes to the log and to an error dialog, as FilmCraft does
since 0.14.0 (which unstuck it on WinGet).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cooker sets the running cook's cancel flag when the graph changes again and starts the
new cook at once; eval::cook takes &Mutex<Cache> and locks per lookup/insert.
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.
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.
The app wrote its control token to the temp folder with default permissions from a
hash-based generator, compared it with ==, spawned unlimited threads and let an
unauthenticated client hold a connection for 10 minutes. The shared token file was opened
with create+truncate, which follows a planted symlink.
- Token files are created new (remove, then O_EXCL) with mode 0600; clients only read a
regular, owner-only, non-symlink file.
- The app's control server uses the shared security module: OS-random token, constant-time
compare, bounded lines, at most 16 connections, one auth attempt within 10 s, close on
malformed JSON before auth.
- serve --port and the app bind before writing the token file.
Ported from TextureCraft 5a065c1 and 836e3f2.
Move the Levels screenshot's ATTRIBUTION row, the README mention, the
architecture note and the snapshot scene to places #36 does not touch, so
the two pull requests merge in either order without conflicts. No change
in behavior; the snapshot scene now runs last.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Selecting a Levels node now shows a visual editor above its sliders: a
histogram of the node's input (256 bins; red, green and blue overlaid for a
color input; scaled to the tallest bin between pure black and white) with
the clipped ranges shaded and the levels transfer curve on top, draggable
input low/mid/high handles under it and output low/high handles under a
black-to-white bar.
Fixes in how Levels is edited: Level in mid is relative to the input range,
and its handle now sits where it acts and moves with the range; the input
low and high handles cannot cross. Parameters bound to inputs or driven by
functions keep their handles locked. Every drag is a graph.node.param
command, one undo step per handle. levels_fn no longer propagates NaN.
Tests cover the histogram, the handle constraints and the remap math; the
snapshots UI test renders the editor. Documented in docs/levels-editor.md.
Clean-room implementation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
A single click only changed the selection, and the 2D view prefers a node
shown with a double-click, an output port or "View in 2D view" over the
selection, so after any of those, clicks never changed the view until the
graph was switched. A click that leaves a node selected now shows it; a
deselecting Ctrl+click or a drag does not, and the node already shown keeps
its chosen output port.
Fixes#10
Signed bundles get no OCI update source until LINUX_OCI_SIGNATURES_READY
is set, and only a stable release-branch build moves the stable OCI tag,
as storytold/craft-common-actions' scaffold-flatpak-oci.sh now does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Pass LINUX_SIGNING_KEY to the shared release workflow (storytold/craft-common-actions#129),
which signs the rpm, deb, Arch package, AppImage, tarballs, Flatpak OCI image and SHA256SUMS.txt,
and scaffold flatpak-bundle.sh so a release signs the Flatpak bundle's commit and embeds the key,
with the bundle's origin updating from the ArtCraft OCI repository.
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.
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.
The FreeBSD draft step redirected into SHA256SUMS.txt before the glob expanded, so
the file listed itself with the hash of an empty file and sha256sum -c failed on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Private repos get 2-core/7 GB standard runners, which can't hold the 12 GB
FreeBSD VM, so the FreeBSD jobs failed and blocked the draft. Turn it back
on once the repo is public.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A private repo's ubuntu-latest has about 7 GB, and the shared workflows start a
12 GB FreeBSD VM, so QEMU fails at startup. The shared workflows have no runner
input, so release.yml turns off their FreeBSD job and runs its own copy on
github-ubuntu-16core, then adds the archives and checksums to the draft release.
freebsd.yml would fail the same way, so it is manual-only until the repo is
public.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>