Manage assets
Add, rename, set the cover of and remove the characters, locations and props of a project, and keep pictures in your library.
An asset is a character, a location or a prop that a project uses. Each one has a name, a description and pictures. Scripts and prompts point at an asset by its name, such as @Lin Xia. These commands do what the 资产 tab in the MiniCut app does, with the same rules.
Before you start, sign in and make a project. See Quickstart. Every command here needs a signed-in computer. Each minicut asset command prints one line of JSON. Run the commands in the project folder, ~/.minicut/projects/rain-shop here.
Add an asset
- Put a picture of the character in the project folder,
lin.png. A picture is PNG, JPG or WebP, up to 25 MB, and a command takes up to 12. - Add the character with its picture and a note:
minicut asset add rain-shop characters "Lin Xia" --note "shop owner" lin.png{"id":"lin-xia","kind":"characters","name":"Lin Xia","folder":"library/characters/lin-xia"}The id comes from the name, in lowercase Latin letters and -. A name with no Latin letters gets an id such as character-01. Use the id in the commands below. The pictures are saved as image-01, image-02, and on, with their own extension.
- Optional: add a location or a prop. They need no picture.
minicut asset add rain-shop locations "Night shop"
minicut asset add rain-shop props "Umbrella"A name is 1 to 40 characters and cannot hold /, \, @ or a vertical bar. A name that the project already uses is refused with name_taken.
Rename an asset
- Rename the item by its
id:
minicut asset rename rain-shop characters lin-xia "Lin"{"name":"Lin","files_changed":0}rename changes every @Lin Xia in script.md and story.md, and in script.md, shots.md, assets.md and prompts.md of each episode, in every project that uses the item. files_changed is how many files it rewrote.
Set the cover
- Set the picture that stands for the item, by its file name:
minicut asset cover rain-shop characters lin-xia image-01.png{"cover":"image-01.png"}Pick a take
- Set the take that a shot uses. The arguments are the project, the episode, the shot and the take:
minicut asset pick rain-shop ep01 c03 t02{"pick":"t02"}Remove an asset
- Remove the item from the project:
minicut asset remove rain-shop props umbrella{"moved":true,"name":"Umbrella"}The item's folder goes to the system Trash. When another project still uses the item, the folder stays in your library, and moved is false.
Keep a picture in your library
- Keep a picture you already have as a character, location, prop or style picture, and list it in the project:
minicut save character lin.png --id lin-xia --as sheet-02 --project rain-shopIt prints Saved with the path in your library, and says whether the project already lists the item. When the file is already there, it prints already in the library, not overwritten.
minicut save never writes over a file that is already in the library. To keep a finished video as the take of a shot, see minicut save. To make pictures with a model, see Generate.
Check it worked
Each command prints its result and exits with code 0. The folder ~/.minicut/library/characters/lin-xia holds the pictures, and the project's series.json lists lin-xia under library.characters.
If a step fails
The error field holds a fixed code.
The exit code is 1 when the action is refused.
It is 2 when the words after asset are wrong.
It is 5 when a picture is outside your work folders.
| Error | What to do |
|---|---|
name_taken | Pick a name the project does not use yet |
bad_name | Use 1 to 40 characters, with no /, \, @ or vertical bar |
no_project | Check the project id, or use . inside the project folder |
no_asset | Use an id that the project lists in series.json |
no_file | Use the file name of one of the item's pictures |
no_clip | Check the episode and shot ids. The shot needs a folder in clips |
no_take | Use a take that the shot has, such as t02 |
bad_type | Give a PNG, JPG or WebP picture |
too_large | Give a picture of 25 MB or less |
bad_request | Check the kind. It is characters, locations or props |
path_outside | Move the picture into your project folder, then add it again |