@rig-c/parts 1.42.0 → 1.44.0
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/cli.ts +83 -3
- package/docs/AUTHORING.md +78 -0
- package/docs/STABILITY.md +5 -3
- package/package.json +1 -1
- package/src/remesh.ts +181 -56
- package/src/remeshdelta.ts +669 -0
- package/src/retune.ts +418 -0
package/cli.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { basisLines, branchSqueezeLine, checkProposal, compare, compareLines, DE
|
|
|
31
31
|
import { BASIS_FILE, BASIS_SPEC, basisFile, basisLine, coverageLines, serializeBasis } from './src/diagnostics.ts';
|
|
32
32
|
import { BEND_DEGREES, BEND_WORST_SHARE, DUST_MAX_PX, DUST_MAX_SHARE, IDLE_BOUND_PX, MESH_DRAFT_REPORT, MESH_DRAFT_SPEC, meshDraftStage, MORE_TRIANGLES_FLAG, TOLERANCE_FIGURE_DIVISOR } from './src/meshdraft.ts';
|
|
33
33
|
import { PROVENANCE_FILE, REMESH_SPEC, remeshStage } from './src/remesh.ts';
|
|
34
|
+
import { RETUNE_FILE, RETUNE_SPEC, retuneStage } from './src/retune.ts';
|
|
34
35
|
import { checkPainting } from './src/paintcheck.ts';
|
|
35
36
|
import { readPng, writePng } from './src/raster/png.ts';
|
|
36
37
|
import { REQUIREMENTS_SENTENCE } from './src/requirements.ts';
|
|
@@ -344,6 +345,7 @@ usage:
|
|
|
344
345
|
|
|
345
346
|
rig-parts remesh --rig <dir> --config <config.json> --parts <dir> --part <name>
|
|
346
347
|
--mesh <entry.json> --out <dir> [--requirements <file.json>]
|
|
348
|
+
(or --delta <mesh-edit.json> in place of --mesh)
|
|
347
349
|
[--idle-keys ctl|direct] [--page-edges pot|free] [--pack-shape rect|polygon]
|
|
348
350
|
Re-fit one part's mesh of a gated rig (the directory rig writes) under
|
|
349
351
|
the mesh entry --mesh holds — what config.json would hold at
|
|
@@ -370,6 +372,42 @@ usage:
|
|
|
370
372
|
SHA-256, the part's counts before and after, both checks and their
|
|
371
373
|
scope) — no path and no clock, so the same request writes the same bytes.
|
|
372
374
|
Prints the part's counts and a hash table of every file.
|
|
375
|
+
--delta, in place of --mesh (exactly one of the two): rig-c/review's
|
|
376
|
+
mesh edit (rig-review-mesh-edit/1, basis "setup", at most 300 ops of
|
|
377
|
+
move, add, remove, edge and unedge, crop px of the rig canvas), whose
|
|
378
|
+
source counts and source.hash must be the input part's
|
|
379
|
+
(REMESH_DELTA_SOURCE). The ops are replayed in order over the input's
|
|
380
|
+
own mesh — moved vertices rebound, added ones weighted from their
|
|
381
|
+
edge's or triangle's corners, removed ones' rings re-triangulated,
|
|
382
|
+
Delaunay restored by flips that keep the hull and every constraint —
|
|
383
|
+
and the result is held to the outline rules (REMESH_DELTA_JSON,
|
|
384
|
+
REMESH_DELTA_BASIS, REMESH_DELTA_OPS, REMESH_DELTA_OP naming ops[i],
|
|
385
|
+
REMESH_DELTA_TOPOLOGY). No config entry is built: the baseline is the
|
|
386
|
+
input itself; the splice, the gate and check are as for --mesh.
|
|
387
|
+
|
|
388
|
+
rig-parts retune --rig <dir> --config <config.json> --parts <dir> --out <dir>
|
|
389
|
+
[--requirements <file.json>] [--idle-keys ctl|direct]
|
|
390
|
+
[--page-edges pot|free] [--pack-shape rect|polygon]
|
|
391
|
+
Splice the constraints and the idle a config states onto a gated rig
|
|
392
|
+
(the directory rig writes) and write a new revision into --out, which
|
|
393
|
+
must not exist (RETUNE_OUT_FRESH); the input is never written. The
|
|
394
|
+
config is built once through the rig stage (RETUNE_CONFIG_REFUSED,
|
|
395
|
+
quoting each problem), and that build must state the input's stops,
|
|
396
|
+
bones, slots, skeleton, images, every invariant but detached and every
|
|
397
|
+
byte of motion.json but animations.idle (RETUNE_REQUEST_HELD): a moved
|
|
398
|
+
bone, a redrawn image, a stops change or an animations_from change is
|
|
399
|
+
no retune. No attachment is compared — the input's meshes are carried
|
|
400
|
+
over as bytes, repairs included, and a meshes change in the config is
|
|
401
|
+
never read (remesh is a mesh's producer). rig.json takes the build's
|
|
402
|
+
constraints and invariants.detached, motion.json its animations.idle,
|
|
403
|
+
every other byte is the input's (RETUNE_PRESERVED); rigc's build gate
|
|
404
|
+
passes over the revision (RETUNE_RIGC_GREEN); check measures every bar
|
|
405
|
+
on it that it measures on the input and fails none the input meets
|
|
406
|
+
(RETUNE_CHECK_HELD). --out receives the revision and ${RETUNE_FILE}
|
|
407
|
+
(spec "${RETUNE_SPEC}": the request, both versions, every input file's
|
|
408
|
+
SHA-256, what was held, which constraint fields and idle tracks changed,
|
|
409
|
+
both checks and their scope) — no path and no clock, so the same request
|
|
410
|
+
writes the same bytes. Prints what changed and a hash table of every file.
|
|
373
411
|
|
|
374
412
|
rig-parts check --rig <dir> --out <dir> [--parts <dir>] [--source <painting.png>]
|
|
375
413
|
[--page-edges pot|free] [--pack-shape rect|polygon]
|
|
@@ -834,7 +872,8 @@ const TAKES = {
|
|
|
834
872
|
build: { valued: ['--config', '--source', '--full', '--head', '--out', '--seam', '--project', '--page-edges', '--pack-shape', '--requirements', '--idle-keys', '--lead-in', '--alt', '--set'], switches: ['--loop', '--seam-pairs', '--keep-stills', '--all-sets'] },
|
|
835
873
|
compose: { valued: ['--scene', '--out', '--requirements', '--accept'], switches: [] },
|
|
836
874
|
'mesh-draft': { valued: ['--config', '--parts', '--out', '--requirements', '--idle-keys', '--page-edges', '--pack-shape'], switches: ['--more-triangles'] },
|
|
837
|
-
remesh: { valued: ['--rig', '--config', '--parts', '--part', '--mesh', '--out', '--requirements', '--idle-keys', '--page-edges', '--pack-shape'], switches: [] },
|
|
875
|
+
remesh: { valued: ['--rig', '--config', '--parts', '--part', '--mesh', '--delta', '--out', '--requirements', '--idle-keys', '--page-edges', '--pack-shape'], switches: [] },
|
|
876
|
+
retune: { valued: ['--rig', '--config', '--parts', '--out', '--requirements', '--idle-keys', '--page-edges', '--pack-shape'], switches: [] },
|
|
838
877
|
painting: { valued: ['--keypoints', '--person'], switches: [] },
|
|
839
878
|
} as const satisfies Record<string, { valued: readonly string[]; switches: readonly string[] }>;
|
|
840
879
|
|
|
@@ -1649,8 +1688,9 @@ function cmdMeshDraft(args: string[]): number {
|
|
|
1649
1688
|
|
|
1650
1689
|
/** `remesh` (issue #495): one part of a gated rig re-fitted under a requested mesh entry, into a new revision. */
|
|
1651
1690
|
function cmdRemesh(args: string[]): number {
|
|
1652
|
-
const f = flags(args, 'remesh', ['--rig', '--config', '--parts', '--part', '--
|
|
1691
|
+
const f = flags(args, 'remesh', ['--rig', '--config', '--parts', '--part', '--out']);
|
|
1653
1692
|
if (typeof f === 'string') return usage(f);
|
|
1693
|
+
if (f.has('--mesh') === f.has('--delta')) return usage('remesh needs exactly one of --mesh, --delta');
|
|
1654
1694
|
const keys = idleKeysOf(f.get('--idle-keys'));
|
|
1655
1695
|
if (!isIdleKeys(keys)) return usage(keys);
|
|
1656
1696
|
const edges = pageEdgesOf(f.get('--page-edges'));
|
|
@@ -1671,7 +1711,46 @@ function cmdRemesh(args: string[]): number {
|
|
|
1671
1711
|
try {
|
|
1672
1712
|
const req = f.get('--requirements');
|
|
1673
1713
|
remeshStage(
|
|
1674
|
-
{ rig: f.get('--rig') as string, config: f.get('--config') as string, parts: f.get('--parts') as string, part: f.get('--part') as string, mesh: f.get('--mesh') as string, out: f.get('--out') as string, idleKeys: keys, pageEdges: edges, packShape: shape, ...(req === undefined ? {} : { requirements: req }) },
|
|
1714
|
+
{ rig: f.get('--rig') as string, config: f.get('--config') as string, parts: f.get('--parts') as string, part: f.get('--part') as string, ...(f.has('--mesh') ? { mesh: f.get('--mesh') as string } : { delta: f.get('--delta') as string }), out: f.get('--out') as string, idleKeys: keys, pageEdges: edges, packShape: shape, ...(req === undefined ? {} : { requirements: req }) },
|
|
1715
|
+
runner,
|
|
1716
|
+
bin,
|
|
1717
|
+
{ parts: version(), rigc: rigcVersion },
|
|
1718
|
+
scratch,
|
|
1719
|
+
console.log,
|
|
1720
|
+
);
|
|
1721
|
+
return EXIT_OK;
|
|
1722
|
+
} catch (err) {
|
|
1723
|
+
return printRefusal(err);
|
|
1724
|
+
} finally {
|
|
1725
|
+
rmSync(scratch, { recursive: true, force: true });
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
/** `retune` (issue #527): the constraints and the idle a config states, spliced onto a gated rig, into a new revision. */
|
|
1730
|
+
function cmdRetune(args: string[]): number {
|
|
1731
|
+
const f = flags(args, 'retune', ['--rig', '--config', '--parts', '--out']);
|
|
1732
|
+
if (typeof f === 'string') return usage(f);
|
|
1733
|
+
const keys = idleKeysOf(f.get('--idle-keys'));
|
|
1734
|
+
if (!isIdleKeys(keys)) return usage(keys);
|
|
1735
|
+
const edges = pageEdgesOf(f.get('--page-edges'));
|
|
1736
|
+
if (!isPageEdges(edges)) return usage(edges);
|
|
1737
|
+
const shape = packShapeOf(f.get('--pack-shape'));
|
|
1738
|
+
if (!isPackShape(shape)) return usage(shape);
|
|
1739
|
+
let bin: string;
|
|
1740
|
+
try {
|
|
1741
|
+
bin = findRigc(import.meta.dir, process.env.PATH ?? '');
|
|
1742
|
+
} catch (err) {
|
|
1743
|
+
return printRefusal(err);
|
|
1744
|
+
}
|
|
1745
|
+
const runner = rigcRunner(bin);
|
|
1746
|
+
const said = runner(['--version']);
|
|
1747
|
+
const rigcVersion = said.status === 0 ? (said.out.trim().split('\n')[0] ?? '') : '';
|
|
1748
|
+
if (rigcVersion === '') return printRefusal(new PartsError([{ code: 'RETUNE_RIGC_GREEN', object: 'rigc --version', detail: `exited ${said.status}${rigcRanClause(said)}; the provenance names the rigc that gated the revision, so its version is required` }]));
|
|
1749
|
+
const scratch = mkdtempSync(join(tmpdir(), 'rig-parts-retune-'));
|
|
1750
|
+
try {
|
|
1751
|
+
const req = f.get('--requirements');
|
|
1752
|
+
retuneStage(
|
|
1753
|
+
{ rig: f.get('--rig') as string, config: f.get('--config') as string, parts: f.get('--parts') as string, out: f.get('--out') as string, idleKeys: keys, pageEdges: edges, packShape: shape, ...(req === undefined ? {} : { requirements: req }) },
|
|
1675
1754
|
runner,
|
|
1676
1755
|
bin,
|
|
1677
1756
|
{ parts: version(), rigc: rigcVersion },
|
|
@@ -1756,6 +1835,7 @@ function main(argv: string[]): number | Promise<number> {
|
|
|
1756
1835
|
if (command === 'compose') return cmdCompose(rest);
|
|
1757
1836
|
if (command === 'mesh-draft') return cmdMeshDraft(rest);
|
|
1758
1837
|
if (command === 'remesh') return cmdRemesh(rest);
|
|
1838
|
+
if (command === 'retune') return cmdRetune(rest);
|
|
1759
1839
|
if (command === 'painting') return cmdPainting(rest);
|
|
1760
1840
|
if (command === 'guide') return cmdGuide(rest);
|
|
1761
1841
|
const later = LATER.find(([name]) => name === command);
|
package/docs/AUTHORING.md
CHANGED
|
@@ -2924,6 +2924,12 @@ exits 0, and `mesh_draft.json` and the console name the reading and the amount.
|
|
|
2924
2924
|
| <a id="REMESH_PRESERVED"></a>`REMESH_PRESERVED` | the spliced revision differs from the input outside the part's attachment and its report row; the file and the part that moved are named | a defect in this package: report it with the line |
|
|
2925
2925
|
| <a id="REMESH_RIGC_GREEN"></a>`REMESH_RIGC_GREEN` | rigc's build gate refused the revision (its lines quoted), or `rigc --version` named no version for the provenance | read rigc's line; nothing was written |
|
|
2926
2926
|
| <a id="REMESH_CHECK_HELD"></a>`REMESH_CHECK_HELD` | `check` on the revision did not measure a bar it measured on the input, or failed a bar the input met; the revision's own FAIL line is quoted | ask for a finer entry, or a different mode, for the part the line names |
|
|
2927
|
+
| <a id="REMESH_DELTA_JSON"></a>`REMESH_DELTA_JSON` | `--delta` is missing, does not parse, is not one object, its `schema` is not `rig-review-mesh-edit/1`, or `slot`, `skin`, `attachment` or `source` is not of its shape | export the mesh edit from rig-c/review as it writes it |
|
|
2928
|
+
| <a id="REMESH_DELTA_BASIS"></a>`REMESH_DELTA_BASIS` | the mesh edit's `basis` is not `"setup"`: it was drawn over a pose, and the producer binds setup positions, so it is refused rather than posed back (the basis found is quoted) | edit the mesh in setup space (rig-c/review #100) and export again |
|
|
2929
|
+
| <a id="REMESH_DELTA_OPS"></a>`REMESH_DELTA_OPS` | `ops` is not an array, or holds more than 300 ops — review's own cap per attachment | split the edit: apply the first part, then edit the revision |
|
|
2930
|
+
| <a id="REMESH_DELTA_SOURCE"></a>`REMESH_DELTA_SOURCE` | the mesh edit was not drawn over this part's mesh: its `slot` or `attachment` is not `--part`, its skin is not `default`, a `source` count (`vertexCount`, `triangleCount`, `hullLength`) or `source.hash` is not the input's (both figures quoted; the hash is SHA-256 of the part's entry in rigc's `skeleton.model.json` over the input); or the input's bindings are not where its uvs and `parts.json` place the image, so no position can be bound | export the edit from the revision you pass as `--rig` |
|
|
2931
|
+
| <a id="REMESH_DELTA_OP"></a>`REMESH_DELTA_OP` | one op, named `ops[i]` and quoted, does not apply at its place in the replay: an unknown kind, a non-finite number, an id out of range or already removed, a `from` that is not the live position within 0.001 px, a position outside the part's image, a split of an edge the producer's triangulation does not hold or outside its triangles, a free `add` outside every triangle, a move that folds its ring, a removal that leaves fewer than 3 vertices, ends a constraint or leaves a ring no ear clips, an `edge` that duplicates a constraint, is a hull edge, runs through a vertex or crosses the hull or a constraint, or an `unedge` of any edge this edit did not constrain | read the op the line names; an edge the producer flipped is not one review can unedge — redraw it with `edge`, or move the vertices |
|
|
2932
|
+
| <a id="REMESH_DELTA_TOPOLOGY"></a>`REMESH_DELTA_TOPOLOGY` | the replayed mesh breaks an outline rule (`contourTopologyProblems`' code quoted: one loop, the hull first, every triangle wound one way, no self-intersection, no coincident vertices), or holds more interior edges that are not locally Delaunay than the input did; or the input's own triangles are not wound one way | read the quoted code; the ops that made it are the edit's last ones |
|
|
2927
2933
|
|
|
2928
2934
|
A remesh changes one part's mesh and nothing else: every file of the input but
|
|
2929
2935
|
`rig.json` and `mesh_report.json` is copied as bytes, `rig.json` keeps every byte
|
|
@@ -2933,6 +2939,78 @@ names the input's SHA-256 per file, the request, both versions, the part's count
|
|
|
2933
2939
|
before and after and both checks, and quotes `check`'s own physics line as the scope
|
|
2934
2940
|
of the revision's check.
|
|
2935
2941
|
|
|
2942
|
+
**`--delta <mesh-edit.json>`** (in place of `--mesh`, exactly one of the two; issue
|
|
2943
|
+
#526) reads rig-c/review's mesh edit, `rig-review-mesh-edit/1`: `slot`, `skin`,
|
|
2944
|
+
`attachment`, `source` (`vertexCount`, `triangleCount`, `hullLength`, `hash`), `units`,
|
|
2945
|
+
`basis` and up to 300 `ops`, each one of `move {v, from, to}`, `add {at, onEdge?}`,
|
|
2946
|
+
`remove {v}`, `edge {a, b}` and `unedge {a, b}`. Positions are crop px of the rig canvas
|
|
2947
|
+
(x right, y down): a vertex's position is its part-local px (`uv × (width, height)`)
|
|
2948
|
+
plus the image's origin, `parts.json`'s `x, y` less the pad of 4. Vertex ids are the
|
|
2949
|
+
attachment's indices; an added vertex takes the next id; a removed id is never reused.
|
|
2950
|
+
`basis` must be `"setup"`. Review only records the ops; the producer retriangulates,
|
|
2951
|
+
replaying them in order over the input part's own mesh:
|
|
2952
|
+
|
|
2953
|
+
- `move`: `from` must be the live position within 0.001 px; the uv and every binding's
|
|
2954
|
+
bone-local `x, y` are recomputed from `to` through the setup frames, the shares kept.
|
|
2955
|
+
- `add` with `onEdge`: the edge is split, two triangles into four (one into two on a
|
|
2956
|
+
hull edge, whose loop gains the vertex); its shares are the two ends' blended by the
|
|
2957
|
+
parameter along the edge. Without `onEdge`: the triangle holding the point is split in
|
|
2958
|
+
three (on an edge, as `onEdge`), its shares the corners' barycentric blend. Both are
|
|
2959
|
+
rounded as the lattice rounds shares (5 places, the heaviest closing the sum).
|
|
2960
|
+
- `remove`: the vertex and its triangles go, and the ring is ear-clipped by exact
|
|
2961
|
+
orientation; a hull vertex's two hull neighbours become adjacent.
|
|
2962
|
+
- `edge`: a constraint — an existing edge is marked, a missing one is made by flipping
|
|
2963
|
+
the edges its segment crosses.
|
|
2964
|
+
- `unedge`: only an edge this edit constrained. Every other edge belongs to the
|
|
2965
|
+
producer's triangulation, which differs from the one review drew as soon as a flip
|
|
2966
|
+
runs, so an `unedge` of it is refused rather than guessed at.
|
|
2967
|
+
|
|
2968
|
+
After every op the Delaunay condition is restored by edge flips that never flip a hull
|
|
2969
|
+
edge or a constraint, and the result is measured: the outline rules and no more
|
|
2970
|
+
non-Delaunay interior edges than the input had. The output writes the hull loop first,
|
|
2971
|
+
the other vertices after in id order, uvs to 6 places and bindings as `rig` writes them;
|
|
2972
|
+
every vertex the edit neither moves nor removes keeps its uv pair and weight entries
|
|
2973
|
+
byte for byte. No config entry is built — the baseline is the input itself, held to the
|
|
2974
|
+
edit by `source`'s counts and `source.hash` (rigc's build over the input) — and the
|
|
2975
|
+
part's `mesh_report.json` row is the input's with `vertices`, `triangles`, `hull`,
|
|
2976
|
+
`bones`, `max_influences` and `mean_influences` recomputed and `mode` "delta"; its other
|
|
2977
|
+
keys describe the mesh the edit was drawn over. The splice, the preserve assertion, the
|
|
2978
|
+
gate and `check` are the `--mesh` path's. A constraint is a statement about this
|
|
2979
|
+
revision's triangulation only: the rig spec has no field for it, so a later edit of the
|
|
2980
|
+
revision reads it as any other edge.
|
|
2981
|
+
|
|
2982
|
+
### retune
|
|
2983
|
+
|
|
2984
|
+
| rule | means | change |
|
|
2985
|
+
| --- | --- | --- |
|
|
2986
|
+
| <a id="RETUNE_OUT_FRESH"></a>`RETUNE_OUT_FRESH` | `--out` exists, or lies inside `--rig`: a revision is a new directory beside the input, never written over it | name a directory that does not exist yet |
|
|
2987
|
+
| <a id="RETUNE_INPUT_PRESENT"></a>`RETUNE_INPUT_PRESENT` | `--rig` is not the directory `rig` writes: `rig.json`, `motion.json`, `mesh_report.json` or `images/` is missing | point `--rig` at a `rig` output (`build`'s `rig/`, or a `remesh` or `retune` revision) |
|
|
2988
|
+
| <a id="RETUNE_INPUT_WRITTEN"></a>`RETUNE_INPUT_WRITTEN` | `rig.json` or `motion.json` is not the text this package's writer prints for its value (reformatted, or written by something else); the revision is spliced as text, so it could not carry every other byte over | use the files as `rig` wrote them |
|
|
2989
|
+
| <a id="RETUNE_CONFIG_REFUSED"></a>`RETUNE_CONFIG_REFUSED` | the rig stage refused the config as written — the loader, a mesh's own checks, an `auto` mesh's motion gate under the new idle, or rigc's gate; each problem is quoted, and nothing was written | change the field the quoted problem names |
|
|
2990
|
+
| <a id="RETUNE_REQUEST_HELD"></a>`RETUNE_REQUEST_HELD` | the config's build does not state the input's `stops`, `bones` (a bone moved, renamed, added, re-inherited, or a `<bone>_ctl` added or dropped), `slots`, `skeleton`, `images`, an image file, an `invariants` entry other than `detached`, or a byte of `motion.json` outside `animations.idle` (`animations_from`, the groups, the easings, the face deform); the first differing leaf is named | make it a config change and rebuild with `rig --config` |
|
|
2991
|
+
| <a id="RETUNE_PRESERVED"></a>`RETUNE_PRESERVED` | the spliced revision differs from the input outside `rig.json`'s `constraints` and `invariants.detached` and `motion.json`'s `animations.idle`; the file and the path that moved are named | a defect in this package: report it with the line |
|
|
2992
|
+
| <a id="RETUNE_RIGC_GREEN"></a>`RETUNE_RIGC_GREEN` | rigc's build gate refused the revision (its lines quoted), or `rigc --version` named no version for the provenance | read rigc's line; nothing was written |
|
|
2993
|
+
| <a id="RETUNE_CHECK_HELD"></a>`RETUNE_CHECK_HELD` | `check` on the revision did not measure a bar it measured on the input, or failed a bar the input met; the revision's own FAIL line is quoted | soften the constraint or the idle track the line names |
|
|
2994
|
+
|
|
2995
|
+
A retune replaces a rig's physics and its idle and nothing else. The config is built
|
|
2996
|
+
once through the rig stage; from that build `rig.json` takes `constraints` and
|
|
2997
|
+
`invariants.detached` (which the rig stage derives from the constraints), and
|
|
2998
|
+
`motion.json` takes `animations.idle`. Every other byte is the input's: every
|
|
2999
|
+
attachment and image, every `mesh_report.json` row and every other animation, so a
|
|
3000
|
+
mesh the config does not reproduce — a `remesh` revision, or a repair accepted after
|
|
3001
|
+
the config was written — is carried over as it is. What the build must state as the
|
|
3002
|
+
input does is held, and a config that moves it is refused rather than half-applied:
|
|
3003
|
+
a `stops` change (it rewires bones, slots and weights onto the drawn links
|
|
3004
|
+
`<link>_d`, so it is outside what a retune holds byte for byte), a moved, renamed or
|
|
3005
|
+
re-`inherit`ed bone, a new control bone under `--idle-keys ctl`, a redrawn image, or a
|
|
3006
|
+
change to `animations_from`. No mesh is compared or written, so a `meshes` change in
|
|
3007
|
+
the config is left out of the revision — `retune.json`'s `held.not_compared` says so;
|
|
3008
|
+
`remesh` is the producer of a mesh. `retune.json` names the input's SHA-256 per file,
|
|
3009
|
+
what was held, which constraint fields changed (and which constraints were added or
|
|
3010
|
+
removed), how many idle tracks changed and the idle's duration before and after, both
|
|
3011
|
+
versions and both checks, and quotes `check`'s own physics line as the scope of the
|
|
3012
|
+
revision's check.
|
|
3013
|
+
|
|
2936
3014
|
### rig-c's mesh refusals, quoted in a line
|
|
2937
3015
|
|
|
2938
3016
|
rig-c's mesh library refuses a malformed input by throwing with a code of its own. This
|
package/docs/STABILITY.md
CHANGED
|
@@ -61,7 +61,8 @@ defaults are the help's too, and none is guessed from the art.
|
|
|
61
61
|
| `build` | `--config`, `--source`, `--full`, `--out`; optional `--head` (as for `assemble`), `--seam`, `--project`, `--page-edges`, `--pack-shape`, `--loop`, `--lead-in`, `--requirements`, `--idle-keys`, `--seam-pairs`, `--keep-stills`, `--alt` (as for `assemble`, issue #454), `--set` or `--all-sets` (as for `check`, issue #454) |
|
|
62
62
|
| `compose` | `--scene`, `--out`; optional `--requirements`, `--accept` |
|
|
63
63
|
| `mesh-draft` | `--config`, `--parts`, `--out`; optional `--requirements`, `--idle-keys` (ctl, direct), `--page-edges` (pot, free), `--pack-shape` (rect, polygon), `--more-triangles` |
|
|
64
|
-
| `remesh` | `--rig`, `--config`, `--parts`, `--part`, `--
|
|
64
|
+
| `remesh` | `--rig`, `--config`, `--parts`, `--part`, `--out`, and one of `--mesh` or `--delta` (issue #526); optional `--requirements`, `--idle-keys` (ctl, direct), `--page-edges` (pot, free), `--pack-shape` (rect, polygon) |
|
|
65
|
+
| `retune` | `--rig`, `--config`, `--parts`, `--out`; optional `--requirements`, `--idle-keys` (ctl, direct), `--page-edges` (pot, free), `--pack-shape` (rect, polygon) |
|
|
65
66
|
| `painting` | one positional path, the painting; `--keypoints`; optional `--person` |
|
|
66
67
|
| `guide` | one positional argument: a rule name, `§<n>`, `§<n>.<m>` or `§<n>.<m>.<k>` |
|
|
67
68
|
| (none) | `--version`, `--help` |
|
|
@@ -198,14 +199,15 @@ every number) are AUTHORING §3's tables, and the loader refuses any other by na
|
|
|
198
199
|
| `proposal.json`, `render/landmarks*.png` | `propose` | the config's four rig sections, `constraints` with `--cloth` (issue #364: a physics constraint per tree link named `<bone>_physics`, a dangling end's `<bone>_translate`, and a skirt swing's transforms `<swing>_<tree>`), `turn` with `--full`/`--head`, `proposed_rig_scale` (issue #354), and `notes` |
|
|
199
200
|
| `basis.json` | `propose` | spec `spine-parts-basis/1` |
|
|
200
201
|
| `config.json`, `mesh_draft.json` | `mesh-draft` | `config.json` is the config read, byte for byte, but for each drafted part's `meshes` entry; `mesh_draft.json` is spec `rig-parts-mesh-draft/1`: `rules`, `lattice_check`, `draft_check`, `figure_overdraw`, and per lattice part `part`, `mode`, `lattice`, `candidate` (with `bridges` — `units`, `joins` of `span` and `area_px2`, `area_px2`, `overdraw`, and `faint` only when an island was left out as faint — only when the candidate is a bridged one, issue #326), `delta` (under `--more-triangles` only), `readings`, `gate` (each line's `reading`, `pass`, `text`, `margin`), `note`; and `not_compared` (issue #307), only when the config holds an `auto` or `contour` entry: per such entry, in config order, `part`, `mode` and `note` — the part was neither drafted nor compared, and a config of lattices alone writes no such key |
|
|
201
|
-
| `rig.json`, `motion.json`, `mesh_report.json`, `images/`, `remesh.json` | `remesh` | the input revision's files, `rig.json` and `mesh_report.json` with the part's attachment and row replaced, every other file byte for byte; `remesh.json` is spec `rig-parts-remesh/1`: `request` (`part`, `mesh`, `mesh_sha256`, `idle_keys`, `page_edges`, `pack_shape`), `versions` (`parts`, `rigc`), `input` (`rig` — `path`, `bytes`, `sha256` per file — `config_sha256`, `parts_json_sha256`), `baseline` (`reproduced`, `not_compared`), `target` (`before`, `after`: `vertices`, `triangles`, `hull`), `preserved` (`identical`, `spliced`), `revision` (per file as `input.rig`), `check` (`input`, `revision`: `pass`, `measured`, `not_met`, `skipped`, `physics`; `scope`) |
|
|
202
|
+
| `rig.json`, `motion.json`, `mesh_report.json`, `images/`, `remesh.json` | `remesh` | the input revision's files, `rig.json` and `mesh_report.json` with the part's attachment and row replaced (under `--delta` the row is the input's with its counts, `bones` and influences recomputed and `mode` "delta"), every other file byte for byte; `remesh.json` is spec `rig-parts-remesh/1`: `request` (`part`, `mesh`, `mesh_sha256`, `idle_keys`, `page_edges`, `pack_shape`; under `--delta`, issue #526: `part`, `delta` — the mesh edit as read — `delta_sha256`, `ops`, `applied` — `moved`, `added`, `removed`, `constrained` — `idle_keys`, `page_edges`, `pack_shape`), `versions` (`parts`, `rigc`), `input` (`rig` — `path`, `bytes`, `sha256` per file — `config_sha256`, `parts_json_sha256`), `baseline` (`reproduced`, `not_compared`; under `--delta` `reproduced` holds one sentence: no config is built, the input is the baseline), `target` (`before`, `after`: `vertices`, `triangles`, `hull`), `preserved` (`identical`, `spliced`), `revision` (per file as `input.rig`), `check` (`input`, `revision`: `pass`, `measured`, `not_met`, `skipped`, `physics`; `scope`) |
|
|
203
|
+
| `rig.json`, `motion.json`, `mesh_report.json`, `images/`, `retune.json` | `retune` | the input revision's files, `rig.json` with `constraints` and `invariants.detached` replaced and `motion.json` with `animations.idle` replaced by the config's build, every other file byte for byte; `retune.json` is spec `rig-parts-retune/1`: `request` (`idle_keys`, `page_edges`, `pack_shape`), `versions` (`parts`, `rigc`), `input` (`rig` — `path`, `bytes`, `sha256` per file — `config_sha256`, `parts_json_sha256`), `held` (`compared`, `not_compared`), `changed` (`constraints` — each `name`, `type`, `fields` — `added`, `removed`, `idle`: `tracks_changed`, `duration` as before and after), `preserved` (`identical`, `spliced`), `revision` (per file as `input.rig`), `check` (`input`, `revision`: `pass`, `measured`, `not_met`, `skipped`, `physics`; `scope`) |
|
|
202
204
|
| the scene report | `compose` | spec `spine-parts-scene-report/1` |
|
|
203
205
|
| `idle.png`, `idle-indexed.png`, `idle.gif` | `loop`, `build --loop` | APNG and GIF encodings of the rendered idle |
|
|
204
206
|
|
|
205
207
|
Files authors write for this package, each with a spec id the reader holds:
|
|
206
208
|
`spine-parts-requirements/1` (`check --requirements`), `spine-parts-scene/1`
|
|
207
209
|
(`compose --scene`), `spine-parts-keypoints/1` (`propose --keypoints`),
|
|
208
|
-
`spine-parts-bonemap/1` (`compare --map`). The spec ids keep the package's former
|
|
210
|
+
`spine-parts-bonemap/1` (`compare --map`); and one another tool writes, read as that tool defines it: rig-c/review's `rig-review-mesh-edit/1` (`remesh --delta`). The spec ids keep the package's former
|
|
209
211
|
name on purpose: they name a file format, not the tool, and a file written before
|
|
210
212
|
the rename still reads. They do not change at 1.0.
|
|
211
213
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rig-c/parts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
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": {
|