Templates
A template is what a new project can start from. The project hub lists them, and so does template.list.
Using one
template.apply is meant for a project that was just made. It copies the template's files in, builds its scene and saves it. Files the project has already are kept.
What comes with the engine
Making your own
A template is a folder inside Templates/:
Template.jsonl starts with the template's name and description, and how its card in the hub looks: an icon from the editor's icons, by file name in Cairn-Editor/Icons, and a colour its picture fades from. Both are optional.
The rest is ordinary commands, run in order as if an agent had sent them. The first that fails stops the rest.
Rules:
- Name assets by path, never by ID. The files in
Files/have no.metafiles, so each project made from the template gets IDs of its own. ${TEMPLATE}in a command becomes the template's folder, forasset.importof a file that should not be copied wholesale.- End with
scene.save. - A template may not create or open projects.
The editor looks for templates in the Templates folder beside its program, where the build copies them. --templates DIR points it elsewhere.