glina presets
Invocation
glina presets [list | add <name> <file.json> | remove <name>] [--text]
Purpose
List, add and remove the animation presets that glina animate --preset <name> reads. A preset is one JSON file with an actions list and an active field naming one of those actions. Built-ins ship under assets/presets/; custom declarations persist under $XDG_DATA_HOME/glina/presets/ (or ~/.local/share/glina/presets/). An installed package need not be writable.
Built-in declarations are dragon (its named wing and tail bones) and motion (root-motion clips idle, travel and attack without required bone names). motion still requires a GLB with an armature; a mesh with no armature refuses at the Blender operation.
Inputs and options
list, or no verb, prints every declared name, sorted.add <name> <file.json>checks the file and copies it into the user data directory.<name>is lowercase letters, digits and dashes.remove <name>deletes a custom preset; built-ins are protected.--textprints the result aspath: valuelines instead of JSON.
Output and state
list prints {kind: "preset", names}. On first access after an older Glina install, a custom declaration left under package assets/presets/ moves into user data; the shipped dragon and motion files stay. Otherwise listing changes nothing. add and remove print {kind, name, path, outcome} with outcome added or removed; path is the custom declaration in the user data directory. A second removal is refused.
Refusals
presets add needs <name> <file.json>/presets remove needs <name>: a missing argument.presets takes list, add or remove; got <verb>: an unknown verb.preset name must be lowercase letters, digits and dashes; got "<name>".<file>: <parse error>,<file> is not a JSON object,<file> has no actions list,<file> names active action "<x>", which is not one of its actions: the file does not describe a preset.preset <name> is already declared; remove it first/preset <name> is not declared.preset <name> is built in and cannot be removed: the package's declaration is protected; copy it to a new name to customize it.cannot migrate <old path>: <user path> already holds different bytes: both copies stay; Glina never overwrites either.copied <old path> to <user path>, but could not remove the old copy: <error>: the package is not writable or removal failed; Glina reports the incomplete move rather than listing a declaration that would reappear after removal.
Each refusal is printed as error: <message> and exits 2, like an unknown command: a name Glina has not declared is a usage error.