BS-JD-203 - Drag/drop material and texture application #18

Closed
opened 2026-06-06 01:47:25 -04:00 by Rbanh · 6 comments
Owner

Summary

Make texture/material drag/drop work consistently for static mesh actors, primitive actors, and brush faces.

Why

The material workflow should use one predictable drop path across current meshes and future brush geometry.

Implementation notes

  • Normalize drop target detection for renderer slots, primitive actors, and brush faces.
  • Preview material/texture application before commit.
  • Route mutations through operator/history path.
  • Preserve inherited source defaults when explicit overrides are cleared.

Acceptance criteria

  • Dropping material or texture onto supported targets previews result.
  • Static mesh, primitive, and brush targets use consistent commit/cancel behavior.
  • Undo restores previous material state.
  • Unsupported targets explain why drop is unavailable.

Tests/docs

Material application tests across target kinds. Update README controls and docs/editor material workflow.

## Summary Make texture/material drag/drop work consistently for static mesh actors, primitive actors, and brush faces. ## Why The material workflow should use one predictable drop path across current meshes and future brush geometry. ## Implementation notes - Normalize drop target detection for renderer slots, primitive actors, and brush faces. - Preview material/texture application before commit. - Route mutations through operator/history path. - Preserve inherited source defaults when explicit overrides are cleared. ## Acceptance criteria - [x] Dropping material or texture onto supported targets previews result. - [x] Static mesh, primitive, and brush targets use consistent commit/cancel behavior. - [x] Undo restores previous material state. - [x] Unsupported targets explain why drop is unavailable. ## Tests/docs Material application tests across target kinds. Update README controls and docs/editor material workflow.
Rbanh added this to the M2 - Content workspace and asset pipeline milestone 2026-06-06 01:47:25 -04:00
Rbanh added the
roadmap:jackdaw
type:feature
priority:P0
area:assets
labels 2026-06-06 01:47:25 -04:00
Author
Owner

Progress landed in cc6acb1 (Complete M0 editor asset workflow).

Completed M0-relevant portion:

  • Texture/material apply actions are routed through asset operators.
  • Actor Authoring Material texture refs are now Asset Browser-backed picker/drop fields with browse, locate, clear, hover/drop highlighting, compact rows, and thumbnail previews.
  • Full-row hit testing fixed so drag hover is stable across the slot.
  • JPEG loading enabled so .jpg textures can be assigned and previewed/loaded.

Closing this ticket for the M0 drag/drop material+texture application workflow. Follow-up work for comprehensive material browsing/cataloging remains in BS-JD-201, and PBR texture-set auto-detection remains in BS-JD-202.

Progress landed in `cc6acb1` (`Complete M0 editor asset workflow`). Completed M0-relevant portion: - Texture/material apply actions are routed through asset operators. - Actor `Authoring Material` texture refs are now Asset Browser-backed picker/drop fields with browse, locate, clear, hover/drop highlighting, compact rows, and thumbnail previews. - Full-row hit testing fixed so drag hover is stable across the slot. - JPEG loading enabled so `.jpg` textures can be assigned and previewed/loaded. Closing this ticket for the M0 drag/drop material+texture application workflow. Follow-up work for comprehensive material browsing/cataloging remains in BS-JD-201, and PBR texture-set auto-detection remains in BS-JD-202.
Rbanh closed this issue 2026-06-06 05:06:35 -04:00
Rbanh reopened this issue 2026-06-06 05:06:53 -04:00
Author
Owner

Correction: reopening this because BS-JD-203 is assigned to M2 and still includes broader target-kind/preview acceptance criteria (primitive/brush faces and richer commit/cancel coverage) beyond the M0 work.

cc6acb1 should be treated as M0 progress for actor material/texture picker/drop and operator routing only. Remaining M2 scope stays open.

Correction: reopening this because BS-JD-203 is assigned to M2 and still includes broader target-kind/preview acceptance criteria (primitive/brush faces and richer commit/cancel coverage) beyond the M0 work. `cc6acb1` should be treated as M0 progress for actor material/texture picker/drop and operator routing only. Remaining M2 scope stays open.
Author
Owner

Expanded renderer-slot dependency: #51

Material/texture drag-drop now depends on the stable slot and resolver contract in #51.

The supported target matrix includes static renderer slots, skinned renderer slots, primitive material bindings, and brush faces. A one-slot renderer may assign directly; multi-slot renderers must expose an explicit slot/all choice. Clearing an assignment restores the imported source material. Preview/commit/cancel and undo must use the same slot-aware operator path, and material-only edits must not respawn geometry, joints, animation players, deformed buffers, or BLAS data.

#18 remains the user-facing drag/drop workflow; #51 owns the underlying material assets, instances, stable slots, migration, and render-path semantics.

### Expanded renderer-slot dependency: #51 Material/texture drag-drop now depends on the stable slot and resolver contract in #51. The supported target matrix includes static renderer slots, skinned renderer slots, primitive material bindings, and brush faces. A one-slot renderer may assign directly; multi-slot renderers must expose an explicit slot/all choice. Clearing an assignment restores the imported source material. Preview/commit/cancel and undo must use the same slot-aware operator path, and material-only edits must not respawn geometry, joints, animation players, deformed buffers, or BLAS data. #18 remains the user-facing drag/drop workflow; #51 owns the underlying material assets, instances, stable slots, migration, and render-path semantics.
Author
Owner

Renderer-slot and texture-parameter drag/drop progress

The local #51 implementation adds the missing shared foundation and extends the user workflow:

  • Material/Instance application targets both static and skinned renderer slots through one operator/history path.
  • Base Material standard texture fields, shader-schema texture fields, stored custom bindings, and sparse Material Instance texture overrides use one project-wide picker/drop control.
  • Top-level project textures and imported model texture subassets are valid payloads; non-texture drops do not mutate the draft.
  • Dropping/browsing onto an unchecked instance slot creates the sparse override; Clear removes it and resumes inheritance.
  • Material-only assignment leaves skinned hierarchy and pose state intact.

Evidence and verification: #51 comment 865.

#18 stays open for the broader preview/commit/cancel matrix across primitive and brush-face viewport targets.

### Renderer-slot and texture-parameter drag/drop progress The local #51 implementation adds the missing shared foundation and extends the user workflow: - Material/Instance application targets both static and skinned renderer slots through one operator/history path. - Base Material standard texture fields, shader-schema texture fields, stored custom bindings, and sparse Material Instance texture overrides use one project-wide picker/drop control. - Top-level project textures and imported model texture subassets are valid payloads; non-texture drops do not mutate the draft. - Dropping/browsing onto an unchecked instance slot creates the sparse override; Clear removes it and resumes inheritance. - Material-only assignment leaves skinned hierarchy and pose state intact. Evidence and verification: [#51 comment 865](https://git.spacetrainclubhouse.com/Falling-Metal-Interactive/Blacksite/issues/51#issuecomment-865). #18 stays open for the broader preview/commit/cancel matrix across primitive and brush-face viewport targets.
Author
Owner

Targeted viewport-drop audit

The current drag card is visually polished, but the behavioral acceptance is not complete:

  • viewport release applies to the pre-existing selection rather than the surface under the pointer;
  • multi-slot renderers silently receive the assignment on every slot;
  • hydrated draw hits already expose HydratedRendererMaterialBinding, but the drop path does not use its authored actor/slot identity;
  • primitives and brush faces are not resolved as explicit viewport targets;
  • unsupported authored actors can receive a generic MaterialDesc instead of a specific rejection;
  • there is no persistent hover preview with exact rollback on target change/cancel.

The planned corrective slice uses the existing mesh-picking path for exact renderer-slot hits, authored brush-face intersection for stable face IDs, transient non-dirty preview state, and one typed operator/history commit on release. Leaving the viewport or pressing Escape restores the exact snapshot and removes helpers.

Material/Instance payloads will target renderer slots, primitives, and brush faces. Texture payloads will target primitive/brush base-color bindings; renderer slots will reject them with guidance to create/edit a Material Instance rather than mutating a shared material implicitly. A viewport hit will never broaden silently to all slots.

Plan: .cursor/plans/material_library_and_targeted_drop_2026-07-12.plan.md.

Implementation begins on a clean branch after #49 publication. This issue remains open.

## Targeted viewport-drop audit The current drag card is visually polished, but the behavioral acceptance is not complete: - viewport release applies to the pre-existing selection rather than the surface under the pointer; - multi-slot renderers silently receive the assignment on every slot; - hydrated draw hits already expose `HydratedRendererMaterialBinding`, but the drop path does not use its authored actor/slot identity; - primitives and brush faces are not resolved as explicit viewport targets; - unsupported authored actors can receive a generic `MaterialDesc` instead of a specific rejection; - there is no persistent hover preview with exact rollback on target change/cancel. The planned corrective slice uses the existing mesh-picking path for exact renderer-slot hits, authored brush-face intersection for stable face IDs, transient non-dirty preview state, and one typed operator/history commit on release. Leaving the viewport or pressing Escape restores the exact snapshot and removes helpers. Material/Instance payloads will target renderer slots, primitives, and brush faces. Texture payloads will target primitive/brush base-color bindings; renderer slots will reject them with guidance to create/edit a Material Instance rather than mutating a shared material implicitly. A viewport hit will never broaden silently to all slots. Plan: `.cursor/plans/material_library_and_targeted_drop_2026-07-12.plan.md`. Implementation begins on a clean branch after #49 publication. This issue remains open.
Author
Owner

Exact viewport-drop acceptance complete

Implemented in 02247f0, with live evidence in 3794faa.

The corrective target contract is now in place:

  • hydrated static/skinned draws map through HydratedRendererMaterialBinding to one exact stable slot;
  • primitives target their actor Material;
  • brushes resolve one exact stable face ID;
  • Material/Instance payloads support all three target kinds;
  • loose Texture payloads support primitive/brush base color and reject renderer slots with Material Instance guidance;
  • locked, linked, unsupported, missing, and incompatible targets give explicit invalid feedback;
  • preview is transient and non-dirty, restores on target change/outside/Escape/right-click, and captures viewport selection input;
  • release restores transient state first and commits exactly one typed operator/history action;
  • a viewport hit never broadens silently to every renderer slot.

Live Wayland QA verified green Ground / Surface acquisition, visible material/inspector/usage preview, one release commit, exact undo restoration, and a second preview canceled with Escape without another commit.

Exact green surface target and transient Material Instance preview

Focused tests cover exact multi-slot assignment/undo, brush-face-only preview/restore, primitive Material/Texture resolution, renderer Texture rejection, and locked-target rejection. The full workspace check, strict Clippy, all tests, dev/hot-reload feature matrices, level validation (0 blockers), and navigation freshness all pass. Full verification record.

## Exact viewport-drop acceptance complete Implemented in [`02247f0`](https://git.spacetrainclubhouse.com/Falling-Metal-Interactive/Blacksite/commit/02247f0), with live evidence in [`3794faa`](https://git.spacetrainclubhouse.com/Falling-Metal-Interactive/Blacksite/commit/3794faa). The corrective target contract is now in place: - hydrated static/skinned draws map through `HydratedRendererMaterialBinding` to one exact stable slot; - primitives target their actor Material; - brushes resolve one exact stable face ID; - Material/Instance payloads support all three target kinds; - loose Texture payloads support primitive/brush base color and reject renderer slots with Material Instance guidance; - locked, linked, unsupported, missing, and incompatible targets give explicit invalid feedback; - preview is transient and non-dirty, restores on target change/outside/Escape/right-click, and captures viewport selection input; - release restores transient state first and commits exactly one typed operator/history action; - a viewport hit never broadens silently to every renderer slot. Live Wayland QA verified green `Ground / Surface` acquisition, visible material/inspector/usage preview, one release commit, exact undo restoration, and a second preview canceled with Escape without another commit. ![Exact green surface target and transient Material Instance preview](https://git.spacetrainclubhouse.com/attachments/dfca7917-a612-468f-a055-b9d3f380ffdd) Focused tests cover exact multi-slot assignment/undo, brush-face-only preview/restore, primitive Material/Texture resolution, renderer Texture rejection, and locked-target rejection. The full workspace check, strict Clippy, all tests, `dev`/`hot-reload` feature matrices, level validation (0 blockers), and navigation freshness all pass. [Full verification record](https://git.spacetrainclubhouse.com/Falling-Metal-Interactive/Blacksite/src/branch/codex/material-library-targeted-drop/docs/editor/evaluations/material-library-targeted-drop/README.md).
Rbanh closed this issue 2026-07-12 13:20:44 -04:00
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Falling-Metal-Interactive/Blacksite#18
No description provided.