rig-parts 2.72.0 → 2.74.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 +33 -12
- package/docs/AUTHORING.md +92 -70
- package/docs/STABILITY.md +47 -2
- package/package.json +1 -1
- package/src/build.ts +30 -3
- package/src/check.ts +2270 -146
- package/src/checkrow.ts +35 -29
- package/src/config.ts +4 -4
- package/src/parts.ts +3 -1
- package/src/propose.ts +27 -13
- package/src/runstamp.ts +13 -5
- package/src/scene.ts +102 -5
package/src/build.ts
CHANGED
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
untestedIntervals,
|
|
99
99
|
} from './autoreplay.ts';
|
|
100
100
|
import { physicsLines } from './physicscontrib.ts';
|
|
101
|
-
import { besideIdleLine, checkSummaryLine, inputFileRecord, type InputFileRecord, CLOTH_LINE, type ClothLine, clothWarnText, figureOpeningLines, frameRuns, type LoopSeamRequest, MOTION_SEAM_LINE, type MotionSeamLine, type MotionSeamPlant, motionSeamRequiredLine, motionSeamWarnText, motionJointContactLines, FOLD_LINE, type FoldsLine, LEVEL_LINE, type LevelLine, LIMB_LINE, type LimbLine, sliderStretchLine, STRESS_LINE, SWEEP_LINE, type SweepLine, buildGateLines, causeLines, environmentLine, IDLE_FPS, IDLE_MAX_PX, maxRgbDiff, REQUIREMENTS_DIR, type CheckReport, type PackLine, DEFAULT_PACK_SHAPE, DEFAULT_PAGE_EDGES, GATE_PROFILE, JUDGEMENT_LINES, type JudgementLine, packedBuildArgs, packedBuildLabel, type PackMode, parsePageSize, readCheckEnvironment, readWindBand, type PackShape, type PageEdges, readFrameSet, rigcFailed, rigcIdentity, rigcRanClause, REPORTED_LINES, type ReportedLine, type RigcRunner, runCheck, SEAM_DIR, SEAM_MEAN_BAR, seamPairText, seamRigPxText, SOURCE_LINE, SEAM_PX_BAR, SEAM_PX_LEVEL, SEAM_PX_LEVEL_HIGH, SPINEBOY_YARDSTICK, STILL_DIR, WIND_BAND_LINE, windBandLines } from './check.ts';
|
|
101
|
+
import { besideIdleLine, checkSummaryLine, type ComposedCharacterInput, inputFileRecord, type InputFileRecord, CLOTH_LINE, type ClothLine, clothWarnText, figureOpeningLines, frameRuns, type LoopSeamRequest, MOTION_SEAM_LINE, type MotionSeamLine, type MotionSeamPlant, motionSeamRequiredLine, motionSeamWarnText, motionJointContactLines, FOLD_LINE, type FoldsLine, LEVEL_LINE, type LevelLine, LIMB_LINE, type LimbLine, sliderStretchLine, STRESS_LINE, SWEEP_LINE, type SweepLine, buildGateLines, causeLines, environmentLine, IDLE_FPS, IDLE_MAX_PX, maxRgbDiff, REQUIREMENTS_DIR, type CheckReport, type PackLine, DEFAULT_PACK_SHAPE, DEFAULT_PAGE_EDGES, GATE_PROFILE, JUDGEMENT_LINES, type JudgementLine, packedBuildArgs, packedBuildLabel, type PackMode, parsePageSize, readCheckEnvironment, readWindBand, type PackShape, type PageEdges, readFrameSet, rigcFailed, rigcIdentity, rigcRanClause, REPORTED_LINES, type ReportedLine, type RigcRunner, runCheck, SEAM_DIR, SEAM_MEAN_BAR, seamPairText, seamRigPxText, SOURCE_LINE, SEAM_PX_BAR, SEAM_PX_LEVEL, SEAM_PX_LEVEL_HIGH, SPINEBOY_YARDSTICK, STILL_DIR, WIND_BAND_LINE, windBandLines } from './check.ts';
|
|
102
102
|
import { type BoneEntry, type CharacterConfig, type Cut, type Extend, loadConfigAndAnimations, loadConfigWithBytes, loadEarlyConfig, type Patch, type PlanEntry } from './config.ts';
|
|
103
103
|
import { coreCompileGuideLine, failLine, foldName, PartsError, type Problem, refuseIfAny } from './errors.ts';
|
|
104
104
|
import { editedConfigImages, editedRunImages, missingReceipts, readEditorReceipts } from './editreceipt.ts';
|
|
@@ -2252,6 +2252,8 @@ export interface CheckStageInput {
|
|
|
2252
2252
|
* absent, no sweep runs and no byte of `check.json` moves.
|
|
2253
2253
|
*/
|
|
2254
2254
|
windBand?: string;
|
|
2255
|
+
/** Bound character manifests when checking a composed rig (issue #1679). */
|
|
2256
|
+
characters?: readonly ComposedCharacterInput[];
|
|
2255
2257
|
}
|
|
2256
2258
|
|
|
2257
2259
|
/**
|
|
@@ -2420,12 +2422,13 @@ export function sweepCheckLines(line: SweepLine, steps: ReadonlyMap<string, { le
|
|
|
2420
2422
|
export function motionSeamLines(line: MotionSeamLine, plant: MotionSeamPlant = {}): string[] {
|
|
2421
2423
|
const unmeasured = (line.roots?.unmeasured ?? []).map(root => `root pair for ${root.limb} (${root.part}, bone "${root.bone}", parent "${root.parent}", candidates ${root.candidates.join('/')}): SKIP — ${root.reason}`);
|
|
2422
2424
|
const rootStatus = line.roots === undefined ? '' : '; body-root gap-open+under-ghost gate ' + line.roots.status + ' (' + line.roots.pairs.length + ' pair(s)); ghost ownership from resolved draw order' + (line.roots.reason === undefined ? '' : ' — ' + line.roots.reason);
|
|
2425
|
+
const barSkipClause = line.roots === undefined && line.required === undefined ? ', bar SKIP (no-root-gate)' : '';
|
|
2423
2426
|
if (line.worlds === undefined && line.status === 'SKIP' && line.rows.length === 0 && line.pairs.every((p) => p.unread === undefined)) return [`${MOTION_SEAM_LINE}: SKIP — ${String(line.reason)}${unmeasured.length === 0 ? '' : rootStatus}`, ...unmeasured, ...motionJointContactLines(line)];
|
|
2424
2427
|
const read = `${line.pairs.length} declared pair(s) in ${line.animations.length} animation(s) (${line.animations.join(', ')}), read by rigc render --seam at ${line.fps} fps on the build as played`;
|
|
2425
2428
|
const head =
|
|
2426
2429
|
line.status === 'SKIP'
|
|
2427
2430
|
? `${MOTION_SEAM_LINE}: SKIP — ${String(line.reason)}; ${read}${unmeasured.length === 0 ? '' : rootStatus}`
|
|
2428
|
-
: `${MOTION_SEAM_LINE}: ${line.status} — ${read}: ${line.warnings} warning(s), never a bar${rootStatus}; ${line.floor}`;
|
|
2431
|
+
: `${MOTION_SEAM_LINE}: ${line.status} — ${read}: ${line.warnings} warning(s), never a bar${rootStatus}${barSkipClause}; ${line.floor}`;
|
|
2429
2432
|
return [
|
|
2430
2433
|
head,
|
|
2431
2434
|
...motionJointContactLines(line),
|
|
@@ -2507,6 +2510,7 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
|
|
|
2507
2510
|
input.rig, input.out, rigc, input.parts, mode, input.source, input.requirements, input.seamPairs === true,
|
|
2508
2511
|
input.keepStills === true, input.set, input.allSets === true, input.environment, input.requirementsAs, input.config,
|
|
2509
2512
|
input.windBand, input.noExtremes === true, input.supportSource, input.supportFigure, input.assemblyRules, input.loopSeam, input.previewIdle,
|
|
2513
|
+
input.characters,
|
|
2510
2514
|
);
|
|
2511
2515
|
if (r.figures.environment !== undefined) log(` ${environmentLine(r.figures.environment)}`);
|
|
2512
2516
|
log(` gate rig-play (rigc ${packedBuildLabel(mode)}), verbatim:`);
|
|
@@ -2529,7 +2533,7 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
|
|
|
2529
2533
|
if (r.seamViewport === null || fig.seam_mean === null) log(` seam: SKIP — ${fig.skipped?.seam ?? ''}`);
|
|
2530
2534
|
else {
|
|
2531
2535
|
log(
|
|
2532
|
-
` seam${fig.seam_border === undefined ? '' : ` (config.scene: ${fig.seam_border.frame_px_left_out} frame px on the painting's border rows and columns left out, ${fig.seam_border.px_over_40_left_out} of them over ${SEAM_PX_LEVEL})`}: setup pose at ${r.seamViewport.pixelWidth}x${r.seamViewport.pixelHeight}, scale ${r.seamViewport.scale.toFixed(4)}: mean |d| ${fig.seam_mean} (<= ${SEAM_MEAN_BAR.toFixed(1)}), ` +
|
|
2536
|
+
` seam${fig.seam_border === undefined ? '' : ` (config.scene: ${fig.seam_border.frame_px_left_out} frame px on the painting's border rows and columns left out, ${fig.seam_border.px_over_40_left_out} of them over ${SEAM_PX_LEVEL})`}: setup pose at ${r.seamViewport.pixelWidth}x${r.seamViewport.pixelHeight}, scale ${(fig.seam_frame_scale ?? r.seamViewport.scale).toFixed(4)}: mean |d| ${fig.seam_mean} (<= ${SEAM_MEAN_BAR.toFixed(1)}), ` +
|
|
2533
2537
|
`${fig.seam_px_over_40} px over ${SEAM_PX_LEVEL}, ${fig.seam_frame_scale === null || fig.seam_px_over_40 === null ? '' : seamRigPxText(fig.seam_px_over_40, fig.seam_frame_scale)} rig px (the count / s²; <= ${SEAM_PX_BAR}), ${fig.seam_px_over_80} px over ${SEAM_PX_LEVEL_HIGH} (reported)`,
|
|
2534
2538
|
);
|
|
2535
2539
|
if (fig.seam_scope !== undefined) log(` seam scope: ${fig.seam_scope.mode}, denominator ${fig.seam_scope.denominator_px} source cells; union ${fig.seam_scope.domain?.viewport.pixelWidth}x${fig.seam_scope.domain?.viewport.pixelHeight}, numerator ${fig.seam_scope.domain?.numerator}; auto-frame raw mean ${fig.seam_scope.auto_frame_raw.mean}, ${fig.seam_scope.auto_frame_raw.px_over_40} px over ${SEAM_PX_LEVEL} at scale ${fig.seam_scope.auto_frame_raw.frame_scale} (diagnostic only)`);
|
|
@@ -2553,18 +2557,41 @@ export function checkStage(input: CheckStageInput, rigc: RigcRunner, bin: string
|
|
|
2553
2557
|
}
|
|
2554
2558
|
for (const name of JUDGEMENT_LINES) log(` ${judgementLine(name, fig[name])}`);
|
|
2555
2559
|
for (const row of fig.slider_stretch?.rows ?? []) log(sliderStretchLine(row, true));
|
|
2560
|
+
const noPartsMap = new Map((r.noPartsBars ?? []).map(b => [b.bar, b.reason]));
|
|
2556
2561
|
const folds = fig[FOLD_LINE];
|
|
2557
2562
|
if (folds !== undefined) for (const l of foldsLines(folds)) log(` ${l}`);
|
|
2558
2563
|
const level = fig[LEVEL_LINE];
|
|
2559
2564
|
if (level !== undefined) for (const [i, l] of levelLines(level).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|
|
2565
|
+
else if (noPartsMap.has(LEVEL_LINE)) log(` ${LEVEL_LINE}: SKIP — ${noPartsMap.get(LEVEL_LINE)}`);
|
|
2560
2566
|
const stress = fig[STRESS_LINE];
|
|
2561
2567
|
if (stress !== undefined) log(` ${judgementLine(STRESS_LINE, stress)}`);
|
|
2568
|
+
else if (noPartsMap.has(STRESS_LINE)) log(` ${STRESS_LINE}: SKIP — ${noPartsMap.get(STRESS_LINE)}`);
|
|
2562
2569
|
const limbs = fig[LIMB_LINE];
|
|
2563
2570
|
if (limbs !== undefined) for (const [i, l] of limbCheckLines(limbs).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|
|
2571
|
+
else if (noPartsMap.has(LIMB_LINE)) log(` ${LIMB_LINE}: SKIP — ${noPartsMap.get(LIMB_LINE)}`);
|
|
2564
2572
|
const sweep = fig[SWEEP_LINE];
|
|
2565
2573
|
if (sweep !== undefined) for (const [i, l] of sweepCheckLines(sweep, r.sweepSteps).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|
|
2574
|
+
else if (noPartsMap.has(SWEEP_LINE)) log(` ${SWEEP_LINE}: SKIP — ${noPartsMap.get(SWEEP_LINE)}`);
|
|
2566
2575
|
for (const [i, l] of motionSeamLines(r.motionSeam).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|
|
2567
2576
|
if (r.motionSeam.required !== undefined) log(` ${motionSeamRequiredLine(r.motionSeam.required)}`);
|
|
2577
|
+
if ((r.characterReports?.length ?? 0) > 1) {
|
|
2578
|
+
for (const cr of r.characterReports!) {
|
|
2579
|
+
const cf = cr.figures;
|
|
2580
|
+
log(` character "${cr.id}" (offset [${cr.offset.join(', ')}], scale ${cr.scale}):`);
|
|
2581
|
+
if (cr.seamViewport !== null && cf.seam_mean !== null) {
|
|
2582
|
+
log(` seam (${cr.id}): setup pose at ${cr.seamViewport.pixelWidth}x${cr.seamViewport.pixelHeight}, scale ${(cf.seam_frame_scale ?? cr.seamViewport.scale).toFixed(4)}: mean |d| ${cf.seam_mean} (<= ${SEAM_MEAN_BAR.toFixed(1)}), ${cf.seam_px_over_40} px over ${SEAM_PX_LEVEL}, ${cf.seam_frame_scale === null || cf.seam_px_over_40 === null ? '' : seamRigPxText(cf.seam_px_over_40, cf.seam_frame_scale)} rig px (<= ${SEAM_PX_BAR}), ${cf.seam_px_over_80} px over ${SEAM_PX_LEVEL_HIGH} (reported)`);
|
|
2583
|
+
}
|
|
2584
|
+
for (const name of ['BREATH_VISIBLE', 'BLINK_NO_HOLE', 'TIP_OVER_ROOT', 'STILL_REGIONS_DARK'] as const) {
|
|
2585
|
+
log(` ${judgementLine(`${name} (${cr.id})`, cf[name])}`);
|
|
2586
|
+
}
|
|
2587
|
+
if (cf[LEVEL_LINE] !== undefined) log(` ${LEVEL_LINE} (${cr.id}): ${cf[LEVEL_LINE].status}`);
|
|
2588
|
+
if (cf[STRESS_LINE] !== undefined) log(` ${judgementLine(`${STRESS_LINE} (${cr.id})`, cf[STRESS_LINE])}`);
|
|
2589
|
+
if (cf[LIMB_LINE] !== undefined) log(` ${LIMB_LINE} (${cr.id}): ${cf[LIMB_LINE].status} — ${cf[LIMB_LINE].parts.length} limb part(s)`);
|
|
2590
|
+
if (cf[SWEEP_LINE] !== undefined) log(` ${SWEEP_LINE} (${cr.id}): ${cf[SWEEP_LINE].status} — ${cf[SWEEP_LINE].joints.length} joint(s)`);
|
|
2591
|
+
for (const l of motionSeamLines(cr.motionSeam)) log(` (${cr.id}) ${l}`);
|
|
2592
|
+
log(` ${judgementLine(`RECOMPOSITE_HOLES (${cr.id})`, cf.RECOMPOSITE_HOLES)}`);
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2568
2595
|
for (const [i, l] of figureOpeningLines(r.figureOpenings).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|
|
2569
2596
|
for (const [i, l] of clothLines(r.cloth).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|
|
2570
2597
|
if (r.physics !== undefined) for (const [i, l] of physicsLines(r.physics).entries()) log(` ${i === 0 ? '' : ' '}${l}`);
|