rig-parts 2.67.0 → 2.69.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/README.md +1 -0
- package/cli.ts +60 -5
- package/docs/AUTHORING.md +187 -50
- package/docs/STABILITY.md +132 -23
- package/package.json +3 -2
- package/src/build.ts +7 -1
- package/src/check.ts +385 -5
- package/src/checkrow.ts +1 -0
- package/src/clipstretch.ts +12 -5
- package/src/editedparts.ts +57 -21
- package/src/parts.ts +27 -21
- package/src/partscheck.ts +13 -23
- package/src/partsfiles.ts +62 -0
- package/src/replacementrecord.ts +172 -0
- package/src/replaceparts.ts +564 -0
- package/src/rig.ts +1 -1
- package/src/runstamp.ts +24 -3
- package/src/scene.ts +9 -2
- package/src/sceneclips.ts +3 -3
package/src/scene.ts
CHANGED
|
@@ -1173,6 +1173,7 @@ export function scaledConstraint(con: Record<string, unknown>, s: number): Recor
|
|
|
1173
1173
|
case 'slider':
|
|
1174
1174
|
if (sliderInputIsLength(con)) {
|
|
1175
1175
|
len('from');
|
|
1176
|
+
len('max');
|
|
1176
1177
|
out.scale = scaledBy(typeof con.scale === 'number' ? con.scale : SPINE_SLIDER_SCALE_DEFAULT, 1 / s);
|
|
1177
1178
|
}
|
|
1178
1179
|
break;
|
|
@@ -2591,8 +2592,14 @@ function readSceneComposition(scenePath: string, mode: PackMode, accept: readonl
|
|
|
2591
2592
|
}
|
|
2592
2593
|
|
|
2593
2594
|
/** Read the declared composition before character checks. The diagnostic gates its own scratch candidate. */
|
|
2594
|
-
export function readSceneForClipStretch(scenePath: string, mode: PackMode):
|
|
2595
|
-
|
|
2595
|
+
export function readSceneForClipStretch(scenePath: string, mode: PackMode):
|
|
2596
|
+
Pick<ComposedScene, 'rig' | 'motion' | 'images'> & { explicitlyPlayed: ReadonlySet<string> } {
|
|
2597
|
+
const { scene, composed: { rig, motion, images } } = readSceneComposition(scenePath, mode, [], false);
|
|
2598
|
+
const explicitlyPlayed = new Set([...Object.keys(scene.animations ?? {}), ...Object.keys(scene.camera?.tracks ?? {})]);
|
|
2599
|
+
for (const character of scene.characters) {
|
|
2600
|
+
for (const clip of Object.keys(character.with_idle ?? {})) explicitlyPlayed.add(prefixed(character.id, clip));
|
|
2601
|
+
}
|
|
2602
|
+
return { rig, motion, images, explicitlyPlayed };
|
|
2596
2603
|
}
|
|
2597
2604
|
|
|
2598
2605
|
/**
|
package/src/sceneclips.ts
CHANGED
|
@@ -533,7 +533,7 @@ export function mergeSceneAnimations(rig: RigSpec, motion: MotionSpec, clips: Sc
|
|
|
533
533
|
continue;
|
|
534
534
|
}
|
|
535
535
|
// Bounds belong to the actual final slider, never to a guessed dial-name list.
|
|
536
|
-
//
|
|
536
|
+
// Core resolves an omitted `from` to zero. The editor's `max` is authored.
|
|
537
537
|
for (const track of clip.tracks) {
|
|
538
538
|
if (track.group !== undefined && (!Object.hasOwn(motion.groups, track.group) || !Array.isArray(motion.groups[track.group]))) {
|
|
539
539
|
problems.push({ code: 'CE_COMPILE_ANIMATION_GROUP_UNKNOWN', object: `scene.animations.${name}`,
|
|
@@ -545,9 +545,9 @@ export function mergeSceneAnimations(rig: RigSpec, motion: MotionSpec, clips: Sc
|
|
|
545
545
|
if (slider.type !== 'slider' || slider.bone !== bone) continue;
|
|
546
546
|
const channel = sliderInputChannel(slider.property, track.property);
|
|
547
547
|
if (channel === null) continue;
|
|
548
|
-
const from = slider.from, max = slider.max;
|
|
548
|
+
const from = slider.from === undefined ? 0 : slider.from, max = slider.max;
|
|
549
549
|
if (typeof from !== 'number' || !Number.isFinite(from) || typeof max !== 'number' || !Number.isFinite(max) || from > max) {
|
|
550
|
-
problems.push({ code: 'SCENE_DIAL_RANGE_DECLARED', object: `scene.animations.${name} bone "${bone}" slider "${String(slider.name)}"`, detail: `has no readable declared range: from ${String(from)}, max ${String(max)}; declare
|
|
550
|
+
problems.push({ code: 'SCENE_DIAL_RANGE_DECLARED', object: `scene.animations.${name} bone "${bone}" slider "${String(slider.name)}"`, detail: `has no readable declared range: from ${String(from)}, max ${String(max)}; declare an ordered range with finite max before keying this dial` });
|
|
551
551
|
continue;
|
|
552
552
|
}
|
|
553
553
|
for (const key of track.keys) {
|