← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard
@Serializable
enum Appearance : Enum<Appearance>

Which colour scheme the app shows.

Link copied to clipboard
@Serializable
data class RecentProject(val project: String, val library: String? = null)

A project the artist opened before, with the library it was worked on in, so reopening it finds the same assets.

Link copied to clipboard
@Serializable
data class Settings(val library: String? = null, val project: String? = null, val editor: String? = null, val folders: Map<String, String> = emptyMap(), val recent: List<RecentProject> = emptyList(), val appearance: Appearance = Appearance.System, val window: WindowSettings? = null, val exportScale: Int = DEFAULT_EXPORT_SCALE)

The artist's own Roto settings on this machine: the library folder that holds every profile, the project folder last opened, the editor program handoffs open in, if they chose one over the system's default, the folders each kind of file chooser last used, the recent projects, the appearance of the app, the window it was left in and the exportScale last chosen. All paths are absolute paths: they describe this machine, not any consuming project, so the rule that project paths are relative does not apply.

Link copied to clipboard

Reads and writes Settings as settings.json in the SettingsStore's folder; a bad file is a SettingsException.

Link copied to clipboard
class SettingsException(message: String, cause: Throwable? = null) : IOException

A settings.json Roto cannot read: malformed, or holding a value that fails validation.

Link copied to clipboard
class SettingsStore(val file: Path, val defaultLibrary: Path = homeLibrary(Path.of(System.getProperty("user.home"))))

Where the artist's Settings are kept: file, by default settings.json in the operating system's per-user configuration folder, so the desktop app and the command line share one library choice. A missing file is the empty settings; a damaged one is a SettingsException.

Link copied to clipboard
@Serializable
data class WindowSettings(val width: Int, val height: Int, val x: Int, val y: Int, val maximised: Boolean = false)

Where the app window was left: its size and position on screen, and whether it was maximised.

Properties

Link copied to clipboard
const val MAX_RECENT_PROJECTS: Int = 10

How many projects Settings.recent keeps.