Core and the app · crate
kinogaki-project
Studio's project files: a document as a Prism document.
- Repository
- Core and the app (kinogaki/studio-core)
- Folder
studio/core/project- Source
- 28 files, 6,038 lines
- Tests
- 21 files, 5,470 lines
What it is
Studio's project files: a document as a Prism document.
A project is its scene (kinogaki_document::Scene), its time, the view it saves and what it keeps of what no installed package reads. .kino files hold a binary Prism crate by default; saving to a .prisma path writes the diffable text form; loading recognizes the content by its magic, never by the extension.
What is saved. Each value is written by its own codec: a body by its kind's ObjectCodec, a network by core's one node codec, a held delta and a kept output by their data type's DataCodec (the standard types' among them), all through the SDK's element traits over Prism (element). Only what no cook makes again is saved: held edits' deltas, bases and results, and frozen nodes' kept outputs. Cooked results are cooked again on load.
What is kept. A node of a type no installed package provides, an object of a kind none declares and a stored value of a package that isn't installed load as placeholders or Kept parts and are written back unchanged; the load's LoadReport says what, once per package. Anything else a file holds that no reader takes refuses it. Reads report how far they are through a Progress.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-anim | Core and the app | normal | Studio's animation channels. |
kinogaki-brep-mesh | Core and the app | normal | B-reps as polygons, below the viewport, renders and file exchange alike: each body's mesh by the installed mesher, cached on its geometry (meshed), and a value's bodies joined into one polygons value (joined): each body's mesh, the faces' polygons ... |
kinogaki-cook | Core and the app | normal | Studio's core cooking engine, the same for every network kind (the owner's rule: the cooking DAG for nodes is core's). |
kinogaki-core-package | Core and the app | normal | Core's own SDK package (kinogaki.core): what Studio holds whatever plugins are installed. |
kinogaki-document | Core and the app | normal | Studio's document: the scene, a tree of objects under one root, and the core network each object of a kind naming a context holds. |
kinogaki-math | lib-math | normal | Kinogaki's vectors, points, matrices, quaternions and deterministic elementary functions. |
kinogaki-network | Core and the app | normal | Studio's core networks (design: core-owned networks; "Cooking DAG for nodes is studio core"). |
kinogaki-prism | lib-prism | normal | Prism documents for Kinogaki. |
kinogaki-render-api | SDK | normal | Kinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API. |
kinogaki-studio-api | SDK | normal | Kinogaki Studio's headless plugin API. |
For its tests alone
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-parallel | lib-parallel | tests | Scoped parallel work over disjoint output slices, sized by cost. |
kinogaki-studio-api-testing | SDK | tests | The SDK's test support (a dev-dependency only): assert_refused for admission tests, read_hostile for a format's tests of hostile files, format for its scratch folders and round trips, workers as a host installs them, with wgpu an ... |
kinogaki-testkit | Core and the app | tests | Kinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
kinogaki-testkit | Core and the app | normal | Kinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin. |
Modules
elementThe SDK's element traits over Prism documents, directly: what a package's codec writes into and reads from a.kinoproject.574 linesexchangeImport and Export through the installed formats (Formats): reading a file into the items the scene makes objects of, and writing objects to a file as items (items): Parts as groups, each object with its shown result or its kind's value, placed as in ...442 linesfile(private)Project files on disk: bounded reads and atomic saves, each reporting how far it has come through aStagesof itsProgress.204 linesimagesImage files in and out of a project, on the worker: a file read whole to be embedded (read()), and embedded bytes written out to a file (write()).171 lineskept(private)What a project file holds of packages that aren't installed, outside their objects and nodes, kept as read and written back where it was.87 linesprogress(private)How far a project read or write has come, for a progress bar.96 linesreport(private)What a load couldn't read: the parts of a project that need a package that isn't installed.207 linesschema(private)The project schema: how aProjectmaps onto a Prism document.189 linesschema::assets(private)Asset definitions: the ones a project embeds (/assets) and a library file's one (/asset), in one shape.139 linesschema::base64(private)Base64 (RFC 4648, the standard alphabet with padding): how a copy's binary rides on the clipboard's text.93 linesschema::clipboard(private)Copied nodes and objects as clipboard text, for a paste in another Studio process: a first line naming the copy (Kinogaki Studio copy <process>.<copy>, which the process that copied it pastes from what it keeps), then the copy as a Prism binary document in ...264 linesschema::fields(private)Core's elements as its schema reads them (At): typed reads with errors that name the element and the field, each read taken (Taken), so a field missing, of another type or that nothing reads refuses the file.234 linesschema::held(private)A held node's delta, captured base and result in a project.111 linesschema::levels(private)A core network's levels: its nodes, subnets and every wire between them (each node's own element is node.rs's).605 linesschema::node(private)Core networks (kinogaki_network::CoreNetwork) in a project: every node of every context is spelt the same way, whatever its type.724 linesschema::node_view(private)How a node's panels show it, no part of its content: a code row's height and the text it keeps from the node while that holds an error, and its locked rows.40 linesschema::objects(private)Object bodies and the networks objects hold.113 linesschema::outputs(private)A node's kept or held outputs in a project: each value asout<k>through its type's codec, the selection and warnings carried beside them.114 linesschema::scene(private)The scene (/scene): its object tree, each object's body and the network it holds.245 linesschema::settings(private)Project settings (/project/settings), with the installed packages' stored values of the project as its children.82 linesschema::stored(private)Packages' stored values (kinogaki_studio_api::Stored): the project's under its settings, each view's under its pane, one element each.120 linesschema::values(private)A parameter's value as a Prism field, and back: the SDK's one encoding of every value kind (element::field_of,element::value_of), in projects (docs/KINO-FORMAT.md, "Values") and the user's settings (a tool's remembered parameters) alike.131 linesschema::view(private)The saved view (/project/view).133 linestaken(private)What reading took of a project's elements, so that what it didn't is refused: the one strictness check of every reader, core's schema and the packages' codecs alike.175 linestask(private)Opening, saving, importing and exporting on a worker thread, and the image files a project embeds read or extracts written.310 linesview(private)The view a project saves (/project/view): where the viewport's cameras look, the network pane's pan and zoom, the object open, and the four panes' cameras with each pane's stored values of the installed packages (what it draws among them).121 linesworkCounts of the work a load does on this thread, which tests check instead of wall time: a count doesn't change with how busy the machine is.21 linesclipboardCopied nodes and objects as clipboard text, for a paste in another Studio process (kinogaki.clipboard).3 lines
Public types and traits
At the crate root
Structs KeptLoadedLoadReportOrbitPanesPaneViewProgressProjectProjectTaskViewWhat
Enums DoneProjectOperation
Type aliases ProgressHookProjectResult
Re-exported from other crates
From kinogaki_prism Format
By module: 17 public types and traits in 7 modules
element LoadingSaving
exchange ReadsStandardForm
kept Kept
progress Progress
report LoadReportWhat
task DoneProgressHookProjectOperationProjectResultProjectTask
view OrbitPanesPaneViewView
Besides these, 10 public functions at module level.
