Reference · Checking

pxart frames

List a file's frames and animations; or remove (--rm), move (--after/--before), rename (--rename) or copy them into another file (--copy-to).

frames FILE[:SEL] [--rm [ID...]] [--move ID --after|--before ID] [--rename GROUP NEWGROUP] [--copy-to DST [ID...] [--rekey [KEYS]] [--variant-map NAME=V1,V2] [--prefix P | --rename GROUP NEWGROUP]]
usage: pxart frames [-h] [--rm [ID ...]] [--copy-to DST [ID ...]] [--move MOVE] [--after AFTER]
                    [--before BEFORE] [--rekey [KEYS]] [--variant-map NAME=V1,V2]
                    [--rename GROUP NEWGROUP] [--prefix P] [--dry-run]
                    file

  frames FILE[:SEL] [--rm [ID...]] [--move ID --after|--before ID] [--rename GROUP NEWGROUP]
         [--copy-to DST [ID...] [--rekey [KEYS]] [--variant-map NAME=V1,V2]
          [--prefix P | --rename GROUP NEWGROUP]]
      List a file's frames and animations; or remove (--rm), move (--after/--before), rename
      (--rename) or copy them into another file (--copy-to).

positional arguments:
  file

options:
  -h, --help                show this help message and exit
  --rm [ID ...]             remove these frame ids, or FILE:SEL's frames with none (a group goes in the selector: frames FILE:GROUP --rm)
  --copy-to DST [ID ...]    copy frames (FILE:SEL, or these ids) into DST
  --move MOVE
  --after AFTER
  --before BEFORE
  --rekey [KEYS]            give keys that clash with OUT's colors free keys in OUT only; the source files stay as they are. KEYS: only these ('o,r'), or KEY=OUTKEY to use OUT's key ('k=j,n=q')
  --variant-map NAME=V1,V2  OUT's variant NAME takes each source's first of NAME, V1, V2 (repeatable)
  --rename GROUP NEWGROUP   GROUP's frames (or the frame GROUP) get NEWGROUP's ids, @anim/@still lines too; with --copy-to, only the copies (repeatable)
  --prefix P                with --copy-to: every copy's id gets P in front ('wick/')
  --dry-run                 print what the edit says and a diff of the file it would change; write nothing

      List frames, sizes, durations (only for animation frames; 'still' for @still groups
      and every frame under '@still *') and animations; or delete / reorder frames (prints
      what it removed or moved, not the listing; a move to where the frames already are
      prints "already in place" and writes nothing). FILE:SEL lists only those frames; 'frames
      hero.px:walk/left --rm' removes them (ids after --rm are frame ids, in SEL), and 'frames
      hero.px:walk/left --after idle/3' moves them there as a block, in order. --move ID
      takes a plain FILE and one frame id (a group moves with FILE:GROUP --after ID).
      Removing a group's last frame removes its @anim and @still lines too. A move puts the
      @anim lines in the order of their groups' first frames (with their comments; lines of
      groups with no frames after), so the file reads in play order, and says so.
      --copy-to DST copies FILE's frames (FILE:SEL's, or the ids after DST) into the existing
      DST as they play in FILE: each frame's ms and pivot (on its @frame line when DST's @anim
      would change them), the @anim line of a group DST lacks, and @still. They keep FILE's
      order and land after their group's last frame in DST, at the end for a new group, or
      at --after/--before a DST frame: 'frames hero.px:walk --copy-to beast.px --after idle/3'.
      Their keys join DST's palette and variants as compose's layers join an existing OUT
      (see compose): E_KEY_CONFLICT, the variant WARNINGs, --rekey [KEYS] and --variant-map
      dusk=night work alike. A frame id DST already has is E_DUP_FRAME, and so are two
      copies --rename would give one id (--rename walk w --rename run w).
      DST must exist: 'extract FILE:SEL -o DST' starts one with FILE's palette, and 'new DST
      --empty --palette P.px' one with no frames that imports P.
      Copies under other ids, when DST has those already (two packs' walk/*): --prefix wick/
      puts wick/ in front of every copy's id ('frames wick.px:walk --copy-to party.px --prefix
      wick/' writes wick/walk/down/0 and '@anim wick/walk/down'), and --rename walk wick/walk
      renames only the group (or frame) it names; FILE stays as it is. --rename repeats.
      --rename GROUP NEWGROUP without --copy-to renames in FILE itself: GROUP's frames (walk/0,
      walk/1, or the frame GROUP) become NEWGROUP's (wick/walk/0, ...), and the @anim and
      @still lines of GROUP and the groups under it follow, with their comments. A NEWGROUP
      FILE already has is E_DUP_FRAME.

See also, in pxart help all: FORMAT: frames and animation (@frame ids, groups, @anim);
  FORMAT: pivots and timing (pivot=x,y, direction, repeat, ms); FORMAT: still groups (@still
  GROUP, @still *); FORMAT: selecting frames (FILE:SEL, an unnamed grid's name, zsh's
  "${F}:sel").

pxart help all has the whole reference, pxart help TOPIC one part of it.

This is the output of pxart help frames. The other checking commands and their shared notes are in pxart help CHECKING.

This page is built from site/src/data/reference.json in the repository.Edit on GitHub