diff --git a/AGENTS.md b/AGENTS.md index 19ce8f5d..812eeef3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,8 +11,7 @@ The product name is always written **MaterialCraft** (`{Function}Craft` in Pasca siblings PhotoCraft, VectorCraft, FilmCraft, LightCraft, PdfCraft, EffectCraft, DesignCraft, TextureCraft) in user-facing text: UI, window titles, About, installers, release names, docs prose. Machine names stay lowercase: crates (`materialcraft-*`), binaries, file names, ids -(`ai.storyteller.materialcraft`). The main project format is SBS (`.sbs`); the older native -package extension `.mcraft` is still read and written. +(`ai.storyteller.materialcraft`). The project format is SBS (`.sbs`). Legacy package compatibility is not required. Standards and learnings shared across the crafting apps live in `../craftrules` (checked out next to this repo, or `storytold/craftrules`). Read its `AGENTS.md` at the start of a session, follow its @@ -41,8 +40,8 @@ file first, then `docs/`. ```text crates/ core image geom L0 document model (package, graphs, nodes, values, function graphs); float images; meshes, BVH, camera - nodes L1 the node library: definitions + CPU cooks (atomic nodes, noises, patterns, filters, PBR utilities, function evaluator) - eval formats L2 graph cooking (topological order, sizes, content-addressed cache, sub-graphs); .sbs and .mcraft packages, bitmaps, texture export + nodes L1 the node library: native primitive definitions + CPU cooks, function evaluator and pattern graphs + eval formats L2 graph cooking (topological order, sizes, content-addressed cache, sub-graphs); native .sbs packages, bitmaps, texture export engine render L3 Session + command registry (every action is a command), inspect, samples; the 3D preview renderer (CPU PBR + IBL) automation L4 MCP server + headless JSON-lines RPC + bridge to the running app ui-egui L5 egui shell (thin: every edit goes through engine commands) @@ -98,7 +97,7 @@ and simplex gradient noise, Worley/cellular noise, fractal sums, Gaussian and bo Felzenszwalb–Huttenlocher distance transforms, Sobel/central-difference normals, reoriented normal mapping, HSL, levels, monotone cubic curves, W3C blend modes, GGX/Smith/Schlick PBR, split-sum IBL, ACES fitted tone mapping). Never copy proprietary code, shaders, node implementations or presets. -SBS packages are the main project format (issue #49): `crates/formats/src/sbs.rs` reads and writes +SBS packages are the main project format (issue #49): `crates/formats/src/sbs/` reads and writes them with MaterialCraft's own code, written from the format's public documentation and sample files, never from another implementation. Always describe MaterialCraft as a clean-room implementation, in code, docs and commits. diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 80e577f3..631c6cf0 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -31,7 +31,8 @@ images, materials, sample graphs, presets, environments) may ever be added. | `docs/images/materialcraft-materials.png` | README render: eight sample materials on spheres | MaterialCraft contributors | `materialcraft-cli render --scene sphere --full --hq` of the templates, eight renders in a grid | MIT OR Apache-2.0 | | `docs/images/materialcraft-levels-editor.png` | Docs screenshot: the Levels editor with the input histogram | MaterialCraft contributors | Offscreen render of MaterialCraft's UI (`crates/ui-egui/tests/snapshot.rs`) | MIT OR Apache-2.0 | | `docs/brand/artcraft-*.svg`, `docs/brand/artcraft-*.png` | ArtCraft logo and mark | ArtCraft Team | storytold/craftrules `assets/brand/` | ArtCraft brand terms, not open source ([`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt)) | -| `crates/nodes/src/text.rs` (`GLYPHS`) | Single-stroke vector font of the Text node (A–Z, a–z, 0–9, punctuation) | MaterialCraft contributors | Original, designed as stroke data in code | MIT OR Apache-2.0 | +| `crates/nodes/src/atomic/text.rs` (`GLYPHS`) | Single-stroke vector font of the Text node (A–Z, a–z, 0–9, punctuation) | MaterialCraft contributors | Original, designed as stroke data in code | MIT OR Apache-2.0 | +| `examples/atomic_sample.sbs` | Atomic sample graph | MaterialCraft contributors | Original graph built by `crates/engine/src/atomic_sample.rs` | MIT OR Apache-2.0 | ## Third-party assets compiled into the binary @@ -44,10 +45,10 @@ These come from Rust crate dependencies (not files in this repository) and keep ## Procedural content (no asset files) -The node library's noises and patterns (`crates/nodes`), the sample materials and graph templates +The node library's primitives (`crates/nodes`), the sample materials and graph templates (`crates/engine/src/samples.rs`), the 3D view's environments (`crates/render/src/ibl.rs`, procedural HDR skies and soft boxes), the built-in meshes (`crates/geom/src/primitives.rs`), the library's node -previews (`crates/ui-egui/src/thumbs.rs`, each node cooked on sample noise) and the New graph +previews (`crates/ui-egui/src/thumbs.rs`, each node cooked on sample waves) and the New graph dialog's template spheres (`crates/ui-egui/src/windows.rs`) are generated in code by MaterialCraft contributors (MIT OR Apache-2.0). None of them is derived from another product's presets, shaders, materials, sample graphs or images. diff --git a/Cargo.lock b/Cargo.lock index 6b91bdb4..eaec423d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,6 +214,12 @@ dependencies = [ "x11rb", ] +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + [[package]] name = "arrayvec" version = "0.7.8" @@ -875,6 +881,12 @@ dependencies = [ "syn 3.0.9", ] +[[package]] +name = "data-url" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" + [[package]] name = "derive_arbitrary" version = "1.5.0" @@ -1327,6 +1339,12 @@ dependencies = [ "zlib-rs", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + [[package]] name = "foldhash" version = "0.1.5" @@ -2013,6 +2031,12 @@ dependencies = [ "quick-error", ] +[[package]] +name = "imagesize" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e54e57b4c48b40f7aec75635392b12b3421fa26fe8b4332e63138ed278459c" + [[package]] name = "indexmap" version = "2.14.2" @@ -2399,7 +2423,8 @@ dependencies = [ "materialcraft-geom", "materialcraft-image", "materialcraft-nodes", - "roxmltree", + "resvg", + "roxmltree 0.20.0", "serde", "serde_json", "thiserror 2.0.21", @@ -2439,6 +2464,7 @@ dependencies = [ name = "materialcraft-render" version = "0.1.3" dependencies = [ + "materialcraft-core", "materialcraft-geom", "materialcraft-image", "rayon", @@ -3169,6 +3195,12 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project" version = "1.1.13" @@ -3520,6 +3552,20 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" +[[package]] +name = "resvg" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9be183ad6a216aa96f33e4c8033b0988b8b3ea6fd2359d19af5bac4643fd8e81" +dependencies = [ + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia", + "usvg", +] + [[package]] name = "rfd" version = "0.17.2" @@ -3547,6 +3593,15 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" +dependencies = [ + "bytemuck", +] + [[package]] name = "rmcp" version = "3.8.0" @@ -3603,6 +3658,15 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" +[[package]] +name = "roxmltree" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da7f59328b09405b181fee1018925fad50f157afb43c0c0f5c522c256dd5907" +dependencies = [ + "memchr", +] + [[package]] name = "rustc-hash" version = "1.1.0" @@ -3843,6 +3907,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" +[[package]] +name = "simplecss" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" +dependencies = [ + "log", +] + [[package]] name = "siphasher" version = "1.0.4" @@ -3948,12 +4021,31 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp", +] + [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "svgtypes" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f12b12995e3638c70618c1facb1ce65302f6a6f706b675f07c58a5d7391120e" +dependencies = [ + "kurbo", + "siphasher", +] + [[package]] name = "syn" version = "2.0.119" @@ -4075,6 +4167,32 @@ dependencies = [ "zune-jpeg", ] +[[package]] +name = "tiny-skia" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47ffee5eaaf5527f630fb0e356b90ebdec84d5d18d937c5e440350f88c5a91ea" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "png", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca365c3faccca67d06593c5980fa6c57687de727a03131735bb85f01fdeeb9" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + [[package]] name = "tinystr" version = "0.8.5" @@ -4304,6 +4422,28 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "usvg" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d46cf96c5f498d36b7a9693bc6a7075c0bb9303189d61b2249b0dc3d309c07de" +dependencies = [ + "base64 0.22.1", + "data-url", + "flate2", + "imagesize", + "kurbo", + "log", + "pico-args", + "roxmltree 0.21.2", + "simplecss", + "siphasher", + "strict-num", + "svgtypes", + "tiny-skia-path", + "xmlwriter", +] + [[package]] name = "utf16_iter" version = "1.1.0" @@ -5247,6 +5387,12 @@ version = "0.8.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" +[[package]] +name = "xmlwriter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + [[package]] name = "xtask" version = "0.1.3" diff --git a/Cargo.toml b/Cargo.toml index fce8d50c..03d0173d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ rust-version = "1.95" repository = "https://github.com/storytold/materialcraft" [workspace.dependencies] +resvg = { version = "0.47", default-features = false } # internal materialcraft-core = { path = "crates/core" } materialcraft-image = { path = "crates/image" } diff --git a/README.md b/README.md index 6c2f537d..be0fae14 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

- Build tileable PBR materials from noises, patterns and filters in a node graph, watch them + Build procedural materials from primitives and functions in a node graph, watch them update live in 2D and on a 3D model, and export the maps for any engine. It runs natively on macOS, Windows, Linux and FreeBSD, and in the browser via WebAssembly. Built by the ArtCraft team.

@@ -67,6 +67,9 @@ ## A look around +These screenshots show the earlier procedural library. The current build uses the primitive +catalog described in [the primitive workflow](docs/atomic-workflow.md). +
@@ -92,7 +95,8 @@ ## Made in MaterialCraft -Every material below is a node graph that ships with MaterialCraft as a template, built only from +These historical renders used the former Rust library and are no longer bundled as templates. +They were built from its own procedural nodes (no photos, scans or textures from anywhere else) and rendered by `materialcraft-cli render --scene sphere --full --hq` (the height output displaces the mesh, with ray-traced ambient occlusion and a shadowed key light). @@ -110,12 +114,12 @@ ray-traced ambient occlusion and a shadowed key light). histogram of its input, see [docs/levels-editor.md](docs/levels-editor.md)). Space opens the node search. - **Fast.** Every node cooks on every CPU core, and a content-addressed cache means an edit - re-cooks only what lies downstream: the brick wall sample cooks in about 40 ms at preview size. + re-cooks only what lies downstream. Cooking runs on a worker thread, so the UI never waits. - **Tileable by design.** Noises and patterns live on whole-number lattices, so everything tiles seamlessly at any resolution, from 16 px to 8K. - **Robust.** No panics in shipped code, every command tested with hostile input, every node cooked - with odd inputs in tests, unlimited undo from snapshots, and lossless project files. + with odd inputs in tests, undo from snapshots, and native SBS project files. - **Open.** Export base color, normal, roughness, metallic, height and ambient occlusion as PNG, JPEG, TGA, TIFF, BMP, WEBP, EXR or HDR at 8, 16 or 32 bits, with your own file name pattern. - **Works with TextureCraft.** **File ▸ Send to TextureCraft** puts a material on TextureCraft's @@ -134,7 +138,7 @@ git clone https://github.com/storytold/materialcraft cd materialcraft cargo run --release -p materialcraft # desktop app -cargo run --release -p materialcraft -- package.sbs # open a package (.sbs or .mcraft) +cargo run --release -p materialcraft -- package.sbs # open an SBS package cargo run --release -p materialcraft -- --control 7878 # + JSON control channel cargo run --release -p materialcraft-cli -- mcp # MCP server (stdio) cargo run --release -p materialcraft-cli -- new wood wood.sbs @@ -170,21 +174,12 @@ The details are in [`docs/control-protocol.md`](docs/control-protocol.md). MaterialCraft is under active development. [**ROADMAP.md**](ROADMAP.md) has the parity estimate by area, the remaining work and what's next. -**Where we are (2026-11-02):** the node engine and 227 nodes (the atomic nodes including FX-Map, -SVG and Text, noises including tileable 3D ones, patterns, filters, the flood fill family, -whole-material blending and weathering), function graphs with a visual editor and dynamic -parameters, sub-graphs with exposed inputs and presets, the full editor (graph, library, -properties, 2D view with histogram, 3D view with your own OBJ/glTF meshes, alpha transparency and an -alpha channel view; wires you can select, delete, swap (X) and reroute with dots, see -[docs/wires-and-alpha.md](docs/wires-and-alpha.md)), SBS project files (`.mcraft` too), -texture export, portable `.mcmat` materials that TextureCraft paints with (inputs stay editable -there), the browser build with file I/O, the CLI, the control channel and the MCP server -all work today. We estimate about two thirds (≈ 67%) of a material artist's daily workflow works -end to end; [docs/target-app-parity.md](docs/target-app-parity.md) has the breakdown. +**Current focus (2026-11-05):** primitive editing and native SBS save/load. The old Rust +procedural library has been removed. The replacement includes 30 main-graph entries, 85 function +operations and three pattern node kinds. Start with **File → New → Atomic sample**. -**What's missing:** the rest of the node library, a GPU 3D view with tessellation and lights, -mesh-based nodes, translations and the first signed release. The ranked list is in -[`docs/gaps.md`](docs/gaps.md). +See [the primitive workflow](docs/atomic-workflow.md) for usage, validation scope and limitations. +Reference-app rendering parity and full SBS library loading are still pending. **Workspace:** `crates/{core, image, geom, nodes, eval, formats, engine, render, automation, ui-egui}` and `apps/{materialcraft, materialcraft-cli, materialcraft-web}`. The egui frontend is its own diff --git a/ROADMAP.md b/ROADMAP.md index 9a58e922..0e97d7b7 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,46 +1,20 @@ # MaterialCraft roadmap -> **Last reviewed:** 2026-11-02 · **Last updated:** 2026-11-02 · **Change:** minor (≈ 67%: portable materials for TextureCraft) · **Target:** the professional node-based material workflow +**Current focus (2026-11-05):** native primitive editing, evaluation and SBS save/load. -**Stage:** alpha (in active development). MaterialCraft aims for full parity with the professional -node-based procedural material workflow, with better performance, every feature drivable by agents -(MCP, CLI, control channel), and builds for Windows, macOS, Linux, FreeBSD and the web. +The old Rust procedural library has been removed. The main catalog has 30 entries: 26 native +primitives and four graph input/output items. Functions have 85 operations; pattern graphs have +Quadrant, Switch, Iterate and Dot. See [the primitive workflow](docs/atomic-workflow.md) for usage and limits. -## Headline numbers +Earlier percentage estimates and node counts are superseded by this change. Reference-app +rendering parity and arbitrary SBS round trips have not been established. -- **Parity: ≈ 67%** of a material artist's daily workflow works end to end - ([docs/target-app-parity.md](docs/target-app-parity.md)). -- **Remaining: ≈ 83 Opus 5.5 agent hours** ([docs/roadmap.md](docs/roadmap.md)). -- **Nodes:** 227 (all tileable), cooked on every CPU core through a content-addressed cache; the - brick wall sample cooks in about 40 ms at preview size. +## Next steps -## By area - -| Area | Weight | Done | -|---|---:|---:| -| Graph editing | 15 | 75% | -| Atomic nodes | 12 | 95% | -| Node library | 20 | 45% | -| Function graphs | 10 | 70% | -| Graph parameters and instances | 8 | 70% | -| 2D view | 5 | 80% | -| 3D view | 10 | 55% | -| Files | 8 | 70% | -| UI and UX | 8 | 70% | -| Platforms | 4 | 50% | -| **Total** | **100** | **≈ 67%** | - -## What's next - -1. The rest of the node library: scan processing, more grunges, spline tools, SDF shapes. -2. A GPU 3D view with tessellation and lights. -3. Mesh-based generators and bakers. -4. Function loops and reusable functions. -5. The first release on every platform. - -The ranked work list is [docs/gaps.md](docs/gaps.md); file formats are in -[docs/file-format-parity.md](docs/file-format-parity.md) and languages in -[docs/localization-parity.md](docs/localization-parity.md). +1. Verify the original atomic sample in the reference application +2. Compare primitive outputs and parameter semantics against reference results +3. Add SBS graph references with cycle-safe resolution +4. Build the library from SBS definitions instead of duplicate Rust nodes ## Progress log diff --git a/UI_PARITY_NOTES.md b/UI_PARITY_NOTES.md index e8912620..5bc67dbb 100644 --- a/UI_PARITY_NOTES.md +++ b/UI_PARITY_NOTES.md @@ -1,7 +1,33 @@ -# UI parity drop (branch 123-improving-ui) +# UI parity drop (re-based on main after the primitive rewrite) What changed, per area of the reference screenshots. Everything is wired to the engine; no empty settings. +## Re-port onto main (2026-11-06) +- Built on `origin/main` (1a468e7, PR #125). Everything from the 123-improving-ui drop was re-applied in the new + layout: one type per file, new engine commands in their own module (`engine/src/resource_cmds.rs`, registered by + one line in `commands.rs`), 3D view settings in `engine/src/view3d_settings.rs`, the 3D view split into + `ui-egui/src/view3d/{actions,menus,overlays,settings,side_strip}.rs`, the explorer actions in `explorer/{actions,package_menu}.rs`, + the new-graph dialog in `new_graph_dialog.rs`, graph toolbar tools in `graph/toolbar_tools.rs`, auto conversion in `graph/auto_convert.rs`. +- Upstream features kept as they are: the material-preview assignment (View in 3D view, graph drop onto the 3D view, + `view.3d.outputs`, `view.3d.clear`), the Material assignment list now lives at the bottom of the 3D view's Materials menu; + the function and FX-Map pattern editors; `snapToGrid` from `prefs.snap_to_grid`. +- `.mcraft` is gone upstream, so everything here is SBS only: linked bitmaps are written as `` without `binembedded`, + plugins load `.sbs` packages, the Plugin Manager installs `.sbs` files. +- Library: the reference's generator/filter groups are no longer Rust nodes ("SBS library nodes belong in SBS graphs"), so + the library shows the 26 atomic nodes, graph items, the 85 function ops (added through the function editor), the package's + graphs by kind, and the graphs of loaded plugin packages filed under each graph's `attributes.category` (else "PBR materials ▸ Plugins"). + The remaining reference groups stay listed, greyed, with a 0 count. + +## Menu pass (2026-11-06, late) +- Library: the "SDF functions" group is now "MCF functions"; empty reference groups explain on hover that library + packages (Tools ▸ Plugin Manager) fill them. +- Help menu points at getartcraft.com: Documentation/website → the MaterialCraft app page, Tutorials → /tutorials, + What's new → /news, System requirements → /faq, Support and feedback → /support, Discord; release notes and bug + reports stay on GitHub. Home and About carry the same links. +- Home screen: Samples shows the starter templates and the graphs of loaded library packages (click imports the graph). +- Graph toolbar quick-insert row now has every atomic node (added SVG, Text, Gradient Dynamic, Motion Blur, + Value Processor, Input Color, Input Value). + ## Menus (File / Edit / Tools / Windows / Help) - File: New ▸ Graph / Empty package, Open, Recent, Save, Save as, Save a copy as, Export with dependencies, Import bitmap, Link bitmap, Export outputs, Export material, Send to TextureCraft, Close, Quit. - Tools: Switch engine (F9: CPU thread count, rayon pool), Cancel rendering, Suspend engine, Clear cache, Reload resources, Plugin Manager. @@ -45,11 +71,13 @@ What changed, per area of the reference screenshots. Everything is wired to the - Skipped on purpose: UDIM, .sbsar publishing. ## Plugin Manager (Tools ▸ Plugin Manager) -- Filter, Plugins/Loaded table, Browse (opens the plugins folder), Install (copies .sbs/.mcraft files in), Refresh. +- Filter, Plugins/Loaded table, Browse (opens the plugins folder), Install (copies .sbs files in), Refresh. - A plugin = a package file or a folder with package files + optional plugin.json {name, version, author, description} in Documents/MaterialCraft/plugins. Loaded plugins' graphs show in the library under PBR materials ▸ Plugins. ## Engine commands added file.linkBitmap, file.reloadResources, file.deleteResource, file.importGraph, file.packageGraphs, file.saveCopy, file.exportWithDependencies, graph.add, session.settings, view.3d.reset {what}, view.3d.state, view.3d.loadState; `view.3d` nested objects. Resources can be linked (SBS keeps relative links). ## Checks run here -cargo fmt, cargo clippy --workspace --all-targets -D warnings, cargo xtask layers, cargo test --workspace --release, cargo xtask wasm. +cargo fmt --all, cargo check --workspace --all-targets, cargo clippy --workspace --all-targets -- -D warnings, cargo xtask layers, +cargo test --workspace --release --no-fail-fast. `cargo xtask wasm` could not run in this container (the wasm target cannot be +downloaded here); please run it on your side. diff --git a/crates/automation/src/server.rs b/_to_delete/automation_server.rs similarity index 100% rename from crates/automation/src/server.rs rename to _to_delete/automation_server.rs diff --git a/crates/core/src/function.rs b/_to_delete/core_function.rs similarity index 100% rename from crates/core/src/function.rs rename to _to_delete/core_function.rs diff --git a/crates/formats/src/material.rs b/_to_delete/formats_material.rs similarity index 100% rename from crates/formats/src/material.rs rename to _to_delete/formats_material.rs diff --git a/crates/formats/src/sbs.rs b/_to_delete/formats_sbs.rs similarity index 100% rename from crates/formats/src/sbs.rs rename to _to_delete/formats_sbs.rs diff --git a/crates/formats/src/sbs_functions.rs b/_to_delete/formats_sbs_functions.rs similarity index 100% rename from crates/formats/src/sbs_functions.rs rename to _to_delete/formats_sbs_functions.rs diff --git a/crates/formats/tests/sbs_functions.rs b/_to_delete/formats_tests_sbs_functions.rs similarity index 100% rename from crates/formats/tests/sbs_functions.rs rename to _to_delete/formats_tests_sbs_functions.rs diff --git a/crates/formats/tests/sbs_library_aliases.rs b/_to_delete/formats_tests_sbs_library_aliases.rs similarity index 100% rename from crates/formats/tests/sbs_library_aliases.rs rename to _to_delete/formats_tests_sbs_library_aliases.rs diff --git a/crates/nodes/src/atomic.rs b/_to_delete/nodes_atomic.rs similarity index 100% rename from crates/nodes/src/atomic.rs rename to _to_delete/nodes_atomic.rs diff --git a/crates/nodes/src/catalog.test.rs b/_to_delete/nodes_catalog.test.rs similarity index 100% rename from crates/nodes/src/catalog.test.rs rename to _to_delete/nodes_catalog.test.rs diff --git a/crates/nodes/src/filters.rs b/_to_delete/nodes_filters.rs similarity index 100% rename from crates/nodes/src/filters.rs rename to _to_delete/nodes_filters.rs diff --git a/crates/nodes/src/filters.test.rs b/_to_delete/nodes_filters.test.rs similarity index 100% rename from crates/nodes/src/filters.test.rs rename to _to_delete/nodes_filters.test.rs diff --git a/crates/nodes/src/filters_extra.rs b/_to_delete/nodes_filters_extra.rs similarity index 100% rename from crates/nodes/src/filters_extra.rs rename to _to_delete/nodes_filters_extra.rs diff --git a/crates/nodes/src/filters_more.rs b/_to_delete/nodes_filters_more.rs similarity index 100% rename from crates/nodes/src/filters_more.rs rename to _to_delete/nodes_filters_more.rs diff --git a/crates/nodes/src/flood_fill.rs b/_to_delete/nodes_flood_fill.rs similarity index 100% rename from crates/nodes/src/flood_fill.rs rename to _to_delete/nodes_flood_fill.rs diff --git a/crates/nodes/src/function.rs b/_to_delete/nodes_function.rs similarity index 100% rename from crates/nodes/src/function.rs rename to _to_delete/nodes_function.rs diff --git a/crates/nodes/src/fx_map.rs b/_to_delete/nodes_fx_map.rs similarity index 100% rename from crates/nodes/src/fx_map.rs rename to _to_delete/nodes_fx_map.rs diff --git a/crates/nodes/src/generators.rs b/_to_delete/nodes_generators.rs similarity index 100% rename from crates/nodes/src/generators.rs rename to _to_delete/nodes_generators.rs diff --git a/crates/nodes/src/generators.test.rs b/_to_delete/nodes_generators.test.rs similarity index 100% rename from crates/nodes/src/generators.test.rs rename to _to_delete/nodes_generators.test.rs diff --git a/crates/nodes/src/material.rs b/_to_delete/nodes_material.rs similarity index 100% rename from crates/nodes/src/material.rs rename to _to_delete/nodes_material.rs diff --git a/crates/nodes/src/material_more.rs b/_to_delete/nodes_material_more.rs similarity index 100% rename from crates/nodes/src/material_more.rs rename to _to_delete/nodes_material_more.rs diff --git a/crates/nodes/src/noise.rs b/_to_delete/nodes_noise.rs similarity index 100% rename from crates/nodes/src/noise.rs rename to _to_delete/nodes_noise.rs diff --git a/crates/nodes/src/noise3d.rs b/_to_delete/nodes_noise3d.rs similarity index 100% rename from crates/nodes/src/noise3d.rs rename to _to_delete/nodes_noise3d.rs diff --git a/crates/nodes/src/noises_more.rs b/_to_delete/nodes_noises_more.rs similarity index 100% rename from crates/nodes/src/noises_more.rs rename to _to_delete/nodes_noises_more.rs diff --git a/crates/nodes/src/patterns.rs b/_to_delete/nodes_patterns.rs similarity index 100% rename from crates/nodes/src/patterns.rs rename to _to_delete/nodes_patterns.rs diff --git a/crates/nodes/src/patterns.test.rs b/_to_delete/nodes_patterns.test.rs similarity index 100% rename from crates/nodes/src/patterns.test.rs rename to _to_delete/nodes_patterns.test.rs diff --git a/crates/nodes/src/patterns_more.rs b/_to_delete/nodes_patterns_more.rs similarity index 100% rename from crates/nodes/src/patterns_more.rs rename to _to_delete/nodes_patterns_more.rs diff --git a/crates/nodes/src/svg.rs b/_to_delete/nodes_svg.rs similarity index 100% rename from crates/nodes/src/svg.rs rename to _to_delete/nodes_svg.rs diff --git a/crates/nodes/src/text.rs b/_to_delete/nodes_text.rs similarity index 100% rename from crates/nodes/src/text.rs rename to _to_delete/nodes_text.rs diff --git a/crates/nodes/src/weathering.rs b/_to_delete/nodes_weathering.rs similarity index 100% rename from crates/nodes/src/weathering.rs rename to _to_delete/nodes_weathering.rs diff --git a/crates/nodes/src/weathering.test.rs b/_to_delete/nodes_weathering.test.rs similarity index 100% rename from crates/nodes/src/weathering.test.rs rename to _to_delete/nodes_weathering.test.rs diff --git a/_to_delete/ui-parity-main-port.zip b/_to_delete/ui-parity-main-port.zip new file mode 100644 index 00000000..3ff3f8eb Binary files /dev/null and b/_to_delete/ui-parity-main-port.zip differ diff --git a/crates/ui-egui/src/function_editor.rs b/_to_delete/ui_function_editor.rs similarity index 100% rename from crates/ui-egui/src/function_editor.rs rename to _to_delete/ui_function_editor.rs diff --git a/crates/ui-egui/src/graph_view.rs b/_to_delete/ui_graph_view.rs similarity index 100% rename from crates/ui-egui/src/graph_view.rs rename to _to_delete/ui_graph_view.rs diff --git a/crates/ui-egui/src/lib.test.rs b/_to_delete/ui_lib.test.rs similarity index 100% rename from crates/ui-egui/src/lib.test.rs rename to _to_delete/ui_lib.test.rs diff --git a/crates/ui-egui/src/properties.rs b/_to_delete/ui_properties.rs similarity index 100% rename from crates/ui-egui/src/properties.rs rename to _to_delete/ui_properties.rs diff --git a/crates/ui-egui/src/state.rs b/_to_delete/ui_state.rs similarity index 100% rename from crates/ui-egui/src/state.rs rename to _to_delete/ui_state.rs diff --git a/crates/ui-egui/tests/common/search.rs b/_to_delete/ui_tests_common_search.rs similarity index 100% rename from crates/ui-egui/tests/common/search.rs rename to _to_delete/ui_tests_common_search.rs diff --git a/crates/ui-egui/tests/search_query.rs b/_to_delete/ui_tests_search_query.rs similarity index 100% rename from crates/ui-egui/tests/search_query.rs rename to _to_delete/ui_tests_search_query.rs diff --git a/crates/ui-egui/tests/search_rows.rs b/_to_delete/ui_tests_search_rows.rs similarity index 100% rename from crates/ui-egui/tests/search_rows.rs rename to _to_delete/ui_tests_search_rows.rs diff --git a/apps/materialcraft-cli/src/main.rs b/apps/materialcraft-cli/src/main.rs index 5cef46d0..fa7a15ef 100644 --- a/apps/materialcraft-cli/src/main.rs +++ b/apps/materialcraft-cli/src/main.rs @@ -1,12 +1,11 @@ -//! Headless MaterialCraft command line: inspect, script, cook, export and render packages, and -//! serve agents over MCP or JSON lines. Never opens a window. +//! Headless MaterialCraft command line: inspect, script, cook, export and render packages, and serve agents over MCP or JSON lines. Never opens a window #![forbid(unsafe_code)] #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] use std::sync::{Arc, Mutex}; use materialcraft_automation::security::{client_token, server_token}; -use materialcraft_automation::{AuthorizedWorkspace, BridgeClient, Filesystem, Headless, MaterialcraftMcp, RenderOptions, rpc}; +use materialcraft_automation::{AuthorizedWorkspace, BridgeClient, Filesystem, Headless, MaterialCraftMcp, RenderOptions, rpc}; use serde_json::{Value, json}; const USAGE: &str = "\ @@ -14,7 +13,7 @@ materialcraft-cli: headless MaterialCraft USAGE: materialcraft-cli --version - materialcraft-cli info + materialcraft-cli info Graphs, nodes, outputs and cook results, as JSON. materialcraft-cli commands [--filter ] List the engine commands (id, label, params). @@ -25,8 +24,7 @@ USAGE: materialcraft-cli batch Run [{\"id\", \"params\"}, ...] or {\"open\": , \"steps\": [...], \"save\": }. materialcraft-cli new