← back to roto on ba3a.dev

add

fun add(preset: ProjectPreset): String

Adds preset as a user preset and returns its id: the name with every run of characters SafeName does not allow turned into -. Throws PresetException, adding nothing, when no id can be made of the name, when the id is already a built-in or user preset (case aside), or when writing fails.


fun add(bundle: Path): String

Reads the bundle at bundle with PresetBundle.read and adds it as add does; a bad bundle adds nothing.