Merge pull request #2 from storytold/puppet-rigging

Puppet tools: pin editing, rigging to nulls, follow-through; expression runtime fix
This commit is contained in:
BFlat
2026-10-04 00:26:24 +07:00
committed by GitHub
18 changed files with 972 additions and 77 deletions
+16
View File
@@ -295,6 +295,22 @@ that closes the dialog). File ▸ Scripts: `file.scripts.list`, `file.runScript
* `puppet.recordPin {"layer": "#1", "pin": "Puppet Pin 1", "samples": [[t, x, y]…]}` records a
drag (t = seconds since it began, layer space) into Position keys at the comp frame rate from the
current time; `puppet.recordOptions {speed, smoothing, useDraftDeformation, showMesh}`.
* `puppet.selectPins {"layer": "#1", "pins": ["Puppet Pin 1"], "add"?, "toggle"?}` selects pins
like the viewer's click / Shift-click (`pins: []` deselects); Edit ▸ Clear (Delete) then removes
the selected pins, not their layer (`puppet.removePin {pins?}`). Advanced and Bend pins turn by
their ring and scale by its square in the viewer (Shift: 15° / 5 % steps; automation ids
`viewer.puppetPin.<uid>.rotate` / `.scale`), or `puppet.setPin {rotation, scale}`. A drag
outside the art (or Alt-drag) marquee-selects pins; Edit ▸ Select All with a pin selected selects
every pin of that kind; `puppet.recordPin {..., "pins": [...]}` records several pins moving
together (⌘/Ctrl-drag one of several selected pins).
* Rigging pins: `paths.pointsFollowNulls {"layer": "#1", "pins"?: [...]}` gives each Position /
Advanced pin a null that drives it (parent the nulls to each other to build limbs);
`paths.nullsFollowPoints {..., "pins": [...]}` makes nulls that ride on pins (parent props to
them). Without `pins` they use the selected pins, or every pin of a layer with no path.
* Follow-through (hair, cloth, tails): `puppet.follow {"leader": "Puppet Pin 1", "pins": [...],
"delay": 0.1, "amount": 100, "cascade": true}` makes the pins trail the leader's motion (the
k-th nearest by k × delay with `cascade`) through Position expressions; without `leader` /
`pins` the first selected pin leads the other selected pins.
* `effect.plugins.load {"path": "x.wasm"}` / `effect.plugins.list`: WebAssembly effect plug-ins
([plugins.md](plugins.md)), then `effect.apply` by id like a built-in.