spine-parts 2.37.0 → 2.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/AUTHORING.md +126 -8
- package/docs/STABILITY.md +139 -4
- package/package.json +1 -1
- package/src/assemble.ts +33 -6
- package/src/build.ts +29 -12
- package/src/config.ts +92 -12
- package/src/depthworkflow.ts +4 -7
- package/src/editedparts.ts +168 -0
- package/src/meshdraft.ts +8 -4
- package/src/painting-reference.ts +210 -0
- package/src/parts.ts +35 -5
- package/src/provenance.ts +5 -0
package/docs/AUTHORING.md
CHANGED
|
@@ -162,6 +162,7 @@ read by no CPU stage).
|
|
|
162
162
|
| `assemble.keep_under_occluders` | assemble | **authored**, optional array of unique source part names from `assemble.plan`, default `[]` (issue #825). For each named part, keep its own See-through RGBA where the front-most covering part in the final draw stack has alpha greater than 0 and below `CORE_ALPHA` (250), including a cover in the other run. Covers at raw alpha <= 8 are ghosts and are not kept under; a ghost-cleaned sample with final alpha 0 is absent cover and does not trigger restoration. Only original opaque own-layer samples are restored after source projection/closing and protected from later seam re-take; merged/rim, cap, under-fill and authored replacement pixels are excluded. This keeps their existing provenance and makes no holes; fully opaque cover and absent cover keep the old path. Cuts and limb pieces inherit the source part's protection. Unknown names: `CONFIG_NAME_RESOLVES`; duplicates: `CONFIG_PART_UNIQUE`; invalid shape: `CONFIG_FIELD_TYPE`. Inspect the part's own amodal layer first: this handle preserves its existing content and cannot complete a missing pixel — in particular, it does not close a motion opening inside the figure (`figure_openings` / [Openings inside the figure on undeclared layer pairs](#openings-inside-the-figure-on-undeclared-layer-pairs-issue-933)) where the lower layer has no opaque core under an opaque upper layer (measured with every `assemble.plan` part named in `keep_under_occluders`: `0` of `1` pair-animation warnings across `demo`'s eight animations closed, with `hair_back\|handwear_r` on `hop` frame `5` staying at `40` cells over `28` allowed in `38x70` world units at `2.517` world units/cell, while `scarf` reads `CLEAR` (`0` warnings) both with and without `keep_under_occluders`; use `assemble.extend_painting` when the lower part lacks opaque source material under an opaque upper cover). Example: `"keep_under_occluders": ["shin_r"]`. |
|
|
163
163
|
| `assemble.require_hidden_extent` | assemble, build | **authored**, optional array of unique `{part, occluder}` source-name pairs from `assemble.plan` (issue #1047). The distinct occluder must draw after the part. Before cleanup, projection, underfill, cuts or limb splitting, the original selected source is normalized to the rig grid. Own support is alpha >8. Its enclosed holes are `fillHoles(support) \ support`, using four-connected exterior background. Any hole cell under the resolved front-most named occluder (alpha >8) refuses `ASSEMBLE_HIDDEN_EXTENT_ABSENT`. Zero holes with measurable filled-support overlap passes. No overlap or unavailable original ancestry refuses `ASSEMBLE_HIDDEN_EXTENT_UNMEASURED`. A region take's output (`assemble.take`) counts as the selected source. Cover resolves over `assemble.plan` source families only; cut slots are not resolved as cover, which is a stated limit. Omitted or `[]` adds no reading or output. This is a source-support bar reached by build at assemble. See [Original hidden extent required](#original-hidden-extent-required). |
|
|
164
164
|
| `assemble.occluders` | assemble, build | **authored**, optional (issues #1230, #1237, #1241, #1246, #1251, #1259): `[{image, sha256, under, over?, plate?, part?, grow?, guard?, rgb_within}]` — an RGBA PNG of what stands in front of the character on the painting's grid (`image`, relative to the config's directory; another size refuses `ASSEMBLE_OCCLUDER_GRID`), its bytes' sha256 (`CONFIG_OCCLUDER_SHA256`), the plan parts it stands over (`under`, `CONFIG_NAME_RESOLVES`), optional distinct plan parts that draw this occluder (`over`, `CONFIG_NAME_RESOLVES`, `CONFIG_PART_UNIQUE`), optional receipted plate directory (`plate`, `ASSEMBLE_OCCLUDER_PLATE_*`), optional part name (`part`, `CONFIG_FIELD_TYPE`, `CONFIG_PART_NAME`, `CONFIG_PART_UNIQUE`, `CONFIG_PART_ATTACHED`), optional non-negative integer rig-px dilation radius (`grow`, `CONFIG_FIELD_TYPE`; absent means `0`), optional non-negative integer rig-px under-keep dilation radius (`guard`, `CONFIG_FIELD_TYPE`; absent means `0`), and an integer 0–255 (`rgb_within`). After any take and before projection, a pixel of an `under` part's selected layer at alpha above 128, where the occluder's alpha is above 0, within `rgb_within` (max channel) of the painting there, is the occluder's colour copied into the layer: `assemble` prints `WARN ASSEMBLE_OCCLUDER_COLOUR_COPIED` with the part, the rig px count and the first pixel. On the rig grid, occluder membership is the boolean core where the occluder image's alpha is strictly above `128` (`COPIED_ALPHA_ABOVE`), dilated by `growMask`'s `(2 * grow + 1)^2` square when `grow > 0` (`parts.json` records top-level `occluder_grow` with `{occluder, image, grow, covered_px_before, covered_px_after}` for each entry with `grow > 0`; the occluder-split take and `occluders[i].plate` do not read `grow`); holding is a front part's alpha at or above `250` (`CORE_ALPHA`). Under `--project visible`, an `under` part's pixels (and every cut piece or limb segment derived from it) inside the under-keep mask — the `alpha > 128` core dilated by `max(grow, guard)` via `growMask`'s `(2 * r + 1)^2` square (`parts.json` records top-level `occluder_guard` with `{occluder, image, guard, guarded_px_before, guarded_px_after}` for each entry with `guard > 0`; `guard` paints nothing, changes neither `occluders[i].part` nor `ASSEMBLE_OCCLUDER_UNHELD`, has no effect when `guard <= grow` though the record is still written, and is not read by the occluder-split take or `occluders[i].plate`) — keep the base run's surface rather than projecting `--source`. When `over` is declared, each `(over, under)` pair in an entry draws `over` in front of `under` regardless of mixed-run depth or two-run role band (`ASSEMBLE_OCCLUDER_DRAW_ORDER` if `assemble.plan` draws `over` behind `under`, `ASSEMBLE_OCCLUDER_DRAW_CYCLE` on contradictory `over`/`under` cycles, `ASSEMBLE_OCCLUDER_OVER_TAKEN` if an `over` part's layer is not taken by `assemble.take`). When `part` is declared, `assemble` emits a `painting:<part>` part (`parts/<part>.png`, placed immediately before the first slot of any `over` part of that entry across `full` and `head`, counting pieces cut from an `over` part — "before the first `over` part" wins when a piece derived from `under` sits after `over`, and when `over` is omitted the part is placed after the last slot derived from `under`) holding `--source` at alpha `255` over the occluder membership (`alpha > 128`, after `grow`) minus the pixels held at `alpha >= 250` (`CORE_ALPHA`) by every part drawn in front of it (`ASSEMBLE_OCCLUDER_EMPTY` if `0` rig px remain); when `part` is omitted and any occluder pixel (`alpha > 128`, after `grow`) is not held at `alpha >= 250` (`CORE_ALPHA`) by a part drawn in front of it, `assemble` prints `WARN ASSEMBLE_OCCLUDER_UNHELD` with the count and first pixel. |
|
|
165
|
+
| `assemble.edited_parts` | assemble, build | **authored**, optional (issue #1278): `{dir, receipts: [{part, file, sha256, from_sha256, editor}]}`. Replaces named base-plan parts with final rig-pixel PNG files after all automatic passes. `dir` is relative to the config; `file` is relative to `dir` and must not be absolute. Keeps names, boxes and draw order. The current assembled PNG must match `from_sha256`; the edited file must match `sha256` and the assembled dimensions. See [Edited rig-space parts](#edited-rig-space-parts-assembleedited_parts-issue-1278). |
|
|
165
166
|
| `assemble.editor_receipts` | assemble, build | **authored**, optional (issue #946): `{receipts: [{file, sha256, from_sha256, editor}], required?, trace_parts?}`. Each receipt records an image edited in an image editor; `file` (relative to the config's directory) must exist and hash to `sha256`, verified at assemble; `from_sha256` and `editor` are the author's declaration, held only to form. With `required: true`, every author-made layer, hidden-art layer, cut `under` and limb `cap` the build reads, alternate sets' runs included, needs a receipt whose `sha256` is its file's. With `trace_parts: true` (issue #947), every part's pixels must trace to a layer of the split or to a receipted image: the receipts are demanded as under `required`, and every shape the config draws through a part — a cut's `polygon`, `seethrough.arm_split`, a limb's `split.line`, a patch's `box`, a painting extension's `band` — is refused (`ASSEMBLE_PART_SOURCE`). Absent, no file is read and no byte moves. See [Editor receipts](#editor-receipts-assembleeditor_receipts-issue-946) and [Part sources](#part-sources-assembleeditor_receiptstrace_parts-issue-947). |
|
|
166
167
|
| `limbs` | assemble (the cut and the caps), rig (through `regions`), check (`LIMB_ONE_BONE`) | **proposed** by `propose --keypoints` (issue #349), then checked: `{<limb>: {segments: [{part, from, bone}, {part, from, bone, joint, range?, cap?, edge?, cap_shape?, cut_band?, hybrid?}, …], split?, layout?, front?}}`, the upper segment first. The rule is *Limbs: cut at their joints* below the table. `part` is a new part (`CONFIG_PART_NAME`, `CONFIG_PART_UNIQUE` against the plan, patches, cuts and every other limb part); `from` a plan part or a cut's piece (`CONFIG_NAME_RESOLVES`) — the layer the segment's pixels come from, which is cut into the limb parts and is not itself made: a `meshes` or `regions` entry for it is `CONFIG_NAME_RESOLVES`, and the segments of one limb that take one part are consecutive (`CONFIG_LIMB_FROM_RUN`); `bone` a declared bone, each segment's the child of the one before (`CONFIG_LIMB_BONES_CHAIN`); the upper segment names no `joint`, `range`, `cap`, `edge`, `cap_shape` or `cut_band` (`CONFIG_KEY_KNOWN`), every other names its `joint` (`CONFIG_FIELD_PRESENT`) — the joint is its bone's origin; `range` is `[min, max]` degrees from rest with `min <= 0 <= max` (`CONFIG_LIMB_RANGE`), which `assemble` writes into the lower part's `parts.json` record and `check` poses the joint at — its two ends and its middle — reading the seam there (`SEAM_OVER_RANGE`, issue #360; rig-c needs no rotation limit); `cap` a PNG path relative to the config's directory (`CONFIG_FIELD_TYPE`); `edge` `"feather"` (issue #360), the one value it takes, and `cap_shape` `"disc"` (issue #360) or `"ball"` (issue #579) (`CONFIG_FIELD_TYPE` on any other) — the cut's geometry at that joint, *Limbs: cut at their joints* below; absent, the cut is hard and the cap the layer's half-disc of half the limb's width; `cut_band` a whole number of px, 1 or more (`CONFIG_FIELD_TYPE`), on a segment that takes the segment above's part — between two layers nothing is cut, so a band there is `CONFIG_KEY_KNOWN` — places the cut within that many px of the joint line (issue #360, *Limbs: cut at their joints*); absent, the cut is the joint line. Each limb part is attached like any part — `regions.<part>`, which must be the segment's `bone` (`CONFIG_LIMB_BONE`), or a mesh, which `check` holds to that bone alone (`LIMB_ONE_BONE`). With `limbs`, `assemble` reads `bones` too (`CONFIG_FIELD_PRESENT` without it). Absent, nothing is cut at a joint and no byte of any output moves. Optional `front` (issue #664), `{parts: [<own segment part>, …], after: "<produced part>"}`, gives each named segment a second slot `<part>_front`, empty at setup, placed after `after`'s slot family, for a gesture set to draw on (`CONFIG_FRONT_SCOPE`, `CONFIG_FRONT_NAME`, `CONFIG_FRONT_LAYOUT`; *Front slots (issue #664)* below) |
|
|
167
168
|
| `bones` | rig; `propose --from-config` | **proposed** by `propose`, then corrected. A single bone `{name, parent, at, tip?}` or a chain `{chain, parent, points, tip, link_inherit?}` whose links are named `<chain>0 … <chain>n`. Parents come before children. In `rig.json` each link is **turned along its chain** — `rotation` is the direction from its origin to the next link's (the last link's to `tip`) and `length` that distance (issue #73), so a physics constraint added downstream finds a lever; under `--idle-keys ctl` the link's `<link>_ctl` carries the turn and the length and the link sits at local rotation 0 beneath it. A single bone with a `tip` is turned the same way, towards its tip, with that distance as its length (issue #239); a tip on the bone's own origin is refused (`RIG_TIP_DISTINCT`). The five face bones `eye_r`, `eye_l`, `brow_r`, `brow_l` and `mouth` (by name, when one has no tip of its own) are turned to the eye line — the line through the origins of `eye_r` and `eye_l` as `bones` writes them, read image-left to image-right, drawn when parts.json holds both an `eyewhite-r` and an `eyewhite-l` part — so the blink's `scaley` squashes across the eye line on a tilted head; move an eye bone and the line moves with it. With one eyewhite or none, or an eye bone missing, the rig stage's `face axis:` line says so and they keep the page's axes. A bone under a face bone keeps the face's axis. With the line, `rig.json` also declares `invariants.axes` — one entry, `"face"`, through `eye_r` and `eye_l`, holding the turned face bones (and their controls) — so rig-c's gate holds the build to the line; the line is the one rigc draws through the same two bones, so the tolerance is only the float floor — the largest gap the emitted (float32) bones have to it, rounded up to 6 places plus one 6-place unit — and the `face axis:` line prints it. With the line the rig stage also adds `head_up` (issue #250): a slotless bone under `head`, at head's origin, turned to the eye line + 90 degrees and as long as the eye midpoint lies from head's origin along that axis — the head's frame, which a rule that needs it reads; `head` keeps its own frame, so no key on it or under it changes meaning, and a config bone of that name is refused (`RIG_HEAD_UP_NAME_FREE`). A face bone with its own `tip` is held too (issue #258), in a second entry, `"face_tips"`, when its tip lies along the line within whole-pixel rounding — a tip written in whole pixels sits at most sqrt(2)/2 px off the point of the line it stands for, so its direction may sit up to asin((sqrt(2)/2) / length) degrees off — with its tolerance measured the same way; a tip further off is the bone's own axis, and the `face axis:` line names it with its gap and that bound. A failure is rig-c's `A51_BONES_LIE_ALONG_THEIR_DECLARED_AXIS` line, which names the bone and the fix (rig-c's `docs/AUTHORING.md` §3.7 and §5.2); with no line no entry is written and A51 reports SKIP. Every region on a turned bone is turned back, so the setup pose does not move. Any other single bone keeps world rotation 0; one whose parent is a link is turned back upright. A single bone may declare `inherit` (issue #348): what it takes from its parent's transform, one of rig-c's own mode names exactly as rig-c's table spells them — `normal`, `onlyTranslation`, `noRotationOrReflection`, `noScale`, `noScaleOrReflection` (rig-c's `RigBone.inherit`) — written to that bone in `rig.json` as declared; any other spelling, `"NoScale"` included (the runtime would fold its first letter; nothing here folds or maps), is refused (`CONFIG_BONE_INHERIT`), and a chain takes no `inherit` (`CONFIG_KEY_KNOWN`). A chain may instead declare `link_inherit` (issue #369), an object mapping its own expanded link names to those same modes, for example `"link_inherit": {"leg_r1": "noScale"}`. Only the named link changes; omitted links inherit normally. A key outside this chain is `CONFIG_NAME_RESOLVES`, with this chain's valid link names in the detail; a non-object or non-string mode is `CONFIG_FIELD_TYPE`, and another mode spelling is `CONFIG_BONE_INHERIT`. The mode is forwarded to the expanded link, or to its control under `--idle-keys ctl`, by the same rule as a single bone. This is an authored opt-in: `propose` does not add it. Its setup rotation is the turn from where rig-c's own poser puts the bone with no rotation of its own under that mode, so it still stands upright (or along its tip) at the setup pose. Where the idle gives the bone a `<bone>_ctl`, the mode goes on the control: the control is the bone the parent's rotation reaches, and the bone under it inherits normally, so the idle's keys moved onto the control still turn it. A foot that does not take its shin's rotation (`noRotationOrReflection` or `onlyTranslation`) keeps its shoe level while the leg is posed (`FEET_STAY_LEVEL`, §7); which mode is the author's. `noScale` keeps a shin or shoe's shape under a scaled parent but still takes the parent's rotation: a shoe that must also stay level needs a separate rotation constraint, for example a transform constraint from an unrotated bone. This does not change the proposed feet's existing inheritance or `FEET_STAY_LEVEL` default. An automatic mesh weighted through a bone with a mode other than `normal` gets no derived amplitude (its row names the bone) and no residual envelope (rig-c's `SKINNING_RANGE_UNSUPPORTED`). Absent, `rig.json` carries no `inherit` and no byte moves |
|
|
@@ -1049,6 +1050,92 @@ receipt is demanded, and a run with no author-made or hidden-art layer, no
|
|
|
1049
1050
|
`under` and no `cap` demands none either. Absent the block, no file is read and
|
|
1050
1051
|
every output is byte-identical to a build without it.
|
|
1051
1052
|
|
|
1053
|
+
### Edited rig-space parts (`assemble.edited_parts`, issue #1278)
|
|
1054
|
+
|
|
1055
|
+
Use this block for a PNG edited at the exact crop and scale written by
|
|
1056
|
+
`assemble`, such as an alpha edge retouch. Author-made run-space layers and
|
|
1057
|
+
`assemble.editor_receipts` keep their existing behavior; a receipt ledger
|
|
1058
|
+
alone does not apply a replacement.
|
|
1059
|
+
|
|
1060
|
+
```json
|
|
1061
|
+
"edited_parts": {
|
|
1062
|
+
"dir": "retouched",
|
|
1063
|
+
"receipts": [{
|
|
1064
|
+
"part": "sleeve_r",
|
|
1065
|
+
"file": "sleeve_r.png",
|
|
1066
|
+
"sha256": "<sha256 of the edited PNG file bytes>",
|
|
1067
|
+
"from_sha256": "<sha256 of this config's unedited assembled part PNG>",
|
|
1068
|
+
"editor": "<the image editor used>"
|
|
1069
|
+
}]
|
|
1070
|
+
}
|
|
1071
|
+
```
|
|
1072
|
+
|
|
1073
|
+
The block belongs in `assemble`. Both fields are required; `receipts` may be
|
|
1074
|
+
empty. Every receipt takes all five fields. `part` must name an existing part
|
|
1075
|
+
in the base plan, once only. `dir` resolves relative to the config's directory;
|
|
1076
|
+
`file` resolves relative to that directory and must be a relative path.
|
|
1077
|
+
Hashes are lowercase SHA-256 of encoded file bytes, including PNG metadata;
|
|
1078
|
+
`from_sha256` is checked against the PNG the normal assemble would write for
|
|
1079
|
+
this config, rather than merely accepted as a declaration. `editor` remains
|
|
1080
|
+
the author's non-empty declaration; the tool cannot verify which editor was
|
|
1081
|
+
used. The decoded width and height must equal the assembled part's box.
|
|
1082
|
+
A changed crop, scale, name or order needs a plan or cut change instead.
|
|
1083
|
+
|
|
1084
|
+
Replacement occurs after projection, drift checks, seam override, ghost
|
|
1085
|
+
cleanup, paintingEdge and final region restoration. No automatic pass runs
|
|
1086
|
+
on the replacement afterward. The output part PNG is the verified file's
|
|
1087
|
+
original bytes, not a decoded and re-encoded copy. Every other base part
|
|
1088
|
+
keeps its bytes, name and box. Recomposite and final output measurements are
|
|
1089
|
+
calculated from the replaced images in their recorded order and boxes.
|
|
1090
|
+
Reports describing upstream source coverage or allocation retain their
|
|
1091
|
+
upstream-stage meaning; a receipt does not turn them into final edit attribution.
|
|
1092
|
+
Alternate sets build their own declared art without this base-only block;
|
|
1093
|
+
assets they inherit from the base use the edited base image.
|
|
1094
|
+
|
|
1095
|
+
Prepare cut fill masks before recording rig-space edits. Mask preparation
|
|
1096
|
+
removes cut `under` inputs, so its baseline may differ from normal assemble;
|
|
1097
|
+
a receipt made for the normal build can then be refused by
|
|
1098
|
+
`ASSEMBLE_EDITED_PART_BASELINE`.
|
|
1099
|
+
|
|
1100
|
+
The part keeps its original `from` source identity. Its optional
|
|
1101
|
+
`provenance.edited_part` records `edit: "edited_parts[i]"`, `dir`, the complete
|
|
1102
|
+
`receipt` (`part`, `file`, both hashes and `editor`) and these exact RGBA-position
|
|
1103
|
+
counts relative to the normal assembled PNG:
|
|
1104
|
+
|
|
1105
|
+
| field | population |
|
|
1106
|
+
| --- | --- |
|
|
1107
|
+
| `changed_px` | Every position with any differing RGBA channel, including transparent RGB changes and deleted pixels. |
|
|
1108
|
+
| `changed_counted_px` | Changed positions whose final alpha is above 8. |
|
|
1109
|
+
| `changed_excluded_px` | Changed positions whose final alpha is at most 8, including deletions. Together with `changed_counted_px`, sums to `changed_px`. |
|
|
1110
|
+
| `removed_opaque_px` | Positions whose baseline alpha was above 8 and final alpha is at most 8; a subset of `changed_excluded_px`. |
|
|
1111
|
+
|
|
1112
|
+
The existing value partition is preserved:
|
|
1113
|
+
`unchanged_layer_px + hand_px + automatic_px = opaque_px`. `hand_px` counts
|
|
1114
|
+
surviving counted pixels attributed to hand edits; it is not `changed_px`.
|
|
1115
|
+
Raw-value equality takes precedence, and unchanged RGBA retains its previous
|
|
1116
|
+
writer. Hand-attributed replacement entries use `edited_parts[i]` in
|
|
1117
|
+
`provenance.edits`. The whole-file receipt covers unchanged and transparent
|
|
1118
|
+
positions separately from that partition. With `assemble.stage_map`, the
|
|
1119
|
+
replaced sidecar entry also carries `edited_part`; its runs keep the normal
|
|
1120
|
+
final-alpha partition and resolve replacement writer IDs through the sidecar's
|
|
1121
|
+
`edits` list. With `editor_receipts.trace_parts`, the complete edited file is
|
|
1122
|
+
receipt-associated; this does not exempt other config shapes or baseline
|
|
1123
|
+
inputs from their existing source/receipt checks.
|
|
1124
|
+
|
|
1125
|
+
All replacement refusals happen before output emission, including when an
|
|
1126
|
+
output directory already contains a successful build. The folder and every
|
|
1127
|
+
existing file remain unchanged. Each code and its remedy is listed in
|
|
1128
|
+
[CHECKS](https://github.com/rig-c/parts/blob/main/docs/CHECKS.md#edited-rig-space-parts).
|
|
1129
|
+
Absent the block, no edited file is read, no new metadata is written and the
|
|
1130
|
+
default output retains its bytes.
|
|
1131
|
+
|
|
1132
|
+
Replacement does not relax rig-c's gate or `check`'s existing seam bars.
|
|
1133
|
+
For the public-example edit control, report raw setup-pose-versus-recomposite
|
|
1134
|
+
mean and any-difference pixel count beside the same no-block build: both
|
|
1135
|
+
edited figures must be no worse than baseline. A baseline of zero mean and
|
|
1136
|
+
zero differing pixels therefore requires zero for both edited figures too.
|
|
1137
|
+
Rounded `check.json` seam figures alone do not establish those raw values.
|
|
1138
|
+
|
|
1052
1139
|
### Part sources (`assemble.editor_receipts.trace_parts`, issue #947)
|
|
1053
1140
|
|
|
1054
1141
|
A part carved out of a layer along a line the author drew is not a part the
|
|
@@ -5575,6 +5662,13 @@ recorded transform. The record fields and sampling formula are specified in
|
|
|
5575
5662
|
| <a id="ASSEMBLE_TAKE_UNIQUE"></a>`ASSEMBLE_TAKE_UNIQUE` | repeated donor for one target tag at runtime | declare each target run/tag once |
|
|
5576
5663
|
| <a id="CONFIG_TAKE_UNIQUE"></a>`CONFIG_TAKE_UNIQUE` | config selects the same target run/tag more than once | retain one donor per target tag |
|
|
5577
5664
|
| <a id="ASSEMBLE_PART_SOURCE"></a>`ASSEMBLE_PART_SOURCE` | `assemble.editor_receipts.trace_parts` is `true` and a part's pixels are decided by a shape drawn in the config — an `assemble.cuts` (or an alternate set's `cuts`) `polygon`, `seethrough.arm_split`, a limb's `split.line`, an `assemble.patches` `box`, an `assemble.extend_painting` `band`; the object names the part and where the shape is declared, the detail the shape found (issue #947) | `config.json`: remove that entry and paint the piece as an author layer (`author:<label>`) in an image editor with its receipt in `assemble.editor_receipts.receipts`, or take the part whole from a layer of the split (a limb split may use `"edge": "painting"`) |
|
|
5665
|
+
| <a id="ASSEMBLE_EDITED_PART_UNKNOWN"></a>`ASSEMBLE_EDITED_PART_UNKNOWN` | A receipt names a part outside the base plan. | Use the existing base-plan part name; a new name needs a plan change. |
|
|
5666
|
+
| <a id="ASSEMBLE_EDITED_PART_FILE"></a>`ASSEMBLE_EDITED_PART_FILE` | The receipt file does not exist at dir/file. | Correct the config-relative dir or the directory-relative file, or supply that file. |
|
|
5667
|
+
| <a id="ASSEMBLE_EDITED_PART_SHA256"></a>`ASSEMBLE_EDITED_PART_SHA256` | The edited file bytes do not match sha256. | Use the intended edited file and record its exact file hash. |
|
|
5668
|
+
| <a id="ASSEMBLE_EDITED_PART_BASELINE"></a>`ASSEMBLE_EDITED_PART_BASELINE` | The current normal assembled part PNG does not match from_sha256. | Rebase the edit on this config's current assembled part and record that original file hash. |
|
|
5669
|
+
| <a id="ASSEMBLE_EDITED_PART_SIZE"></a>`ASSEMBLE_EDITED_PART_SIZE` | The edited PNG width or height differs from the assembled box. | Edit at the original crop and rig-pixel size; use a plan change for a new box. |
|
|
5670
|
+
| <a id="ASSEMBLE_EDITED_PART_DUPLICATE"></a>`ASSEMBLE_EDITED_PART_DUPLICATE` | More than one receipt names the same part. | Keep exactly one receipt for that part. |
|
|
5671
|
+
| <a id="ASSEMBLE_EDITED_PART_DECODES"></a>`ASSEMBLE_EDITED_PART_DECODES` | The verified file cannot be decoded as a PNG. | Supply a valid PNG and update its receipt hash. |
|
|
5578
5672
|
| <a id="ASSEMBLE_EDITOR_RECEIPT_MISSING"></a>`ASSEMBLE_EDITOR_RECEIPT_MISSING` | `assemble.editor_receipts.required` (or `trace_parts`, issue #947) is `true` and an edited image the build reads — an author-made or hidden-art layer of a base or alternate run, a cut `under`, a limb `cap` — has no receipt whose `sha256` is its file's; the detail gives the path and the sha256 found (issue #946) | edit the image in an image editor and add its receipt to `config.assemble.editor_receipts.receipts`; never generate or patch it in code |
|
|
5579
5673
|
| <a id="ASSEMBLE_EDITOR_RECEIPT_SHA256"></a>`ASSEMBLE_EDITOR_RECEIPT_SHA256` | a receipt's file hashes to another sha256 than the receipt records; the detail gives both | the receipt's `sha256`, or the file: it changed after the receipt was written, or the receipt names another file |
|
|
5580
5674
|
| <a id="ASSEMBLE_EDITOR_RECEIPT_FILE"></a>`ASSEMBLE_EDITOR_RECEIPT_FILE` | a receipt's `file` names no file, relative to the config's directory | that receipt's `file` |
|
|
@@ -5608,6 +5702,12 @@ recorded transform. The record fields and sampling formula are specified in
|
|
|
5608
5702
|
| <a id="ASSEMBLE_OCCLUDER_UNHELD"></a>`ASSEMBLE_OCCLUDER_UNHELD` (WARN) | `assemble.occluders[i].part` is omitted, and pixels of the declared occluder core (`alpha > 128`, `COPIED_ALPHA_ABOVE`, after any `grow`) are not held at `alpha >= 250` (`CORE_ALPHA`) by any part drawn in front of it; gives the unheld rig px count and first pixel | declare `part` on `config.assemble.occluders[i]` (and attach it in `regions`) to hold the remaining occluder pixels from `--source`, or take the missing front layer in `over` |
|
|
5609
5703
|
| <a id="ASSEMBLE_TAKE_SPLIT_OCCLUDER"></a><a id="ASSEMBLE_TAKE_SPLIT_EMPTY"></a>`ASSEMBLE_TAKE_SPLIT_OCCLUDER`, `ASSEMBLE_TAKE_SPLIT_EMPTY` | an occluder-split `assemble.take` entry whose `occluder` index does not exist in `config.assemble.occluders`, whose `part` is not in that entry's `under`, or whose `part` is in its `over`; a split take whose `covered_px` (base layer at `alpha > 8` where occluder `alpha > 128`) or `visible_px` (donor layer at `alpha > 8` where occluder `alpha <= 128`) is `0` | point `occluder` at the `config.assemble.occluders` entry that lists `part` in `under` (and not in `over`); use a base run with opaque material under the occluder and a donor run with opaque material outside it |
|
|
5610
5704
|
| <a id="CONFIG_HIDDEN_EXTENT_ORDER"></a>`CONFIG_HIDDEN_EXTENT_ORDER` | `assemble.require_hidden_extent` names the same source as part and occluder, or names an occluder drawn before the part | declare distinct source parts with the occluder after the part in `assemble.plan` |
|
|
5705
|
+
| <a id="PARTS_PAINTING_REFERENCE_INPUT"></a>`PARTS_PAINTING_REFERENCE_INPUT` | A named input is unreadable, unsealed, a symlink or invalid JSON/PNG | Restore the explicit frozen regular input |
|
|
5706
|
+
| <a id="PARTS_PAINTING_REFERENCE_HASH"></a>`PARTS_PAINTING_REFERENCE_HASH` | A named input differs from its expected SHA-256 | Restore its sealed bytes |
|
|
5707
|
+
| <a id="PARTS_PAINTING_REFERENCE_FRAME"></a>`PARTS_PAINTING_REFERENCE_FRAME` | The recorded run mode, padding or frame conflicts with the sealed source/config | Supply the matching original source/config and recorded producer manifest |
|
|
5708
|
+
| <a id="PARTS_PAINTING_REFERENCE_SCHEMA"></a>`PARTS_PAINTING_REFERENCE_SCHEMA` | The named declaration breaks its six-key grammar | Restore the producer sidecar |
|
|
5709
|
+
| <a id="PARTS_PAINTING_REFERENCE_OUTPUT"></a>`PARTS_PAINTING_REFERENCE_OUTPUT` | A named output conflicts or is unreadable | Preserve its bytes and resolve the collision |
|
|
5710
|
+
| <a id="PARTS_PAINTING_REFERENCE_WRITE"></a>`PARTS_PAINTING_REFERENCE_WRITE` | Reference publication failed | Preserve existing files and retry with the same sealed inputs |
|
|
5611
5711
|
| <a id="DIFF_COMPONENTS_INPUT"></a>`DIFF_COMPONENTS_INPUT` | `diff-components` needs readable PNG stack/painting/part images, a writable `--out` target when writing, explicit parts, positive integer floor, a finite threshold in [0,255], matching native dimensions and valid coverage/domain inputs; flags must be unique and known, with nonempty values | Supply the named missing or invalid input; no resampling or inferred figure is performed |
|
|
5612
5712
|
| <a id="DIFF_COMPONENTS_BINDING"></a>`DIFF_COMPONENTS_BINDING` | The shipped report reader found a stack or painting SHA-256 different from the supplied bytes; found and required digests are printed | Regenerate against the bytes being reviewed |
|
|
5613
5713
|
| <a id="DIFF_COMPONENTS_REPORT"></a>`DIFF_COMPONENTS_REPORT` | Invalid report JSON/spec, or its exhaustive inventory, definition, paths, domain or coverage differs from remeasurement; capped inventories are refused | Regenerate the complete versioned report against the same input paths, bytes, parts and figure domain |
|
|
@@ -8554,25 +8654,43 @@ Internal `SeamSupport.drawings` never enters check JSON. Named requirement
|
|
|
8554
8654
|
|
|
8555
8655
|
Import `configFileReferences` and, for annotations, `ConfigFileReference` from
|
|
8556
8656
|
`@rig-c/parts/src/config.ts` (issue #1134). Pass the JSON-parsed config object before
|
|
8557
|
-
loading it. Each result exposes `at`, the dotted field path, `value`, the
|
|
8558
|
-
|
|
8657
|
+
loading it. Each result exposes `at`, the dotted field path, `value`, the file
|
|
8658
|
+
path, and `set(next)`, which writes back to that field. Enumeration
|
|
8559
8659
|
leaves the object unchanged, skips absent, empty and non-string fields, and
|
|
8560
8660
|
excludes built-in skeleton names. It performs no validation or file reads;
|
|
8561
8661
|
use the normal loader for diagnostics.
|
|
8562
8662
|
|
|
8563
8663
|
```ts
|
|
8564
8664
|
import { configFileReferences } from '@rig-c/parts/src/config.ts';
|
|
8565
|
-
import { dirname, resolve } from 'node:path';
|
|
8665
|
+
import { dirname, relative, resolve } from 'node:path';
|
|
8566
8666
|
|
|
8567
8667
|
for (const reference of configFileReferences(raw)) {
|
|
8568
|
-
|
|
8668
|
+
const target = resolve(dirname(sourceConfig), reference.value);
|
|
8669
|
+
reference.set(relative(dirname(destinationConfig), target).replaceAll('\\', '/'));
|
|
8569
8670
|
}
|
|
8570
8671
|
```
|
|
8571
8672
|
|
|
8572
|
-
Here `sourceConfig`
|
|
8573
|
-
JSON-parsed object. Serialize
|
|
8574
|
-
|
|
8575
|
-
paths
|
|
8673
|
+
Here `sourceConfig` and `destinationConfig` are absolute config filenames and
|
|
8674
|
+
`raw` is the source's JSON-parsed object. Serialize it at `destinationConfig`;
|
|
8675
|
+
the relative paths keep pointing to the original files. Callers that copy files
|
|
8676
|
+
can instead set paths to the copies, relative to the destination config.
|
|
8677
|
+
|
|
8678
|
+
The declared fields are `requirements`, `motion.animations_from`, non-built-in
|
|
8679
|
+
`generation.control.skeleton`, each `assemble.occluders[i].image` and optional
|
|
8680
|
+
`plate`, and `assemble.edited_parts.receipts[i].file`. Each edited receipt's
|
|
8681
|
+
value joins its shared `dir` and its `file` with POSIX path semantics; the
|
|
8682
|
+
directory itself is not a reference. Its setter uses normalized POSIX segments,
|
|
8683
|
+
independent of the cwd, and reads the live `dir` on each call. When the target is
|
|
8684
|
+
representable under that directory, `dir` and every sibling receipt remain
|
|
8685
|
+
byte-for-byte unchanged. Otherwise it rebases `dir` to the normalized lexical
|
|
8686
|
+
common prefix with the target (`.` for an empty prefix), rewriting sibling files
|
|
8687
|
+
to preserve their original config-relative targets. This also applies to setters
|
|
8688
|
+
from the same enumeration after a rebase; enumerate again to read updated values.
|
|
8689
|
+
Invalid directories and invalid sibling fields remain for the loader to diagnose.
|
|
8690
|
+
Keep edited targets config-relative: an absolute
|
|
8691
|
+
target, including Windows absolute forms, is preserved as an absolute `file`
|
|
8692
|
+
and refused by the loader's existing `CONFIG_FIELD_TYPE`. This does not change
|
|
8693
|
+
the edited-parts reader or its refusals.
|
|
8576
8694
|
|
|
8577
8695
|
`checkFileReferences(raw, configFile, requirements?)` and `CheckFileReference`
|
|
8578
8696
|
are exported from the same `@rig-c/parts/src/config.ts` subpath (issue #1138).
|
package/docs/STABILITY.md
CHANGED
|
@@ -137,9 +137,26 @@ Each reference has `at: string` (a dotted config field), `value: string`
|
|
|
137
137
|
on the supplied object. Enumeration itself does not mutate, validate, read files,
|
|
138
138
|
or resolve paths. Empty and non-string values are omitted; invalid fields remain
|
|
139
139
|
for the loader to diagnose. Built-in control skeleton names are excluded.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
Declared references are `requirements`, `motion.animations_from`, non-built-in
|
|
141
|
+
`generation.control.skeleton`, each `assemble.occluders[i].image` and optional
|
|
142
|
+
`plate`, then each `assemble.edited_parts.receipts[i].file` (issue #1281).
|
|
143
|
+
An edited receipt's `value` is `posix.join(dir, file)`, relative to the config;
|
|
144
|
+
there is no `edited_parts.dir` reference. Its `set(next)` takes a config-relative
|
|
145
|
+
path and derives `file` from normalized POSIX segments without resolving either
|
|
146
|
+
operand against the process cwd. If the target is representable under the current
|
|
147
|
+
`dir`, that directory and every sibling receipt remain byte-for-byte unchanged.
|
|
148
|
+
Otherwise, `dir` becomes its normalized lexical common prefix with the target
|
|
149
|
+
(`.` for an empty prefix), and sibling files are rewritten to preserve their
|
|
150
|
+
original config-relative targets. Setters read the live directory, including
|
|
151
|
+
after another setter from the same enumeration rebases it. Invalid directories
|
|
152
|
+
and invalid sibling fields remain for the existing loader diagnostics.
|
|
153
|
+
Absolute targets, including Windows absolute forms, remain absolute in `file`
|
|
154
|
+
and are refused by the existing `CONFIG_FIELD_TYPE` check at the next load.
|
|
155
|
+
When relocating a config, resolve each source value, then pass its path relative
|
|
156
|
+
to the destination config directory for edited receipts. Other setters retain
|
|
157
|
+
their existing path contract. Enumeration follows the loader and assemble reader
|
|
158
|
+
declarations; it adds no file reads or validation. Existing deep package paths
|
|
159
|
+
remain available.
|
|
143
160
|
|
|
144
161
|
The same subpath exports `checkFileReferences(raw: unknown, configFile: string,
|
|
145
162
|
requirements?: RequirementsFile): CheckFileReference[]` and the
|
|
@@ -314,7 +331,7 @@ part name, `[i]` an entry of a list):
|
|
|
314
331
|
- **generation.control.skeleton**, the pose file it names when it is no built-in — required: `width`, `height`, `points`
|
|
315
332
|
- **seethrough** — required: `resolution`, `steps`, `seed`, `offload`; optional: `head_box`, `arm_split`
|
|
316
333
|
- **seethrough.arm_split** — required: `order`, and one of `x` or `line` (issue #439)
|
|
317
|
-
- **assemble** — required: `rig_scale`, `plan` (from plain `assemble` on); optional: `seam`, `project`, `ground`, `extend_below_crop`, `patches`, `cuts`, `alternates`, `head_face_underfill`, `yield_refused`, `stage_map`, `keep_under_occluders`, `require_hidden_extent`, `extend_painting`, `edge_splits`, `take`, `editor_receipts`, `occluders`
|
|
334
|
+
- **assemble** — required: `rig_scale`, `plan` (from plain `assemble` on); optional: `seam`, `project`, `ground`, `extend_below_crop`, `patches`, `cuts`, `alternates`, `head_face_underfill`, `yield_refused`, `stage_map`, `keep_under_occluders`, `require_hidden_extent`, `extend_painting`, `edge_splits`, `take`, `editor_receipts`, `edited_parts`, `occluders`
|
|
318
335
|
- **assemble.edge_splits[i]** — required: `over`, `under`, `band`
|
|
319
336
|
- **assemble.require_hidden_extent[i]** — required: `part`, `occluder`
|
|
320
337
|
- **assemble.occluders[i]** — required: `image`, `sha256`, `under`, `rgb_within`; optional: `over`, `plate`, `part`, `grow`, `guard` (issues #1230, #1237, #1241, #1246, #1251, #1259)
|
|
@@ -326,6 +343,8 @@ part name, `[i]` an entry of a list):
|
|
|
326
343
|
- **assemble.take[i].reference** — required: `sha256`; optional: `source`, `painting` (issue #1031). Exactly one of `source: true` or a config-relative `painting` PNG is required. The reference governs colour only and geometry follows `--source`. A region take requires an opaque `--source` because its donor must match the run input and the inputs command refuses see-through paintings, so flatten the plate first.
|
|
327
344
|
- **assemble.editor_receipts** — required: `receipts`; optional: `required` (issue #946, additive), `trace_parts` (issue #947, additive)
|
|
328
345
|
- **assemble.editor_receipts.receipts[i]** — required: `file`, `sha256`, `from_sha256`, `editor` (issue #946)
|
|
346
|
+
- **assemble.edited_parts** — required: `dir`, `receipts` (issue #1278; directory relative to the config)
|
|
347
|
+
- **assemble.edited_parts.receipts[i]** — required: `part`, `file`, `sha256`, `from_sha256`, `editor` (issue #1278; file relative to the edited-parts directory)
|
|
329
348
|
- **assemble.patches[i]** — required: `name`, `box`, `alpha`, `draw`
|
|
330
349
|
- **assemble.patches[i].draw**, when an object — required: `before`
|
|
331
350
|
- **assemble.cuts[i]** — required: `from`, `into`, `polygon`, `draw`, `overlap`; optional: `under`, `under_fill` (issue #1230: `under` is a path string or an object)
|
|
@@ -547,6 +566,91 @@ their existing whole-file parts.json identity contract; regenerate them.
|
|
|
547
566
|
Check's setup-painting comparison still flattens over its backdrop at source
|
|
548
567
|
resolution before resizing; it can differ for non-opaque paintings.
|
|
549
568
|
|
|
569
|
+
|
|
570
|
+
### Painting reference writer
|
|
571
|
+
|
|
572
|
+
`@rig-c/parts/src/painting-reference.ts` exports
|
|
573
|
+
`writePaintingReference({ manifest, source, config })`. Each input is a
|
|
574
|
+
`{ path, sha256 }` seal with an explicit expected lowercase SHA-256. The manifest
|
|
575
|
+
is the existing `parts.json`. The writer checks the recorded positive safe-integer
|
|
576
|
+
`rig_size` and scale against the sealed source/config through the existing frame
|
|
577
|
+
helpers, then calls `sourceInRig` and the existing PNG codec. It writes no parts,
|
|
578
|
+
meshes, measurements or manifest changes.
|
|
579
|
+
|
|
580
|
+
The two added files are `painting_in_rig.png` and `painting_in_rig.json` beside
|
|
581
|
+
that manifest. The JSON has exactly these keys in order:
|
|
582
|
+
|
|
583
|
+
```json
|
|
584
|
+
{
|
|
585
|
+
"schema": "rig-parts-painting-reference/1",
|
|
586
|
+
"manifest_sha256": "<sha256 of exact parts.json bytes>",
|
|
587
|
+
"path": "painting_in_rig.png",
|
|
588
|
+
"sha256": "<sha256 of exact PNG bytes>",
|
|
589
|
+
"resample": "lanczos3-rgb-opaque",
|
|
590
|
+
"rig_size": [1920, 1080]
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
`rig_size` is the recorded `[W,H]` tuple, with positive safe integers. `path` is a
|
|
595
|
+
literal portable relative path from the sidecar directory, which is the loaded
|
|
596
|
+
manifest directory. `parsePaintingReference(value)` validates the six-key grammar.
|
|
597
|
+
Consumer admission validates manifest SHA, package containment, PNG hash, RGBA8,
|
|
598
|
+
opaque alpha and exact dimensions. The consumer selects an inline
|
|
599
|
+
`parts.json.painting_in_rig` declaration first and uses this adjacent fallback
|
|
600
|
+
only when the inline key is absent. Existing manifest image roles are unchanged.
|
|
601
|
+
|
|
602
|
+
This is a public Bun/TypeScript API subpath. The package ships `src` and has no
|
|
603
|
+
`exports` map restricting it. A consumer with a package containing this module
|
|
604
|
+
can invoke the normal producer writer directly:
|
|
605
|
+
|
|
606
|
+
```ts
|
|
607
|
+
import { writePaintingReference } from '@rig-c/parts/src/painting-reference.ts';
|
|
608
|
+
|
|
609
|
+
const receipt = writePaintingReference({
|
|
610
|
+
manifest: { path: 'accepted/parts.json', sha256: expectedManifestHash },
|
|
611
|
+
source: { path: 'inputs/painting.png', sha256: expectedSourceHash },
|
|
612
|
+
config: { path: 'accepted/config.json', sha256: expectedConfigHash },
|
|
613
|
+
});
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
Run the consumer with Bun and retain `receipt` outside the inspected package.
|
|
617
|
+
An approved source consumption must resolve this updated source package. An
|
|
618
|
+
older installed package that lacks the module requires that source consumption
|
|
619
|
+
or a release carrying the module. The API does not register a project record.
|
|
620
|
+
|
|
621
|
+
The writer validates all input seals and destination collisions before staging.
|
|
622
|
+
Run mode comes from the manifest's `ghost_px` census: assemble records every
|
|
623
|
+
full/head layer, including zero ghost counts, and only single-run assembly omits
|
|
624
|
+
the head census. A full census is required. A resolution-square single run has
|
|
625
|
+
no `single_run_pad`; that absence does not imply two runs. A non-square single
|
|
626
|
+
run requires its recorded pad, whose `file_size` and `side` must match the sealed
|
|
627
|
+
source/config. Head-run census still requires a head box, even with an all-full
|
|
628
|
+
plan. Contradictory run, part, plan or padding evidence refuses under
|
|
629
|
+
`PARTS_PAINTING_REFERENCE_FRAME` before writing. The writer derives no missing
|
|
630
|
+
run-mode field from an image guess.
|
|
631
|
+
It publishes complete files with no-replace links, PNG first and sidecar last.
|
|
632
|
+
The sidecar is the declaration commit point. A partial I/O failure can leave a
|
|
633
|
+
complete unreferenced PNG. An exact retry verifies it and finishes the declaration.
|
|
634
|
+
Concurrent exact writers return the same seals. Conflicting destination bytes,
|
|
635
|
+
symlinks and moved inputs refuse. The caller keeps independent input writers
|
|
636
|
+
frozen during the operation. Only this invocation's staging directory is removed.
|
|
637
|
+
|
|
638
|
+
The returned `rig-parts-painting-reference-write/1` receipt carries the three
|
|
639
|
+
input seals and both output seals. Retain it with the execution/source receipt
|
|
640
|
+
outside the inspected package. It describes this derivation from sealed inputs.
|
|
641
|
+
All original manifest, texture, depth and revision bytes retain their identities.
|
|
642
|
+
The accepted-file inventory gains the two declared additions. No producer
|
|
643
|
+
execution in historical evidence is inferred from a current export.
|
|
644
|
+
|
|
645
|
+
| Refusal | Meaning and remedy |
|
|
646
|
+
| --- | --- |
|
|
647
|
+
| `PARTS_PAINTING_REFERENCE_INPUT` | A named input is unreadable, unsealed, a symlink or invalid JSON/PNG; restore the explicit frozen regular input. |
|
|
648
|
+
| `PARTS_PAINTING_REFERENCE_HASH` | A named input differs from its expected SHA-256; restore its sealed bytes. |
|
|
649
|
+
| `PARTS_PAINTING_REFERENCE_FRAME` | The manifest frame differs from sealed source/config geometry; supply the original source/config and recorded frame. |
|
|
650
|
+
| `PARTS_PAINTING_REFERENCE_SCHEMA` | The named declaration breaks its six-key grammar; restore the producer sidecar. |
|
|
651
|
+
| `PARTS_PAINTING_REFERENCE_OUTPUT` | A named output conflicts or is unreadable; preserve its bytes and resolve the collision. |
|
|
652
|
+
| `PARTS_PAINTING_REFERENCE_WRITE` | Publication failed; preserve existing files and retry with the same sealed inputs. |
|
|
653
|
+
|
|
550
654
|
| file | written by | what is stable |
|
|
551
655
|
| --- | --- | --- |
|
|
552
656
|
| `stage-map.json` | `assemble`, `build`, under `assemble.stage_map: true` | `rig-parts-stage-map/1`, cropped last-writer and pre-seam RLE maps with writer dictionaries and excluded counts. See [Per-pixel stage map](AUTHORING.md#per-pixel-stage-map). |
|
|
@@ -1056,6 +1160,37 @@ painting extension's `band`) is refused (`ASSEMBLE_PART_SOURCE`) before
|
|
|
1056
1160
|
anything is assembled. Absent or `false`, nothing more is demanded and no byte
|
|
1057
1161
|
moves.
|
|
1058
1162
|
|
|
1163
|
+
### Edited rig-space parts
|
|
1164
|
+
|
|
1165
|
+
The optional `assemble.edited_parts` block (issue #1278, additive) replaces
|
|
1166
|
+
existing base-plan parts with verified rig-pixel PNG files after all automatic
|
|
1167
|
+
passes and final restoration. It preserves boxes, names, draw order and
|
|
1168
|
+
original `from` identities. The encoded edited file bytes are emitted intact;
|
|
1169
|
+
recomposite and final accounting consume its decoded pixels. Both the edited
|
|
1170
|
+
file hash and the current normal assembled part's `from_sha256` are verified.
|
|
1171
|
+
The block does not change author-layer projection or editor receipt semantics.
|
|
1172
|
+
Alternate sets retain their own declared art; inherited base assets use the
|
|
1173
|
+
edited base image. No new flag bypasses rig-c or existing check bars.
|
|
1174
|
+
|
|
1175
|
+
Receipt association is additive `provenance.edited_part` metadata: the complete
|
|
1176
|
+
receipt and `dir`, `edit: "edited_parts[i]"`, `changed_px`,
|
|
1177
|
+
`changed_counted_px`, `changed_excluded_px` and `removed_opaque_px`.
|
|
1178
|
+
The four counts describe exact baseline-to-edited RGBA differences;
|
|
1179
|
+
`hand_px` keeps its existing final-alpha-above-8 partition meaning.
|
|
1180
|
+
The receipt covers the whole file, including unchanged and transparent
|
|
1181
|
+
positions; stage-map entries retain that association separately from writer
|
|
1182
|
+
runs. The strict parts reader rejects malformed associations and inconsistent
|
|
1183
|
+
counts. [AUTHORING](AUTHORING.md#edited-rig-space-parts-assembleedited_parts-issue-1278)
|
|
1184
|
+
defines paths, counts and the base-only scope.
|
|
1185
|
+
|
|
1186
|
+
An unknown part, missing file, edited hash mismatch, stale baseline hash,
|
|
1187
|
+
dimension mismatch or duplicate part is refused by its dedicated
|
|
1188
|
+
`ASSEMBLE_EDITED_PART_*` code before any output write. A non-decodable PNG is
|
|
1189
|
+
also refused before writes. A preexisting successful output remains unchanged.
|
|
1190
|
+
The [refusal table](https://github.com/rig-c/parts/blob/main/docs/CHECKS.md#edited-rig-space-parts)
|
|
1191
|
+
names each code. Without the block, existing outputs and metadata stay
|
|
1192
|
+
byte-identical; an empty receipt list applies no replacement.
|
|
1193
|
+
|
|
1059
1194
|
## Provider-map depth stages (#897)
|
|
1060
1195
|
|
|
1061
1196
|
The opt-in `depth-prepare` and `depth-apply` commands accept the separate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spine-parts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.1",
|
|
4
4
|
"description": "AI-authored 2D character parts from one anime painting and its See-through layer decomposition: measured parts, weighted-mesh rig specs, verified through rig-c before anything is written. A CLI for agents that cannot see the image.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/assemble.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { sourceCoverRun, type SourceCoverReading } from './sourcecover.ts';
|
|
2
|
+
import { replaceEditedParts, type EditedPartContext, type VerifiedEditedPart } from './editedparts.ts';
|
|
2
3
|
import { paintingReceivers, rawPaintingOwner } from './paintingowner.ts';
|
|
3
4
|
import { hiddenExtentProblems, type HiddenExtentDeclaration, type HiddenExtentSource } from './hiddenextent.ts';
|
|
4
5
|
import { headBoxInside } from './headbox.ts';
|
|
@@ -324,6 +325,8 @@ export function singleRunPadRecord(single: boolean, sourceW: number, sourceH: nu
|
|
|
324
325
|
}
|
|
325
326
|
|
|
326
327
|
export interface AssembleInput {
|
|
328
|
+
/** Verified whole-file base-part edits, placed after all normal raster passes. */
|
|
329
|
+
editedParts?: readonly VerifiedEditedPart[];
|
|
327
330
|
/** Observe allocation decisions after guarding and restoration. */
|
|
328
331
|
allocationEvent?: (event: PaintingAllocationEvent) => void;
|
|
329
332
|
/** Counterfactual before seeded takes, with whole-layer takes already applied. */
|
|
@@ -2864,6 +2867,8 @@ export function groundWarning(share: number, ground: Ground | undefined, rule: P
|
|
|
2864
2867
|
}
|
|
2865
2868
|
|
|
2866
2869
|
export interface PlacedPart {
|
|
2870
|
+
/** Verified edited PNG bytes; emit verbatim rather than encoding image again. */
|
|
2871
|
+
encodedBytes?: Uint8Array;
|
|
2867
2872
|
depthImage?: Raster;
|
|
2868
2873
|
record: PartRecord;
|
|
2869
2874
|
image: Raster;
|
|
@@ -5097,16 +5102,26 @@ export function retainRegionNeighbours(placed: PlacedPart[], before: readonly Pl
|
|
|
5097
5102
|
* after this returned writes only after green.
|
|
5098
5103
|
*/
|
|
5099
5104
|
export function assemble(input: AssembleInput): AssembleResult {
|
|
5100
|
-
|
|
5105
|
+
const contexts = (input.editedParts?.length ?? 0) === 0 ? undefined : new Map<PlacedPart, EditedPartContext>();
|
|
5106
|
+
// The internal map preserves classifications across region restoration even
|
|
5107
|
+
// when the caller does not request the report-only sidecar.
|
|
5108
|
+
const working = contexts === undefined ? input : { ...input, stageMap: true };
|
|
5109
|
+
if (input.regionTake === undefined) {
|
|
5110
|
+
const result = assembleParts(working, undefined, null, undefined, contexts);
|
|
5111
|
+
if (contexts !== undefined && input.stageMap !== true) delete result.stageMap;
|
|
5112
|
+
return result;
|
|
5113
|
+
}
|
|
5101
5114
|
const targets = regionTakeTargets(input.regionTake.targets, input.cuts, input.limbs);
|
|
5102
5115
|
const counterfactual = input.projectRule === 'core' ? { cleanup: new Map<string, RunLayer[]>(), seam: new Map<string, Uint8Array>() } : undefined;
|
|
5103
|
-
const before = assembleParts({ ...
|
|
5104
|
-
|
|
5116
|
+
const before = assembleParts({ ...working, editedParts: undefined, full: input.regionTake.full, head: input.regionTake.head, regionTake: undefined, requireHiddenExtent: undefined }, targets, null, counterfactual, contexts);
|
|
5117
|
+
const result = assembleParts(working, targets, before, counterfactual, contexts);
|
|
5118
|
+
if (contexts !== undefined && input.stageMap !== true) delete result.stageMap;
|
|
5119
|
+
return result;
|
|
5105
5120
|
}
|
|
5106
5121
|
|
|
5107
5122
|
/** The counterfactual is internal and is never emitted. Empty taken targets
|
|
5108
5123
|
* may be recovered by a take, so only that counterfactual permits them. */
|
|
5109
|
-
function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, beforeTake: AssembleResult | null = null, counterfactual?: { cleanup: Map<string, RunLayer[]>; seam: Map<string, Uint8Array> }): AssembleResult {
|
|
5124
|
+
function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, beforeTake: AssembleResult | null = null, counterfactual?: { cleanup: Map<string, RunLayer[]>; seam: Map<string, Uint8Array> }, editContexts?: Map<PlacedPart, EditedPartContext>): AssembleResult {
|
|
5110
5125
|
const emptyTargets = beforeTake === null ? targets : undefined;
|
|
5111
5126
|
const { source, extend, patches, seamRule, projectRule } = input;
|
|
5112
5127
|
const authoredDepths = input.depth === undefined ? new Map<string, AuthoredUnitDepth>() : authoredUnitDepths(input);
|
|
@@ -6400,7 +6415,7 @@ function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, befo
|
|
|
6400
6415
|
const upperIndex = limb === undefined ? -1 : lim.parts.findIndex(q => q.record.name === limb.name && q.record.segment === limb.segment - 1);
|
|
6401
6416
|
const capSource = limbIndex < 0 ? null : lim.capFrom[limbIndex];
|
|
6402
6417
|
const authoredDepth = authoredDepths.get(name);
|
|
6403
|
-
const
|
|
6418
|
+
const scalarFor = (art: Raster) => authoredDepth === undefined ? transportPartDepth(record, art, registeredDepth, {
|
|
6404
6419
|
map: run => runMap(frame, run), width: W, extend: extendKeys, owner: trace.from,
|
|
6405
6420
|
ring: trace.ring.data, region: region?.data ?? null,
|
|
6406
6421
|
copiedSource: (x, y) => {
|
|
@@ -6412,6 +6427,7 @@ function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, befo
|
|
|
6412
6427
|
},
|
|
6413
6428
|
...((limb?.cap?.image_px ?? 0) > 0 || (limb?.cap?.lower_px ?? 0) > 0 ? { unsupported: `cap copies ${(limb?.cap?.image_px ?? 0) + (limb?.cap?.lower_px ?? 0)} pixels from a separate cap image whose scalar grid is undeclared` } : {}),
|
|
6414
6429
|
}) : undefined;
|
|
6430
|
+
const scalar = scalarFor(image);
|
|
6415
6431
|
if (capSource !== null && upperIndex >= 0 && capSource.codes.some(code => code === CAP_FROM_UPPER)) {
|
|
6416
6432
|
const upper = limbPieces[upperIndex];
|
|
6417
6433
|
const keys = [upper.key, ...upper.extendKeys.filter((_, i) => upper.trace.from.some(v => v === i))];
|
|
@@ -6423,7 +6439,9 @@ function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, befo
|
|
|
6423
6439
|
}
|
|
6424
6440
|
if (scalar !== undefined) record.depth = scalar.reference;
|
|
6425
6441
|
if (scalar !== undefined && scalar.clampedSamples > 0) depthClamps.push({ part: name, samples: scalar.clampedSamples });
|
|
6426
|
-
|
|
6442
|
+
const placedPart = { record, image, ...(scalar === undefined ? {} : { depthImage: scalar.image }) };
|
|
6443
|
+
if (editContexts !== undefined) editContexts.set(placedPart, { baseline: null, visible, projected, paintingGain, ...(scalar === undefined ? {} : { depthForEdit: scalarFor }) });
|
|
6444
|
+
set(placedPart);
|
|
6427
6445
|
});
|
|
6428
6446
|
refuseIfAny(empty);
|
|
6429
6447
|
const placed: PlacedPart[] = order.map((d) => ('plan' in d ? planned[d.plan] : 'cut' in d ? cutPlaced[d.cut] : 'limb' in d ? limbPlaced[d.limb] : cut[d.patch]) as PlacedPart);
|
|
@@ -6490,6 +6508,7 @@ function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, befo
|
|
|
6490
6508
|
excluded_px: 0, runs: [] as Array<[number, number]>, pre_seam_writer_runs: [] as Array<[number, number]>,
|
|
6491
6509
|
};
|
|
6492
6510
|
p.record.provenance = pixelProvenance(p.image, p.record.x, p.record.y, W, writersInOrder[i], editNames, 0, valueBaselines.get(p.record.from) ?? null, map, preSeamWriters?.get(i));
|
|
6511
|
+
if (editContexts?.has(p)) editContexts.get(p)!.baseline = valueBaselines.get(p.record.from) ?? null;
|
|
6493
6512
|
if (map !== undefined) stageMap!.parts.push(map);
|
|
6494
6513
|
const depth = authoredDepths.get(p.record.name);
|
|
6495
6514
|
if (depth !== undefined) p.record.provenance.depth = depth;
|
|
@@ -6510,6 +6529,14 @@ function assembleParts(input: AssembleInput, targets?: ReadonlySet<string>, befo
|
|
|
6510
6529
|
return { ...original, runs: original.runs.map(remap), pre_seam_writer_runs: original.pre_seam_writer_runs.map(remap) };
|
|
6511
6530
|
});
|
|
6512
6531
|
}
|
|
6532
|
+
if ((input.editedParts?.length ?? 0) > 0) replaceEditedParts(placed, input.editedParts!, new Set(input.plan.map(([name]) => name)), stageMap!, editContexts!);
|
|
6533
|
+
if (editContexts !== undefined) for (const p of placed) {
|
|
6534
|
+
const samples = editContexts.get(p)?.depthClampedSamples;
|
|
6535
|
+
if (samples === undefined) continue;
|
|
6536
|
+
const previous = depthClamps.findIndex(row => row.part === p.record.name);
|
|
6537
|
+
if (previous >= 0) depthClamps.splice(previous, 1);
|
|
6538
|
+
if (samples > 0) depthClamps.push({ part: p.record.name, samples });
|
|
6539
|
+
}
|
|
6513
6540
|
// Provenance is now numbers/labels only. No later raster/figure operation
|
|
6514
6541
|
// reads report buffers; release all aliases before recomposite/error work.
|
|
6515
6542
|
valueBaselines.clear();
|
package/src/build.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readEditedParts } from './editedparts.ts';
|
|
1
2
|
import { SOURCE_COVER_FILE, sourceCoverReport, type SourceCoverSet } from './sourcecover.ts';
|
|
2
3
|
import { STAGE_MAP_FILE } from './provenance.ts';
|
|
3
4
|
import { withoutCheckRows } from './checkrow.ts';
|
|
@@ -173,6 +174,8 @@ export interface AlternateCliInput {
|
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
export interface AssembleStageInput {
|
|
177
|
+
/** Internal build protocol: reset owned outputs only after assembly is green. */
|
|
178
|
+
resetBuildOutput?: boolean;
|
|
176
179
|
/** A null set identifies the primary assembly evaluation. */
|
|
177
180
|
allocationEvent?: (event: PaintingAllocationEvent, set: string | null) => void;
|
|
178
181
|
/** Write source-edge evidence only when cut_material is explicitly declared. */
|
|
@@ -394,12 +397,14 @@ export function emitFillMasksStage(input: EmitFillMasksInput, log: Log): Array<{
|
|
|
394
397
|
const read = readRuns(input.full, input.head);
|
|
395
398
|
const takenRuns = applyTakenLayers(read, src, cfg, input.config);
|
|
396
399
|
const receipts = readEditorReceipts(cfg.assemble.editor_receipts, input.config);
|
|
400
|
+
const editedParts = readEditedParts(cfg.assemble.edited_parts, input.config, cfg.assemble.plan ?? []);
|
|
397
401
|
const runs = applyTakenRegions(takenRuns, src, cfg, input.config, undefined, receipts, input.source);
|
|
398
402
|
const fields = stageFields(cfg, runs.single ? { w: src.width, h: src.height } : null);
|
|
399
403
|
const strippedCuts = fields.cuts.map((q) => ({ from: q.from, into: q.into, polygon: q.polygon, draw: q.draw, overlap: q.overlap }));
|
|
400
404
|
const caps = fields.limbs === undefined ? undefined : readCaps(input.config, fields.limbs);
|
|
401
405
|
const occluders = cfg.assemble.occluders === undefined ? undefined : readOccluderInputs(cfg.assemble.occluders, input.config, src);
|
|
402
406
|
const result = assemble({
|
|
407
|
+
editedParts,
|
|
403
408
|
source: src,
|
|
404
409
|
full: runs.full,
|
|
405
410
|
head: runs.head,
|
|
@@ -514,6 +519,7 @@ export function assembleStage(input: AssembleStageInput, outs: AssembleOutputs,
|
|
|
514
519
|
const read = readRuns(input.full, input.head);
|
|
515
520
|
// Issue #946: every declared receipt is held to its file, and under `required` every edited image needs one, before anything is assembled.
|
|
516
521
|
const receipts = readEditorReceipts(cfg.assemble.editor_receipts, input.config);
|
|
522
|
+
const editedParts = readEditedParts(cfg.assemble.edited_parts, input.config, cfg.assemble.plan ?? []);
|
|
517
523
|
// Issue #947: under `trace_parts`, a shape drawn in the config through a part's pixels is refused with them.
|
|
518
524
|
refuseIfAny([...receipts.problems, ...missingReceipts(receipts, [...editedRunImages(read), ...editedConfigImages(input.config, cfg.assemble.cuts ?? [], cfg.limbs)]), ...untracedPartSources(cfg)]);
|
|
519
525
|
const takenRuns = applyTakenLayers(read, src, cfg, input.config);
|
|
@@ -530,7 +536,7 @@ export function assembleStage(input: AssembleStageInput, outs: AssembleOutputs,
|
|
|
530
536
|
const under = readUnders(input.config, fields.cuts, { sourcePath: input.source, rigSize, platesOut: underPlates });
|
|
531
537
|
const caps = fields.limbs === undefined ? undefined : readCaps(input.config, fields.limbs);
|
|
532
538
|
const occluders = cfg.assemble.occluders === undefined ? undefined : readOccluderInputs(cfg.assemble.occluders, input.config, src);
|
|
533
|
-
const result = assemble({ allocationEvent: input.allocationEvent === undefined ? undefined : event => input.allocationEvent!(event, null), source: src, full: runs.full, head: runs.head, depth: cfg.depth, depthBase: dirname(resolve(input.config)), ...fields, under, ...(declaredFigure === undefined ? {} : { declaredFigure }),
|
|
539
|
+
const result = assemble({ editedParts, allocationEvent: input.allocationEvent === undefined ? undefined : event => input.allocationEvent!(event, null), source: src, full: runs.full, head: runs.head, depth: cfg.depth, depthBase: dirname(resolve(input.config)), ...fields, under, ...(declaredFigure === undefined ? {} : { declaredFigure }),
|
|
534
540
|
...((cfg.assemble.take ?? []).some(t => 'seed' in t) ? { regionTake: { full: takenRuns.full, head: takenRuns.head, targets: (cfg.assemble.take ?? []).flatMap(t => 'seed' in t ? [t.part] : []) } } : {}), ...(caps === undefined ? {} : { caps }), ...(occluders === undefined ? {} : { occluders }), seamRule: seam, projectRule: project });
|
|
535
541
|
refuseIfAny(verifyUnderPlateMasks(result, fields.cuts, underPlates));
|
|
536
542
|
|
|
@@ -1082,6 +1088,7 @@ export function assembleStage(input: AssembleStageInput, outs: AssembleOutputs,
|
|
|
1082
1088
|
}
|
|
1083
1089
|
|
|
1084
1090
|
// Emit only after green: every refusal above has already thrown.
|
|
1091
|
+
if (input.resetBuildOutput === true) resetBuildOutput(dirname(outs.partsJson));
|
|
1085
1092
|
mkdirSync(outs.partsDir, { recursive: true });
|
|
1086
1093
|
mkdirSync(dirname(outs.partsJson), { recursive: true });
|
|
1087
1094
|
mkdirSync(dirname(outs.recomposite), { recursive: true });
|
|
@@ -1118,8 +1125,9 @@ export function assembleStage(input: AssembleStageInput, outs: AssembleOutputs,
|
|
|
1118
1125
|
log(`${PAINTING_EDGE_COVERAGE_TRANSFER}: set "${report.set}" ${count} native rig px; membership in ${file}`);
|
|
1119
1126
|
}
|
|
1120
1127
|
}
|
|
1121
|
-
for (const { record, image, depthImage } of result.images) {
|
|
1122
|
-
writePng(join(outs.partsDir, `${record.name}.png`), image);
|
|
1128
|
+
for (const { record, image, depthImage, encodedBytes } of result.images) {
|
|
1129
|
+
if (encodedBytes === undefined) writePng(join(outs.partsDir, `${record.name}.png`), image);
|
|
1130
|
+
else writeFileSync(join(outs.partsDir, `${record.name}.png`), encodedBytes);
|
|
1123
1131
|
if (depthImage !== undefined && record.depth !== undefined) writePng(join(outs.partsDir, record.depth.image), depthImage);
|
|
1124
1132
|
}
|
|
1125
1133
|
for (const row of result.depthReadings ?? []) log(` depth reading ${row.from}: ${row.reading.relation}; ordering median ${row.reading.orderingMedian}, source-sheet median ${row.reading.sheetMedian} (half-level quantization; reading only, polarity declared)`);
|
|
@@ -2738,6 +2746,21 @@ export interface BuildRunners {
|
|
|
2738
2746
|
/** Every path `build` writes under `--out`, relative — and so every path it clears first. */
|
|
2739
2747
|
export const BUILD_OWNS: readonly string[] = ['parts', 'parts.json', SOURCE_COVER_FILE, PAINTING_IN_RIG_FILE, 'recomposite_rig.png', ERROR_MAP_FILE, 'rig', 'check', 'idle.gif', 'idle.png', 'idle-indexed.png'];
|
|
2740
2748
|
|
|
2749
|
+
function resetBuildOutput(out: string): void {
|
|
2750
|
+
mkdirSync(out, { recursive: true });
|
|
2751
|
+
for (const p of BUILD_OWNS) rmSync(join(out, p), { recursive: true, force: true });
|
|
2752
|
+
for (const p of [CUT_MATERIAL_SOURCES, EDGE_RESIDUAL_FILE, SUPPORT_DOMAINS_FILE, FIGURE_MASK_FILE]) rmSync(join(out, p), { force: true });
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
/** Only selects when cleanup occurs; the real config loader still decides validity. */
|
|
2756
|
+
function declaresEditedParts(path: string): boolean {
|
|
2757
|
+
try {
|
|
2758
|
+
const raw: unknown = JSON.parse(readFileSync(path, 'utf8'));
|
|
2759
|
+
return raw !== null && typeof raw === 'object' && 'assemble' in raw &&
|
|
2760
|
+
raw.assemble !== null && typeof raw.assemble === 'object' && 'edited_parts' in raw.assemble;
|
|
2761
|
+
} catch { return false; }
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2741
2764
|
export type BuildStage = 'assemble' | 'rig' | 'check' | 'loop' | 'artifact';
|
|
2742
2765
|
|
|
2743
2766
|
export interface BuildResult {
|
|
@@ -2797,14 +2820,8 @@ export function build(input: BuildInput, run: BuildRunners, log: Log): BuildResu
|
|
|
2797
2820
|
return { stoppedAt: stage, check, artifact: [] };
|
|
2798
2821
|
};
|
|
2799
2822
|
const out = input.out;
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
// Optional source evidence is cleared separately; BUILD_OWNS is the legacy complete output tree.
|
|
2803
|
-
rmSync(join(out, CUT_MATERIAL_SOURCES), { force: true });
|
|
2804
|
-
rmSync(join(out, EDGE_RESIDUAL_FILE), { force: true });
|
|
2805
|
-
rmSync(join(out, SUPPORT_DOMAINS_FILE), { force: true });
|
|
2806
|
-
// Issue #242: the figure mask is written only under config.scene; one left by an earlier scene build is not this build's.
|
|
2807
|
-
rmSync(join(out, FIGURE_MASK_FILE), { force: true });
|
|
2823
|
+
const deferReset = declaresEditedParts(input.config);
|
|
2824
|
+
if (!deferReset) resetBuildOutput(out);
|
|
2808
2825
|
// The idle-keys value is named only when it is not the default, so a build without the flag, or with the default, prints the line it printed before issue #95.
|
|
2809
2826
|
const idleKeys = input.idleKeys ?? DEFAULT_IDLE_KEYS;
|
|
2810
2827
|
|
|
@@ -2834,7 +2851,7 @@ export function build(input: BuildInput, run: BuildRunners, log: Log): BuildResu
|
|
|
2834
2851
|
// And the steady-wind band spec (issue #590), as check reads it.
|
|
2835
2852
|
if (input.windBand !== undefined) readWindBand(input.windBand);
|
|
2836
2853
|
const assembled = stages.assemble(
|
|
2837
|
-
{ source: input.source, full: input.full, head: input.head, config: input.config, seam, project, ...(req === null ? {} : { requirements: req.read }), ...(input.alts === undefined ? {} : { alts: input.alts }) },
|
|
2854
|
+
{ source: input.source, full: input.full, head: input.head, config: input.config, seam, project, ...(deferReset ? { resetBuildOutput: true } : {}), ...(req === null ? {} : { requirements: req.read }), ...(input.alts === undefined ? {} : { alts: input.alts }) },
|
|
2838
2855
|
{ partsJson: join(out, 'parts.json'), partsDir: join(out, 'parts'), recomposite: join(out, 'recomposite_rig.png'), errorMap: join(out, ERROR_MAP_FILE) },
|
|
2839
2856
|
prefixed('assemble'),
|
|
2840
2857
|
);
|