Skip to content

feat(scenes): animate an object, and add the directions it lacks - #82

Merged
protonspy merged 2 commits into
mainfrom
feat/an-object-animation-takes-more-directions
Sep 21, 2026
Merged

protonspy merged 2 commits into
mainfrom
feat/an-object-animation-takes-more-directions

Conversation

@protonspy

@protonspy protonspy commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

No description provided.

`POST /v2/objects/{object_id}/animations` is the route that does what the
character route refuses: it takes `animation_group_id` to add directions to an
animation that already exists, inherits that animation's description, and answers
409 to a direction it already holds unless `replace_existing` says otherwise.

- `object animate <id> -a "<motion>"` animates a prop, one job and one charge per
  direction. `--into <animation_group_id>` adds to an animation that exists, and
  with no `--direction` it adds exactly the ones that animation lacks. `--again`
  is `replace_existing`.
- `object show <id>` is free and prints each animation's group identifier, which
  the provider reports nowhere else and `--into` cannot be used without.

The CLI reads the object first, which costs nothing. The route would work the
missing set out on its own, but then the number of directions — and so the bill —
would only be knowable after the call. A generation per frame per direction, eight
frames by default, is sixty-four for a full eight directions, and nobody should
meet that number on the invoice. `mode='pro'` is left unreachable: it is twenty to
forty generations per direction.

Two defects were in the way and are fixed with it:

- `_poll_id` could not read a job identifier out of `submissions`, where this
  route puts one object per direction.
- `_check_choice` compared a whole list against an enumerated set rather than each
  item, so `--direction north` was refused as an invalid value. This is the first
  list parameter in the catalogue to enumerate its items.

From the security review: the job identifier a response hands back is interpolated
into the poll path, and that request carries the bearer token — the same problem
`collect` already guarded for an identifier a caller types. One helper now guards
both, which closes the flat-list case for character animations too (R3.6 widened).

From the code review: `frame_default` moved to `catalog.py` and reads the route's
own `frame_count`, rather than a second copy of the number in the object command;
and a one-direction object whose animation already covers it is refused here
rather than by the provider.

specs/characters-and-animation R2.41-R2.44, R4.6; specs/provider-core R4.10, R3.3,
R3.6.
Verified with scc validate --checks --pr: 1802 passed, 58 skipped, coverage
95.31%, ruff check and format clean, artifacts clean.
@protonspy
protonspy force-pushed the feat/an-object-animation-takes-more-directions branch from 58932ab to a57343a Compare September 21, 2026 00:58
@protonspy
protonspy merged commit dacefd1 into main Sep 21, 2026
2 checks passed
@protonspy
protonspy deleted the feat/an-object-animation-takes-more-directions branch September 21, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant