Commit Graph
293 Commits
Author SHA1 Message Date
Rebornim 4c8cd40c3d Effects: a content effect blends each channel on its own 2026-11-22 05:30:03 +00:00
chasse20 0abf2805a8 Material and colour: review repairs from #698
Chasse's repairs to this part's code, carried over from the #698 head (5644b7d3).
2026-11-22 05:30:03 +00:00
Rebornim 5be1193f7b Temporary: the mask fill's source slot and the filter slot use the new picker; main's filter panel stays until part 5 2026-11-22 05:30:03 +00:00
Rebornim b5b99d6fd3 Fills: Material and colour commands, panels and tests 2026-11-22 05:30:03 +00:00
chasse20 a7d165e029 Fills: review repairs from #698
Chasse's repairs to this part's code, carried over from the #698 head (5644b7d3).
2026-11-22 05:30:03 +00:00
Rebornim 82b981e641 Temporary: the fill's Material section keeps main's channel rows and filter effects main's filter panel 2026-11-22 05:30:03 +00:00
Rebornim 32f848c7c5 Fills: engine evaluation, commands and the remaining tests for the Fill tab 2026-11-22 05:30:03 +00:00
Rebornim 91310e5a73 Fills: the Fill tab with its preview square, Move on model and section reset 2026-11-22 05:30:02 +00:00
Rebornim 9be079d6f8 Fills: every projection samples with tiling, rotation and offset, Filtering, UV Wrap and Match per UV Tile 2026-11-22 05:30:02 +00:00
Dylan M. Taylor 89252a0ebe fix(export): enforce batch-atomic OBJ/GLB/raster publication and parity tests (#722)
* fix(export): enforce batch-atomic OBJ/GLB/raster publication and parity tests

* style(mcmat): use as_chunks::<2> in test

* test(mesh_export): use valid non-black PNG in MTL slot link test

* fix(formats): reserve batch targets and roll back partial renames in write_batch_atomic

* fix(formats): preserve target during backup and report incomplete rollback

* fix(formats): address FredApps & CodeRabbit review on write_batch_atomic

* fix(formats): harden batch rollback, backup mode, and special-file guards

* fix(formats): validate regular file handle in rollback ownership check
2026-11-20 20:12:30 -05:00
FredApps 90d63ca58f fix(formats): propagate shared OBJ writer errors (#703)
* fix(formats): propagate OBJ writer failures before publication

* style: format OBJ result propagation
2026-11-21 00:22:00 +07:00
Dylan M. Taylor 52ba5338dc test(engine): disambiguate parallel materialx test temp dirs (#699) 2026-11-19 21:46:01 -05:00
Chris Hassebrook d895b7e226 Merge pull request #686 from vangel76/feat/ui-batch3-views
View picker, Display Settings, shortcuts, 2D view, Log, templates and Window menu match the reference (combines 10 issues)
2026-11-19 20:52:10 -05:00
Dylan M. Taylor 7bc833ff6a formats: cut over OBJ/GLB mesh export and EXR writing to craft-libs (#697)
* formats: cut over OBJ/GLB mesh export and EXR writing to craft-libs (#778)

* fix(export): use Format::OpenExr for craft-image-codecs

* fix(export): import std::io::Cursor in tests

* test(engine): handle OBJ output without leading header before o

* chore: repin craft-mesh and craft-image-codecs to craft-libs main
2026-11-19 20:43:02 -05:00
chasse20 311bf89885 Auto: Integrate texture export and preserve browser log sources
Keep per-set export settings and case-insensitive filename deduplication. Route browser warnings and completion counts through MapExporter, and retain both the 2D view and texture export parity sections.
2026-11-20 01:19:32 +00:00
chasse20 5c75584c99 Auto: Fix export plans, texture tags, and integer staging
Use first-wins filenames in export plans, match MaterialX tags to the encoded samples, and keep nonempty scaled UDIM tiles at least one pixel wide. Quantize native-order integer rasters directly into bytes to remove the second float buffer.

Validated with formats and engine release tests, formatting, Clippy, layering, Wasm checks, and comparative heap measurements.
2026-11-20 00:37:15 +00:00
chasse20 7d276ad502 Auto: Fix PGM metadata and PSD and TIFF export handling
Use the written luminance space in PGM filenames and MaterialX tags. Reject oversized PSD files before resizing and name the independent alpha plane. Write straight-alpha metadata in float TIFFs while preserving float samples and ICC profiles.
2026-11-19 23:52:08 +00:00
chasse20 050ec8c1a8 Auto: Fix save destinations and refresh viewer resources
Honor template and layout destinations, preserve the active layout mode, and update the template library after a successful write. Keep Log copy and selection, rotated fill feedback, and image-view restoration consistent with the visible session.

Refresh lighting when an imported environment changes or disappears. Share image resampling by resolution, skip unused headless uploads, bound tile conversion batches, and avoid cloning trace scenes per row slice. Keep the new display and shortcut types in dedicated files.
2026-11-19 23:38:04 +00:00
chasse20 8d44bbc278 Auto: Preserve export plans and reduce texture export memory
Keep desktop previews and UDIM sizing aligned with writes. Preserve map overrides across template edits, prevent cross-set MaterialX references, validate map options and forward them through MCP. Use the shared PGM and PSD writers and enforce the PSD dimension limit.

Reuse diffusion storage, borrow float TIFF samples, skip padding for empty plans and release ZIP inputs as they are packed. Release browser download URLs and callback references on success and failure. Give export messages original wording and organize new types by file.

Validated with release tests, Clippy, layering, WebAssembly, offscreen UI checks and paired allocation probes.
2026-11-19 23:14:14 +00:00
vangel76 aba0c1ef24 Export tests: wait for layout before a second click, count the frames of a window close click 2026-11-19 10:28:07 +01:00
vangel76 1491aea8f1 Drop a test assertion that cannot fail on its own 2026-11-19 10:11:54 +01:00
vangel76 729aa837df Export window: freeze settings at Export, refuse same-name overwrites, keep overrides with their maps and sets
- Export takes each texture set's parameters and the output folder when it is clicked; later
  edits do not reach the running export. Export is greyed with no texture set ticked.
- Two texture sets that would write the same file name stop the export before it starts (UI);
  file.exportTextures skips a file named like one an earlier set of the same call exports, with
  a warning, instead of replacing it.
- Closing the window stops the export before it writes another set; opening another project
  stops it, and a set that moves takes its pending export along.
- Per-map overrides follow their map when the template's maps are moved or removed.
- Cancel after texture sets moved, Reset all, and settings saved before they had an owner keep
  the ticks and overrides.
- A set's file type override starts from the template's type when its maps share one.
- PGM luminance is taken before the colour space conversion.
- The Output templates footer counts the maps the current set exports.
2026-11-19 10:11:41 +01:00
vangel76 d595d52770 Fix batch-3 CI test and review findings
- Use a 128 px sample session in the unlit-switch test (main requires 128 or more)
- Drop a deferred Other... view whose image was removed during a bake
- Keep the neutral material of lit Metallic/Roughness views when spec/gloss is on
- Resend the shown Image view after texture sets are recreated
- Drop the default search query only at a word boundary
- Restart the render when the display background changes
- Document when viewport.frame resets the 2D view
2026-11-19 10:00:47 +01:00
vangel76 3cbe724030 UI batch 3: view mode picker, display settings, shortcuts, 2D view, log, templates and Window menu
Combines issues #675, #676, #677, #678, #679, #682, #683, #680, #681 and #684.

- View mode combo with section titles, reference names, Other... image picker and an unlit switch
- Display Settings: environment picker grid and drop slot, reference slider ranges, background color, environment alignment, shadow computation mode and opacity
- Settings > Shortcuts with sections, Reset all to default, Delete to clear and conflict warnings; reference action names and default keys
- 2D view: rotate, snap rotate, drag zoom, F reset, wider zoom limits, UV tile grid, numbers, hover label and one mesh wireframe switch
- Log panel with sources, level colours, selection, copy and clear; the exported log keeps each entry's time, level and source
- Save as template, reference template names and a remembered template
- Window menu with Toolbars, per-mode layouts, Hide UI check mark and views per mode
2026-11-19 08:15:57 +01:00
vangel76 222343ae8f Export textures window: per-set and per-map overrides, more file types, progress console, output templates layout
Adds the reference's export settings page (lists, menus, tooltips, Cancel undoes),
per texture set overrides for template, file type, size and padding, per output map
file type and bit depth, JNG/PGM/PSD/32-bit float TIFF writers with bit depth per
file type, dithering and diffusion padding, a progress bar with Cancel Export, a
console and a tree in the list of exports, and the Output templates tab layout with
its right-click menu.
2026-11-19 08:07:39 +01:00
chasse20 4ff9cab867 Auto: Integrate main and fix UI state, bake reporting, and export plans
Preserve main's procedural patterns and linked-material changes. Keep camera navigation, pending dialogs, Settings drafts, shortcut capture, and shelf contents consistent across project and UI state changes.

Mark persisted panel edits as modified. Accept existing bake settings in presets, count newly baked maps, and open failed bakes on the General log channel. Record log times and severity when each event occurs.

Reuse selected export plans, move completed JSON results into place, and avoid copying cached shelf paths or building unused preset catalogs. Add regression coverage and update the control protocol examples.
2026-11-19 01:47:14 +00:00
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
chasse20 26bf15cf3c Auto: Fix procedural mask scale and reduce fill picker allocations
Apply scalar scale once when creating a procedural mask. Preserve explicit two-axis placement and the projection stored in existing projects. Read placement directly from the command parameters during edits.

Render procedural swatches only for visible picker tiles. Reserve space for the full selection and sort project images in the finished row list. Update the fill documentation for image imports, pattern resolution, and the Gradient Map menu.
2026-11-18 22:38:56 +00:00
FredApps 3163bea5e6 Merge remote-tracking branch 'origin/main' into docs/colour-param-space 2026-11-18 18:15:41 +07:00
Dylan M. Taylor 4651e7dee0 Merge pull request #487 from MorionTutoriales/investigate/id-map-481
Preserve separate OBJ parts with matching names for Submesh ID baking
2026-11-18 06:13:25 -05:00
FredApps ca79d108e4 Merge remote-tracking branch 'origin/main' into docs/colour-param-space
# Conflicts:
#	crates/engine/src/layer_cmds.rs
#	crates/engine/src/mask_cmds.rs
2026-11-18 17:22:38 +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 1b83d93689 Auto: Start TextureCraft with no project and restore that state on close
Start interactive desktop and web sessions with an empty workspace. Keep the sample project available from the File menu and preserve desktop control-mode startup behavior.

Report the closed state through automation, disable commands that require a project, and release viewport render targets on close. Update menus, documentation, and regression tests for startup, close, and command availability.
2026-11-18 08:49:01 +00:00
chasse20 b85088526a Auto: Merge main and reconcile Tile Generator fill sources
Use the Tile Generator sampling context for gradient maps and retain pattern settings and gradient stops through fill edits. Keep the shared picker alongside the gradient, decal symmetry, and layer selection controls. Collect thumbnails after the dock and detached windows draw.

Update affected tests for the merged picker and cover image-backed and reduced-resolution gradients.
2026-11-18 07:25:28 +00: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 f9635574ea Auto: Repair invalid decal symmetry axes on project load
Clamp saved axis values above 2 to Z, matching the renderer’s fallback. Extend the regression to check that a saved axis of 255 becomes 2 on load and stays 2 after a rotation edit.
2026-11-18 05:46:19 +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
chasse20 26490af2b9 Auto: Harden command and clone bounds and reduce mask allocations
Reject overflowing set indexes, saturate layer moves and clone offsets, and validate path corner flags before mutation. Clear discarded path caches and replace disabled-mask previews with a blank upload.

Reduce repeated selection allocations and temporary mask buffers. Preserve public reexports while separating types, and complete scoped comment and guard-spacing cleanup.

Validated paint and focused engine tests, workspace Clippy, production wasm checks, layering and formatting.
2026-11-18 04:14:11 +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
chasse20 23ded4d481 Auto: Release stale project state and guard closed-session work
Discard pending resize/import work and thumbnail snapshots on successful
project replacement. Reject closed-project headless and direct control work,
and prevent capture of the previous viewport immediately after Close.

Clone selected-layer metadata only while the Add effect menu is open.
Complete scoped naming, spacing, comments and regression coverage.

Validated release tests for engine, automation, UI and desktop; formatting,
workspace clippy, layering, wasm, panic tests, and offscreen/GPU regressions.
2026-11-18 00:16:38 +00:00
chasse20 f06c8acecf Auto: Integrate main and defer hidden picker previews
Create image and anchor previews only for visible picker tiles, advance
outside thumbnail frames so stale handles can expire, and reuse bilinear
corner samples. Add focused preview and lifetime regressions and complete
scoped comment, spacing, and slider-constant cleanup.

Preserve the prepared main integration. Validated with affected release
tests, workspace Clippy, layering, wasm, panic_hunt, formatting, and
offscreen UI snapshots.
2026-11-18 00:05:33 +00: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 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
vangel76 bac934d5a5 Start with no project open; File > Close returns to the empty state
Removes the start window and the startup sample project. With no project open the views are empty (view picker only), Layers and Properties are empty, project-only menu items and commands are disabled, and the status bar shows only the version.
2026-11-17 22:00:22 +01:00
Rebornim 7ceb03a52e The source picker offers images to mask fills, and a pattern's scale leaves the fill's projection alone 2026-11-17 17:11:01 +00:00
Rebornim d858fdba36 Pattern edits take the seed with tile settings, a uniform pick outranks them, gray rows take a typed value, the output size follows the UV tiles 2026-11-17 16:27:46 +00:00
Rebornim 7c28d4f5f5 Tile Generator image inputs
The Custom image input shape draws one of the pattern's input images in each tile, picked at random or by tile number, through the shape's tiling, angle, scale and turns; the background image shows under the shapes instead of the background value. Patterns read images through a PatternContext (its resolution and the image resources), which the compositor passes; procedural() keeps evaluating without images.
2026-11-17 16:27:37 +00:00
Rebornim cf62277857 Pattern settings in fill commands
layer.fill.set, effect.add.fill and effect.set take `tile` (Tile Generator settings in camelCase, menu choices by label or id, brought into range), `tileDefaults` and a pattern's `resolution`, `customResolution` and `resolutionFactor`; settings alone edit the current pattern, and picking the kind a channel already has keeps them. effect.set picks a mask fill's pattern with `procedural` and a uniform value with `uniform`. project.inspect reports both.
2026-11-17 16:26:58 +00:00
chasse20 009bb0c4d1 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-17 16:22:03 +00:00
Chris Hassebrook 1bdca09fc0 Merge pull request #263 from Aalzard/pbr-folder-import
Import a folder, files or zip of PBR textures as one fill layer
2026-11-17 11:19:04 -05:00