Commit Graph

4 Commits (8f253a848a2cd7cac1c3abf4df4ebca485ae0e8d)

Author SHA1 Message Date
Amir Alexander Abdelbaki 8f253a848a Write every model that moved, and say which ones are waiting
`Write to source` saved the selected row and only that. Nudge three things into
place, click the third and press it, and two of them were still sitting in
memory with nothing on screen to say so - which reads exactly like a button
that does not save, because the file you go and look at is usually not the one
that was selected when you pressed it.

So it writes everything that has moved. A row whose model no longer matches
what its module declares is marked with a `*` until it has been written, so
what is pending is on the list rather than in your memory, and the report says
how many files were written and which. A model no module names - a sword part,
a gem case, an icon of its own - has nowhere to put a transform, and is now
named in that report rather than passed over in silence: it keeps its mark,
because it really is moved and really is unsaved.

Nothing about the writing itself changed. It was tested one model at a time,
which is the one case where the old behaviour was indistinguishable from the
new.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 21:31:00 +02:00
Amir Alexander Abdelbaki 8e5178ece6 A hue per object, and faces that cannot be confused with their opposite
Untextured, every model came out the same red. The hue was the box's index
within its model and almost every model here is one box, so a scene of eight
was eight objects sharing hue zero - the one thing the colour was supposed to
tell you was the one thing it did not. So `face_colour` takes a hue now, and
the quickstart hands each model its own: successive golden-ratio turns around
the wheel, so any two are far apart and the third is not squeezed between them,
indexed on the model's place in the whole list rather than on what happens to
be visible. The boxes of one model spread a tenth of a turn either side, near
enough to read as one object and far enough to count. Left alone the hue is
what it always was - the wheel split per shape - so ARMOUR_GUI and the unwrap
templates are unchanged.

The shades were the other half. Six faces were sharing three saturations, and
east and west were separated by nothing but a fifth of a value - which is the
worst place to be thin, because opposite faces are the pair you can only ever
see one of at a time and so have nothing to compare against. Each face now sits
at its own rung of both ladders, and each opposite pair is far apart on both:
up is pale and brightest against a down that is vivid and darkest, north vivid
and bright against a washed, dim south, west the palest against a vivid,
mid-dark east.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 21:23:45 +02:00
Amir Alexander Abdelbaki 6dba9d9f24 Two buttons that write: the transform back, and the UVs afresh
The quickstart could show that a model was in the wrong place and then leave you
to retype the number somewhere else. `Write to source` closes that: the panel's
translation and rotation go back into the module entry they were read from,
with its scale and its origin left as the module had them, because placement
lives in the module rather than in the geometry. A model no module names - a
sword part, an icon of its own - has nowhere to write to and says so instead of
guessing at a file. Whole numbers stay whole, so an axis a drag never touched
comes back reading `0` rather than `0.0`.

`Unwrap UVs` is the other half, and it is the same unwrap ARMOUR_GUI does when
it saves: every face gets a rectangle of its own, the atlas size is written
beside the boxes, and the faces keep the texture key they already name rather
than being pointed at `#0`. A template is painted to match only where there is
no texture yet - a guide is scaffolding, and overwriting art someone has
painted because the boxes moved would be the tool destroying the work it exists
for. A sprite has no boxes to cut, and says that rather than writing an empty
atlas.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 21:01:16 +02:00
Amir Alexander Abdelbaki e7b211932f A viewport that draws, and a front door that opens with no arguments
The armour tools would not start and then would not draw, for two reasons that
looked like one. pyvista and pyvistaqt are packaged by hardly any distribution,
so `guiplatform` now keeps a virtualenv at `tools/.venv` and re-runs the tool
inside it when the interpreter it was started with cannot find the stack -
built with `--system-site-packages`, so the distribution's Qt stays the Qt in
use. Only an absent module sends us there; a PySide6 that will not load is a
system problem the venv shares, and it still gets its own message.

The black viewport was the other half, and it was ours. Handing pyvistaqt a
`vtkGenericOpenGLRenderWindow` is the right idea for VTK's C++ widget and wrong
for this one: the Python `QVTKRenderWindowInteractor` paints from `paintEvent`,
never implements `paintGL`, never binds Qt's framebuffer and never makes a
context current, so the render window it was given drew into no context at all.
Nothing raised - VTK would not even read its own buffer back. pyvistaqt makes
its own render window now, which is the only one it knows how to drive, and the
probe builds its viewport the same way the tools do rather than a way that
always failed. That probe had been timing out on every launch for the same
reason, so Wayland could never be chosen anywhere; it now says what actually
went wrong, X protocol errors included.

ARMOUR_QUICKSTART is the front door: no arguments, every model in the tree -
worn armour, icons, sword parts, the loose item models - listed with the first
one showing, and a jar's models listed after ours when one is passed, because a
socket is geometry cut into a plate that lives in Armory's jar. Where each
model goes comes from the mod's own module data, since the `origin` a module
names is the part MIAPI draws it under; without Armory's slot transforms a worn
model is flipped onto its part but not offset along it, and it says so.

The left panel is that model's MIAPI transform. Three arrows on the model's
origin move it, a toggle swaps them for three rotation rings, and the numbers
are the ones a module writes - a drag is unwound back through the pivot and the
flip before it reaches them, so what the panel reads is what goes in the JSON.
Nothing here writes: the number is what you leave with.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 20:53:07 +02:00