Skip to content

feat: a Tools menu, a Build list, mesh tools and bridge fixes - #11

Open
raighen wants to merge 2 commits into
mafia2online:mainfrom
raighen:pr/tools-and-build
Open

raighen wants to merge 2 commits into
mafia2online:mainfrom
raighen:pr/tools-and-build

Conversation

@raighen

@raighen raighen commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Based on main. This is the first half of #10: everything in it except the loading zones, which stay in #10 as a draft on top of this.

What

  • Tools menu. Windows over jobs that only the MCP server could do: Hide triangles, Mirror to winter, Stream map, Clone / Replace / Export car.
  • Hide triangles. Cuts an opening in a stock mesh without rebuilding it. With the window open the triangles are picked by clicking them on the mesh in the viewport, or by a box for many at once; what would be hidden is outlined first, and the count says what goes on each level of detail. A mesh whose geometry other objects draw too is cut alone (it gets a geometry block and buffers of its own first, as a duplicate does) or together with them. mesh_hide_triangles does the same with shared: own | all.
  • Build list. Build opens a window first: each edited archive with a tick and the files of its working copy that differ from the archive the game has. Files written before the session are marked. "Add archive" packs a working copy changed by hand.
  • Mesh tools. mesh_materials re-points a slot, collision_unused_hulls and crash_placements clean up, scene_find finds a collision placement by its hull.
  • Bridge. A skinned mesh can gain vertices (its remap pools are rebuilt), two levels of one object go in one push, a person's mesh is no longer turned twice in Blender.
  • Library browser. Pictures of characters, wardrobe pieces and cars.
  • Fix. A resize of the viewport while a district loads no longer ends the program.

How it was checked

  • Illusion.slnx builds clean, dotnet format clean on the touched files.
  • Probes, passed/failed: hide-triangles 25/0, build-list 23/0 (46/0 over six archives), remap-pools 105/0, archive-thumbs 9/0, editor-tools 23/0, mcp 66/0, material-editor 65/0, season-mirror 26/0, object-transplant 65/0, bridge-material 69/0, car-clone 77/0.
  • This code was gone over twice with your findings on feat(mcp): tools that drive the map editor, actor import across archives, light placement #3 to fix: an imported object brings textures its own archive does not hold #9 as the checklist, by a reader who had not written it; what that found is fixed here (the Build list missing a deleted resource or a deleted Mipmap, a comparison failure locking the Build button, a slot of a shared material block re-pointed for every object, and smaller ones).
  • By hand in the running editor: triangles picked by clicks on a mesh that shares its geometry, hidden on it alone and undone, and the same through mesh_hide_triangles with shared set to own and to all; Build pressed in the Build window and the built archive compared with its working copy; Export car run from its window; Clone car and Mirror to winter up to their refusals.

Limits

  • A click picks triangles of the level of detail drawn up close. On a coarser level only the triangles lying on the picked ones go with them; where a level is cut coarser it stays whole, and the window says so. The box takes every level.
  • A slot of a material block several objects draw with is not re-pointed; the refusal names them.
  • The first box query of scene_find decodes each distinct collision hull once.
  • A picture of an archive that was never opened extracts it first.

Tools menu: windows over jobs only the MCP server could do - Hide triangles,
Mirror to winter, Stream map, Clone / Replace / Export car.

Hide triangles cuts an opening in a stock mesh without rebuilding it. The
triangles are picked by clicking them on the mesh in the viewport, or by a box;
what would be hidden is outlined first. A mesh whose geometry other objects draw
too is cut alone (it gets a geometry block and buffers of its own first) or
together with them; mesh_hide_triangles takes the same choice as `shared`.

Build opens a window first: each edited archive with a tick and the files of its
working copy that differ from the archive the game has; "Add archive" packs a
working copy changed by hand.

Mesh tools: mesh_materials re-points a slot, collision_unused_hulls and
crash_placements clean up, scene_find finds a collision placement by its hull.

Bridge: a skinned mesh can gain vertices (its remap pools are rebuilt), two
levels of one object go in one push, a person's mesh is no longer turned twice
in Blender. The library browser shows pictures of characters, wardrobe pieces
and cars. A resize of the viewport while a district loads no longer ends the
program.

This is the work of the release/raighen line of the raighen fork without its
loading-zone editing, which stays in a pull request of its own.
…review

- "This one and the others" redrew no other object when the mesh had several
  levels of detail: such an object draws from its level rows and its own row
  carries no mesh, so it was dropped before the edit could walk its levels. The
  buffer was cut for all and the viewport showed one.
- The refusal for an instanced mesh looked at the mesh's own row only; with
  several levels the instanced rows are the level rows, and the copies vanished
  from the viewport. Every row that draws the mesh is asked now, and an
  instanced object among the sharers refuses "all".
- On a coarser level a triangle whose three corners lay on the picked ones went
  with them even when it spanned what was not picked (a door, from frame to
  frame). Its middle and the middles of its edges are asked too.
- The picks are dropped when a Blender session starts or ends; the choice for
  shared geometry starts over with another mesh; a click on Hide that brought
  the window forward does not hide a count that changed under it; the texts
  no longer say more than is known.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant