65 Commits
Author SHA1 Message Date
Chris Hassebrook 68b579f0c8 Cook MCMAT v3 linked materials at the texture set resolution (#644)
* Cook MCMAT v3 linked fills through MaterialCraft

* Install bounded material bakes at the original drop target
2026-11-18 18:57:44 -05:00
FredApps a9fcd33da9 Docs: note that a colour selection's effect.set colors are linear arrays only
The general colour-param paragraph could be read as allowing hex or a grey
number in effect.set's colors list, which that command rejects.
2026-11-18 16:20:11 +07:00
FredApps 5d90d019d9 Merge remote-tracking branch 'origin/main' into docs/colour-param-space
# Conflicts:
#	crates/engine/src/layer_cmds.rs
#	crates/engine/src/tool_cmds.rs
#	docs/control-protocol.md
2026-11-18 16:16:30 +07:00
chasse20 3939886c4b Merge main into the empty-project startup changes
Preserve closed-session guards and project cleanup alongside the new layer, camera and layout controls. Update the menu-order regression for the merged catalog.
2026-11-18 07:03:03 +00:00
chasse20 0ff72b0d46 Auto: Revert export additions and evaluate brush pickup by tile
Remove DDS encoding, its dependency, export options, tests and documentation. Revert the MaterialX export-dialog option and preview additions while retaining engine export support.

Evaluate material-brush and mask Clone/Smudge pickup on demand. Give mask preview and commit an explicit value image. Sample the document in solo mode and avoid redundant export cache invalidation.

Validate saved decal axes, stencil settings and smudge strength. Bound smart-mask reads, write masks atomically and reject external anchor references. Clear stale clone sources on cross-set selection. Reject moves into another set’s folder and use layer positions to detect no-op moves without cloning the project again.

Load saved materials on shelf click and route pinch gestures to viewport zoom. Add regression tests for the affected behaviors.
2026-11-18 05:20:25 +00:00
JonRC 78e15eae08 Merge remote-tracking branch 'upstream/main' into docs/colour-param-space
# Conflicts:
#	crates/engine/src/mask_cmds.rs
2026-11-18 00:14:41 -03:00
vangel76 d9bdef92b2 TextureCraft UI parity batch: 45 changes in one commit
Combines 45 open pull requests so the Windows proof build runs once. Included:

- Fill layers can color from dark to light with a gradient map (PR #535, fixes #482)
- Front, side and top views, and F5/F6 switch between perspective and orthographic (PR #539, part of #241)
- Textures export as DDS, with compressed normal and grayscale maps for game engines (PR #543, fixes #354)
- The active layer and the eye in the Layers panel are much easier to see (PR #561, fixes #553)
- Export dialog can also write a MaterialX file for each texture set (PR #563, fixes #558)
- Layers toolbar stays on one row and cut-off layer names show on hover in small windows (PR #564, fixes #560)
- Save a layer's mask as an image file or copy it to the clipboard from the layer menu (PR #565, fixes #559)
- Shift + wheel and Ctrl + wheel change the brush size, and Ctrl+drag brush changes have a fine mode (PR #566, part of #545)
- Select several layers in the Layers panel with Shift+click, Ctrl+click and Ctrl+A (PR #567, fixes #247)
- Pressing F frames the object you are painting, so a floor plane no longer throws off the view (PR #568, fixes #478)
- Save a mask as your own smart mask and reuse it on other layers and projects (PR #569, fixes #562)
- Show one layer alone in the viewport, with or without its mask (PR #570, fixes #544)
- On-screen orbit, pan and zoom buttons let a pen tablet move the 3D and 2D views (PR #573, fixes #288)
- Decals can be mirrored to the opposite side of the mesh across X, Y or Z, with optional U or V flip (PR #576, fixes #272)
- Shift+click lines in the 3D view start at the spot you last painted, even after turning the view (PR #578, fixes #574)
- History steps now name the tool and layer and appear in the interface language (PR #580, fixes #572)
- Path tool keeps your points when you click in the other view and tells you why (PR #582, fixes #575)
- Brush, symmetry and tool settings stay when you open another project or restart the app (PR #584, fixes #571)
- Reset only the panel layout from the Window menu, and Reset UI now asks first (PR #586, fixes #577)
- Output templates ask before deleting and before dropping an unfinished edit (PR #588, fixes #579)
- Clone tool shows its source in the 2D view, forgets it when you switch texture set, and can restart at the source each stroke (PR #590, fixes #581)
- Move the symmetry plane to the model's middle or to a clicked point in one click (PR #591, fixes #585)
- Projection stencil can be dropped in from Assets, moved and reset with fields, turned in snapped steps, and the 2D view says projection works in 3D (PR #593, fixes #583)
- Smudge now shows which channels it drags and lets you switch them (PR #594, fixes #587)
- Save panel layouts under a name and switch between them from the Window menu (PR #595, fixes #589)
- Clone and Smudge now work on layer masks (PR #596, fixes #592)
- A layer image menu test no longer fails when another test switches the interface language (PR #597)
- Clicking a material in the shelf now paints with it instead of adding a layer (PR #599, fixes #305)
- Alt+click on a mask thumbnail now labels the mask view and blanks the other texture sets (PR #605, fixes #600)
- Painting on a texture set that is not active now shows a hint why nothing happens (PR #607, fixes #601)
- Ctrl+Shift+click draws straight lines that snap to 15 degree steps (PR #609, fixes #604)
- Output template channels can be inverted (PR #611, fixes #603)
- Smudge now follows the mirror and radial symmetry planes (PR #613, fixes #602)
- The shortcut list now shows the stencil, clone source, straight line and path gestures (PR #614, fixes #608)
- Symmetry now also mirrors strokes painted in the 2D view (PR #615, fixes #610)
- Decals keep their image's proportions while sizing and can be flipped (PR #617, fixes #606)
- Polygon fill now also fills the mirrored side when symmetry is on (PR #619, fixes #612)
- A decal dragged over a curved or differently facing surface now turns with it instead of tilting or flipping (PR #622, fixes #616)
- Every brush alpha now has size, roundness, contrast and invert settings (PR #623, part of #598)
- Decals placed as a mask can now be sized, turned and moved from Properties like decal layers (PR #624, fixes #618)
- Renaming effects and linking fills to mask anchor points are now tested in the interface (PR #626, fixes #621)
- Path points can be corners, so paths can have hard edges (PR #627, fixes #620)
- Layer menu can apply a layer's blending mode and opacity to all channels, and copy/paste channel blending (PR #631, fixes #629)
- Display Settings can now set glow, vignette, sharpen and film grain (PR #632, fixes #630)
- Every command a key can run can now get a keyboard shortcut (PR #633, fixes #628)

Fixes found while combining them: the named layouts window is drawn again, layer remove/duplicate/group/visibility stay bindable to keys, the Clone tool's Aligned switch is kept with the other tool settings, smudge copies in the 2D view keep their own trails, and a UI or control-channel camera command during a view glide is no longer undone by the glide.
2026-11-17 22:51:06 +01:00
vangel76 df51327076 Drop pending resize and viewport images on Close; pin test language; document project-independent commands 2026-11-17 22:48:16 +01:00
vangel76 398d764fc2 Merge upstream/main 2026-11-17 22:23:12 +01:00
vangel76 18c8538c3d Keep the control-run start, refuse project commands in headless close, grey view buttons without a project
Review fixes: --control runs still start with the sample project, headless save/export/import refuse after file.close, session.inspect reports projectOpen, web drops need a project, the template button and view buttons are disabled without a project.
2026-11-17 22:11:00 +01:00
chasse20 7ef25ad373 Merge latest main into CPR 23 preserving brush preset repairs 2026-11-17 19:34:47 +00:00
chasse20 fb13129647 Auto: Resolve dock test conflict for PBR import integration 2026-11-17 15:23:02 +00:00
chasse20 e5e327372b Auto: Preserve brush shelf repair and remove unstable anchor test
Keep the reviewed brush management UI and protocol documentation repair while dropping the disabled mask anchor test that destabilizes the full UI suite.
2026-11-17 08:40:30 +00:00
chasse20 14301d991b Auto: Integrate main and repair named brush persistence
Prevent preset file collisions, preserve trusted headless libraries across project changes, and keep untrusted sessions in memory. Support named and legacy preset files, expose session presets in the shelf, invalidate stale previews, and restore wasm integration guards.

Bound directory selection, avoid deferred thumbnail settings copies, and calculate candidate filename keys once per collision check. Split the new preset types and complete scoped cleanup.
2026-11-17 06:29:38 +00:00
chasse20 f764ac4e5f Auto: Integrate main and bound PBR import work and memory
Preserve main UI and translation changes. Bound archive indexing, directory scans and native reads; fix resolution-token overflow, unique-name replies and dialog behavior.

Avoid generated-map re-decoding and input-buffer clones, release packed sources after their final use, and borrow dialog candidates. Keep generated pixels identical to PNG reloads. Organize new types and preserve the public classifier module.

Validated with 973 release tests, focused UI and allocation probes, panic hunt, clippy, layering, wasm, formatting and diff checks.
2026-11-17 06:29:22 +00:00
vangel76 343b33ee60 Bake bent normal maps in tangent space like the normal map
The bent normal map packed the world-space direction while the normal map
uses the low poly's tangent frame (OpenGL green). Encode the bent normal in
the same frame on the shared CPU/GPU packing path, read imported bent
normal images in the project's normal format, and decode it with the vertex
tangent frame in the neutral material view.

Projects saved before format version 3 held world-space bent normal maps:
loading drops them, keeps the bake settings and asks for a re-bake.

Part of #538
2026-11-16 19:50:20 +01:00
Dylan M. Taylor 0d90953467 Share portable materials and preserve SBS links 2026-11-15 11:44:04 +00:00
FredApps c0815dfa46 Merge remote-tracking branch 'origin/main' into review/colour-param-193
# Conflicts:
#	crates/engine/src/filter_lib.rs
#	crates/engine/src/mask_cmds.rs
2026-11-13 12:27:46 +01:00
chasse20 1c5ff6e5c3 Restore configurable project resource limits 2026-11-11 00:30:36 -05:00
chasse20 832a7f9e89 Fix live bake preview review findings 2026-11-10 01:34:02 -05:00
MistyMystery 0a954d2e03 Merge upstream main into pbr-folder-import 2026-11-10 01:03:23 +04:00
MistyMystery 0c1f66d1f5 Live bake preview: update for the bake refactor, share streamed map buffers, narrow the cancel guarantee
Merge upstream main into the branch. The streamed bake now returns the same Arc buffers it handed to the preview, and the document stores those, so a preview never holds a second copy of a map. A cancel leaves the set being baked as it was; sets that finished earlier stay applied.
2026-11-09 19:49:07 +04:00
JonRC dc9d1f735f Colour params: name sRGB for the hex form too
From review on #193:
- Every colour param now reads `[r,g,b] linear or "#rrggbb" sRGB`, so
  the command help alone says which form is which. The two filter errors
  say it too.
- tool.material and layer.fill.set put the colour forms in parentheses,
  so `|value?` reads as the alternative to the whole colour.
- mask.add.colorSelection: "ID color as ..." instead of a comma that read
  like a second param.
- effect.set's `colors` (from main) take arrays only: say they are linear.
- The test checks every hex mention is labelled sRGB, and that the
  commands reading colours through color_param document both forms.
- control-protocol.md: a single number is a linear grey.
2026-11-09 09:59:09 -03:00
JonRC 4927704ad7 Merge remote-tracking branch 'upstream/main' into docs/colour-param-space
# Conflicts:
#	docs/control-protocol.md
2026-11-09 09:58:59 -03:00
chasse20 c573250601 Merge latest main into baked map import
Preserve both module and translation additions. Register the baked map tests in the consolidated integration suites.
2026-11-08 21:42:24 -05:00
Chris Hassebrook b966d13da2 Fix filter picker visibility and swap error context 2026-11-08 01:42:22 -05:00
Rebornim 284cb7d125 Refuse host paths in files entries for automation
textureSet.meshMap.import takes its paths in files[].path, which
authorize_command did not look at, so a control client could import an
image from outside --read-root. Treat a path or dir in any files entry
like a top-level one, and document that automation imports baked maps
through resource_import plus textureSet.meshMap.set.
2026-11-08 01:25:35 +00:00
Rebornim cfe837b86c Import baked maps when creating a project
New project > Advanced settings gets the project's normal map format and
Import baked maps: Add lists image files, and Create imports them with the
new textureSet.meshMap.import command, which sets each file as the mesh map
of the texture set and slot its name names (Body_ambient_occlusion.png,
Body_normal.1001.png) in one undo step and reports the files it left out.
2026-11-07 09:14:40 +00:00
chasse20 747068dbdf Fix bake settings and UV tile controls 2026-11-05 22:39:42 -05:00
MistyMystery d60fb856c9 Live bake preview: the 3D view shows each mesh map as it finishes
A bake started in the app bakes the set's maps one after another (BakeTask::run_streaming, one bake per map, same pixels as a single bake) and streams each finished map from the worker thread. One map is installed per UI poll into the session's bake preview (not the document); the 3D view follows the newest map raw on the model, with maps and sets not baked yet shown neutral, and the bake bar names the stage. The bake bar picks Follow Newest Map, a finished map or Material. The previous view mode comes back when the bake ends, is cancelled or Bake mode is left; painting is paused while a bake is shown. bake.preview, ui.bake.start and ui.bake.cancel expose it on the control channel. New strings are translated in every shipped language.
2026-11-05 13:20:38 +04:00
MistyMystery 2df185b2a6 PBR folder import: dialog, menu item, folder drop, library copy, translations, docs
File > Import PBR texture folder..., drop a folder, zip or several map files,
choose between candidate files, normal convention and projection, optionally
keep the material in the library. Documented in docs/control-protocol.md.
2026-11-05 06:53:09 +04:00
MistyMystery 28c4702ec8 Brush presets: your own named brushes in the data folder
Save the current brush (size included) and the painted channels as a named
preset kept as a .tcbrush file in the data folder's brushes folder. Use,
rename, replace and delete them from a Brush presets popover in the brush
options and from the shelf's My brushes list. New commands:
brush.preset.store, brush.preset.rename, brush.preset.delete;
brush.preset.list and brush.preset.apply now cover the user's presets too.
Older bare .tcbrush files are picked up under their file name.
2026-11-05 06:52:57 +04:00
MistyMystery e26f196888 Camera bookmarks: Ctrl+1..9 shortcuts, smooth glide in the UI, docs
Saved cameras (Project.cameras) already act as bookmarks; add camera.bookmark1..9 commands,
a short viewport glide when going to a camera from the UI, a test and a control-protocol section.
2026-11-05 06:52:49 +04:00
JonRC 1f05cf9ce9 Docs: say which colour space each colour param form is in
[r, g, b] is linear and "#rrggbb" is sRGB, as color_param already says,
but control-protocol.md and most command params did not say so, and the
same digits give two different colours. Write it in the protocol doc and
in the params of every command that takes a colour, and test that they
keep saying it.

Fixes #191
2026-11-02 23:59:50 -03:00
bflatastic 92e92ff779 OBJ export writes an MTL material library with each material's maps 2026-11-02 18:20:21 +07:00
bflatastic e828af5c35 Document sliders apply live while dragged, as one undo step 2026-11-02 16:28:51 +07:00
bflatasticandClaude Opus 5.5 2bf551f2a2 Merge origin/main into feat/cross-app-materials
Keeps both sides of the translation tables, AGENTS rules and the formats module list;
material files in the browser load before the ask-to-save step (they add a layer, not a
new project); Arabic for the eight MaterialCraft strings; menu parity regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 13:45:27 +07:00
bflatastic 8c94d053b4 Merge remote-tracking branch 'origin/main' into effects/copy-paste 2026-11-02 12:20:06 +07:00
bflatastic 4ca9f424f4 Effects: copy, cut and paste between layers
An effect's context menu copies, cuts and pastes it, and Ctrl+C,
Ctrl+X and Ctrl+V act on a selected effect (pasting a copied one above
the selected effect, or on top of the selected content or mask).
Painted strokes come along, resampled to the target set; generators
and other one-stack effects go to their stack, and a fill reading an
anchor point needs one below its new layer. effect.copy, effect.cut
and effect.paste share the layer clipboard.
2026-11-02 12:13:39 +07:00
bflatasticandClaude Opus 5.5 c092e7766b MaterialCraft materials: .mcmat fills with live graph inputs
- core: Fill::link (MaterialLink: package resource, graph, exposed inputs, presets,
  image inputs, size); BakedMap::interop_id / for_input shared mesh-map identifiers
- formats: own .mcmat reader (no MaterialCraft dependency) and 16-bit mesh-map PNGs
- engine: material.load takes .mcmat and .mcraft; material.link.set / .preset / .cook /
  .saveSource; LinkJob re-cooks through materialcraft-cli at the texture set's
  resolution with baked mesh maps as graph inputs; fresh resource names per cook keep
  undo and the decoded-image cache consistent; packages count as used resources
- ui: linked-material section in fill properties (presets, sliders, colors, toggles,
  options) cooking on a worker thread, one process per layer, stale results redone;
  Open in MaterialCraft; File > Import material...; .mcmat drops; library shelf lists
  .mcmat and rescans on focus; 8 new strings in every language
- tests: materialcraft_link (import, params, undo, duplicates, mesh maps, save, and a
  real materialcraft-cli round trip when MATERIALCRAFT_CLI is set)
- docs: README, features, control protocol, architecture, AGENTS, ROADMAP, parity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:12:00 +07:00
bflatastic f8f241e804 Merge remote-tracking branch 'origin/main' into history/jump-to-step 2026-11-02 12:00:46 +07:00
BFlat 18b1969712 Merge pull request #122 from storytold/effects/reorder-duplicate
Effects: drag to reorder, duplicate
2026-11-02 12:00:32 +07:00
bflatastic b133186641 History: click a step to return to it
The History panel lists every undone step too (dimmed, next first) and
a click on any step goes back or forward to it, the current one
highlighted. edit.undo and edit.redo take {steps?} for the same jump.
2026-11-02 12:00:09 +07:00
bflatastic f6bd07e4d6 Mesh maps: use an image instead of a bake
Each mesh map slot of the Texture Set Settings takes an image resource:
drop one from the Assets panel on the slot, or pick it from the slot's
menu, which also clears the slot. The image is resampled to the size of
the set's other mesh maps (or its bake size), its values read as data,
a normal map in the project's normal format.
textureSet.meshMap.set {ts?, map, image} and
textureSet.meshMap.clear {ts?, map} give agents the same.
2026-11-02 11:32:20 +07:00
bflatastic 0d2f1873cd Effects: drag to reorder, duplicate
Effect rows in the layer stack can be dragged within their stack (a
drop lands above the row, or below it from its lower half), and their
context menu duplicates an effect just above itself, painted pixels
included. effect.move {effect, index} and effect.duplicate {effect}
give agents the same.
2026-11-02 11:13:00 +07:00
bflatastic d736ffa9af Levels: a histogram of what the effect reads
The Levels effect's properties now show a histogram of its input, the
mask below it or (on layer content) a channel picked above it, with the
input range marked. effect.histogram {effect, channel?, bins?} gives
agents the same counts. Large sets are sampled (at most 256 tiles), so
the cost stays flat up to 8K.
2026-11-02 09:23:59 +07:00
BFlat f6b66a2580 Merge pull request #87 from storytold/cli/sample-bake-size-note
CLI: say that new --sample bakes its mesh maps at up to 1024 px
2026-11-02 06:31:08 +07:00
BFlat 3e49542962 Merge pull request #84 from storytold/cli/automation-root-flags
CLI: --automation-read-root / --automation-write-root for mcp and serve
2026-11-02 06:18:14 +07:00
bflatastic f47638d782 CLI: say that new --sample bakes its mesh maps at up to 1024 px
The baked maps are most of a sample project's size, so a 2048 sample is
as large as a 1024 one; the usage and the control protocol now say so.

Fixes #66.
2026-11-02 05:42:55 +07:00
bflatastic c4353cc8d0 CLI: --automation-read-root / --automation-write-root for mcp and serve
The spelling the other crafting apps use; the same as --read-root /
--write-root.

Fixes #57.
2026-11-02 05:41:00 +07:00