Skip to content

Saving and files ​

Two folders, never mixed ​

FolderWhat is in itWho writes there
App folder (where AskrGarden runs; serve --root)the Examples (samples/), bundled textures, cachesnobody: Examples are read-only
Library (default Documents/AskrGarden)your trees, textures, exports, layoutsyou

Change the library in Preferences → Files → Default folder for trees, or for one run with askrgarden-cli serve --library <folder>.

Inside the library ​

text
AskrGarden/
  trees/<category>/<name>.treegen.json     bushes/<category>/…     grass/<category>/…
  textures/        shared texture sets and imported packs
  exports/<name>/  exports (the default destination)
  layouts/         saved window layouts
  thumbnails/      one picture per saved tree (the gallery uses them)
  .cache/          caches (impostor bakes)
  .trash/          deleted trees

Folders are created when the first save or export needs them.

The Save tree dialog ​

The first Save of a new tree (or of an Example, or Save as) asks:

The Save tree dialog

FieldMeaning
Namethe file name, without .treegen.json
Kindtree, bush or grass; guessed from the species and the name, change it if needed
Categorypick an existing folder or type a new one (it becomes a folder, as in trees/tropical/)

The dialog shows the resulting path and asks before replacing a file. Other folder… opens a file dialog to save anywhere on your computer. After that, Ctrl+S writes straight to the same file.

Each save also writes a small thumbnail about a second later: inside the library under thumbnails/, outside it as <name>.treegen.png beside the project.

Textures when you save somewhere else ​

A project stores relative paths to its textures. When you save into another folder, AskrGarden keeps the paths that still resolve and copies the others into <new folder>/textures (or /meshes), rewriting the paths. The editor tells you how many files were copied. Rename, move and duplicate in the gallery do the same.

Open ​

  • Ctrl+O: the gallery (Gallery and species library).
  • Ctrl+Shift+O or Open from the computer: any .treegen.json. A tree opened this way saves back to its own file.
  • File → Open recent.
  • ?project=<path> in the editor's address opens a project directly.

Open / New: the Examples folder

Leaving with unsaved changes asks first (switch it off in Preferences). Autosave saves after each change, for a project that already has a file.

Share a tree: .treegenz ​

A project references its textures; to send it to someone, bundle it:

powershell
.\askrgarden-cli.cmd pack my.treegen.json                 # writes my.treegenz: the project + every file it uses
.\askrgarden-cli.cmd unpack my.treegenz -o shared\my      # back to a folder

Files from outside the project's folder go under external/<n>/ inside the bundle, and the document is rewritten to point there. Unpacking refuses unsafe paths. The project file itself is described in Project file format.