SDK · crate

kinogaki-studio-api

SDK

Kinogaki Studio's headless plugin API.

Repository
SDK (kinogaki/studio-sdk)
Folder
sdk/crates/api
Source
86 files, 19,325 lines
Tests
12 files, 3,176 lines
Depends on This crate Used by Kinogaki Studio's edit contracts: what core and the kernels agree on when a value is selected and changed.kinogaki-edit Kinogaki Studio's standard geometry values.kinogaki-geometry Kinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API.kinogaki-render-api Kinogaki Studio's value model: the one way the SDK says what a value is and holds.kinogaki-value Kinogaki's viewport packet contract: what a data type hands Studio's viewport to draw, with no GPU or UI API.kinogaki-viewport-api kinogaki-studio-api A Kinogaki Studio plugin that adds a Box node.example-box-node Flat: an example render engine.example-flat-engine A Kinogaki Studio plugin that brings a context with its UI.example-pin-board XYZ: an example file format.example-points-format core19 crates Comp2 crates OpenEXR2 crates FBX2 crates glTF2 crates JPEG2 crates Layout2 crates MaterialX2 crates lib-math1 crate Mesh4 crates OBJ2 crates Pixel2 crates PNG2 crates Spectre2 crates USD2 crates lib-ui1 crate 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`](mod@format) for its scratch folders and round trips, [`workers`] as a host installs them, with `wgpu` an ...kinogaki-studio-api-testing Kinogaki Studio's UI layer for plugins.kinogaki-studio-ui-api The UI layer's test support (a dev-dependency only): headless fakes of the host's UI for plugin unit tests: [`RecordingUi`] and [`RecordingPainter`] record what a plugin asks to show and draw, and play back scripted user actions, with no window and no GPU ...kinogaki-studio-ui-api-testing
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

Kinogaki Studio's headless plugin API.

Studio is an environment: with no packages installed it organises a scene (Parts, Cameras, an empty Material Library, a File node that can read nothing) and nothing more. Everything else (meshes, CAD bodies, file formats, render engines) comes from packages, and this crate is the contract between the two for everything that isn't UI:

  • Ids (id): declared, interned, one type per kind of thing.
  • Data (Data, Typed): type-erased shared values on wires and in object results, read by their kernel through a typed handle. Both are the value model's (value), which every parameter, render setting and material port holds its Value in.
  • Standard data types (standard, geometry): the geometry values every package shares (polygons, curves, attributes, selections), which core registers, displays and saves; kernels operate on them.
  • Data types (DataType): what the environment may ask of a value it can't look inside (bounds, info, a stamp, saving) and the optional facets: Displayable, Pickable, Tabular and Renderable. Components is a component selection in a type's own terms.
  • Cooking (cook): what a node type is and computes (NodeType with its Description, and CookCx); Studio's core owns the cooking DAG, the caches and the workers (geometry::parallel). HeldEdits apply a held node's authored delta to a data type.
  • Kernels (kernel): heavy algorithm libraries one package offers the others as verbs, reached through core while they are loaded.
  • Scripts (script): code a node runs over a standard value on the host's script engine, reached through core.
  • Objects (ObjectKindSpec, ObjectBody): kinds of scene objects a package adds and their package-owned state.
  • Networks (network): the contexts a package declares (NetworkContext) and how a package reads and edits a network, which core owns (NetworkRead, NetworkEdit).
  • Formats (FileFormat): readers and writers of outside files.
  • Session slots (Slot, SessionSlot): package-owned, undoable state of an editing session; gestures (GestureToken), one undo step over many edits, held by their opener.
  • Stored values (Stored, StoredValue): package-owned values the project keeps, one for the project or one per view.
  • Icons (icon): the named icons a package adds to Studio's icon set, under its own id.
  • Packages (Package, Registry): what a package registers, its UI included (PackageUi), and the environment's table of it all, which admits a package only once its checks pass (Registry::check); a plugin library exports its package through export_package! (entry).

And the plain types those exchange: the geometry crate's one vocabulary (Vec3, Xform, Bounds, Units, Time and Rate, and the one Error every fallible call returns, its Diagnostic what the user reads), params (parameter values and schemas), element (the project's element tree codecs write), viewport (display surfaces, element sets, picks), refs (the host's objects and nodes), render (neutral render items) and anim (a parameter's keys over time).

Self-contained. The crate depends on the standard library and the SDK's leaf crates alone (the value model, the standard geometry values, the render interface, the viewport packet contract), never on Studio, a kernel or any other Kinogaki library: every type it exposes is the SDK's own, and Studio converts between these types and its own libraries' at the boundary. So the SDK builds from a plain clone, and a package written against it compiles against nothing private.

Every value crosses as a Rust type: Studio and its packages are built by one compiler and share one copy of each crate, so TypeIds and downcasts agree across packages.

Depends on

CrateRepositoryAsWhat it is
kinogaki-editSDKnormalKinogaki Studio's edit contracts: what core and the kernels agree on when a value is selected and changed.
kinogaki-geometrySDKnormalKinogaki Studio's standard geometry values.
kinogaki-render-apiSDKnormalKinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API.
kinogaki-valueSDKnormalKinogaki Studio's value model: the one way the SDK says what a value is and holds.
kinogaki-viewport-apiSDKnormalKinogaki's viewport packet contract: what a data type hands Studio's viewport to draw, with no GPU or UI API.

Third-party

None.

Used by

CrateRepositoryAsWhat it is
example-box-nodeSDKnormalA Kinogaki Studio plugin that adds a Box node.
example-flat-engineSDKnormalFlat: an example render engine.
example-pin-boardSDKnormalA Kinogaki Studio plugin that brings a context with its UI.
example-points-formatSDKnormalXYZ: an example file format.
kinogaki-animCore and the appnormalStudio's animation channels.
kinogaki-brep-meshCore and the appnormalB-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-color-serviceCore and the appnormalStudio's color service: the OpenColorIO config (lib-color's built-in ACES 2.0 CG config, or a file), the working space, and the viewer's display, view, look, exposure and gamma.
kinogaki-compCompnormalComp as an SDK package (kinogaki.comp): what fills Studio's Comp context (kinogaki.core.comp, core declares it, inside a Render Output object).
kinogaki-cookCore and the appnormalStudio's core cooking engine, the same for every network kind (the owner's rule: the cooking DAG for nodes is core's).
kinogaki-core-packageCore and the appnormalCore's own SDK package (kinogaki.core): what Studio holds whatever plugins are installed.
kinogaki-documentCore and the appnormalStudio'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-editorCore and the appnormalKinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one.
kinogaki-exr-formatOpenEXRnormalOpenEXR, a format plugin: an EXR file reads as one standard Image, every part's channels its layers, and an Image writes as one EXR, Cryptomatte included.
kinogaki-fbxFBXnormalFBX as a read-only format plugin for Kinogaki Studio.
kinogaki-geometry-viewCore and the appnormalGeometry, curves and B-reps in the viewport, independent of any GPU API: the SDK's standard values as surface packets (over the SDK's display triangulation and shading normals, so Solid draws what Render renders), the one picker that answers rays and boxes ...
kinogaki-gltfglTFnormalglTF 2.0 and GLB, a format plugin for Kinogaki Studio.
kinogaki-harnessCore and the appnormalStudio's test harness: the real editor, its event routing and its background work, driven offscreen with only the packages a test names.
kinogaki-image-pipelineCore and the appnormalImagePipeline: what renders become on screen and in files.
kinogaki-jpeg-formatJPEGnormalJPEG, a format plugin: a JPEG reads as one standard Image as the file holds it, and an Image writes as one baseline JPEG.
kinogaki-layoutLayoutnormalThe Layout context: a page on the 2D canvas and the pieces arranged on it, images and text, back to front in the order their nodes run.
kinogaki-materialxMaterialXnormalMaterialX documents (.mtlx), a format plugin: a document's materials read as Studio's Materials, MaterialX networks of nodes, and Materials written as one.
kinogaki-mathlib-mathnormalKinogaki's vectors, points, matrices, quaternions and deterministic elementary functions.
kinogaki-meshMeshnormalThe Mesh plugin: polygon modelling, Maya's and Houdini's toolset on core's editing API (plugins/mesh/PLAN.md holds the inventory and its groups).
kinogaki-mesh-kernelMeshnormalThe Mesh kernel: the heavy, robustness-critical polygon algorithms, offered to every package as verbs (kernel).
kinogaki-networkCore and the appnormalStudio's core networks (design: core-owned networks; "Cooking DAG for nodes is studio core").
kinogaki-objOBJnormalWavefront OBJ, a format plugin: an OBJ file reads as one standard Geometry, its material libraries (mtllib) as MaterialX networks (materials) in a materials item before it; any polygons and polylines write as ...
kinogaki-pixelPixelnormalPixel, a realtime pixel-art render engine, as a Kinogaki Studio plugin.
kinogaki-plugin-compCompnormalComp as a Studio plugin library (nodes/comp.dylib).
kinogaki-plugin-exrOpenEXRnormalOpenEXR as a Studio plugin library (formats/exr.dylib).
kinogaki-plugin-fbxFBXnormalFBX as a Studio plugin library (formats/fbx.dylib).
kinogaki-plugin-gltfglTFnormalglTF and GLB as a Studio plugin library (formats/gltf.dylib).
kinogaki-plugin-hostCore and the appnormalStudio's plugin loader.
kinogaki-plugin-jpegJPEGnormalJPEG as a Studio plugin library (formats/jpeg.dylib).
kinogaki-plugin-layoutLayoutnormalThe Layout context as a Studio plugin library (nodes/layout.dylib).
kinogaki-plugin-materialxMaterialXnormalMaterialX documents as a Studio plugin library (formats/materialx.dylib).
kinogaki-plugin-meshMeshnormalThe Mesh plugin as a Studio plugin library (nodes/mesh.dylib).
kinogaki-plugin-mesh-kernelMeshnormalThe Mesh kernel as a Studio plugin library (kernels/mesh.dylib).
kinogaki-plugin-objOBJnormalWavefront OBJ as a Studio plugin library (formats/obj.dylib).
kinogaki-plugin-pixelPixelnormalPixel as a Studio plugin library (renders/pixel.dylib).
kinogaki-plugin-pngPNGnormalPNG as a Studio plugin library (formats/png.dylib).
kinogaki-plugin-spectreSpectrenormalSpectre as a Studio plugin library (renders/spectre.dylib).
kinogaki-plugin-usdUSDnormalUSD as a Studio plugin library (formats/usd.dylib).
kinogaki-png-formatPNGnormalPNG, a format plugin: a PNG reads as one standard Image as the file holds it, and an Image writes as one PNG.
kinogaki-projectCore and the appnormalStudio's project files: a document as a Prism document.
kinogaki-propertieslib-uinormalProperty schemas: what an inspector shows, as data.
kinogaki-render-geometryCore and the appnormalThe render side of Studio's standard geometry values: what render engines receive for them, whatever kernel made them.
kinogaki-sceneCore and the appnormalStudio's scene: the document cooked object by object.
kinogaki-scriptingCore and the appnormalScripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value.
kinogaki-sdk-uiCore and the appnormalThe plugin SDK's UI layer over lib-ui: the SDK's Ui and Painter, its sheets and the host's services, implemented over lib-ui.
kinogaki-sharedCore and the appnormalThe crates Studio and its plugins share, built once as a Rust dylib.
kinogaki-spectreSpectrenormalSpectre, the spectral path tracer, as a Kinogaki Studio render plugin.
kinogaki-studioCore and the apptestsKinogaki Studio: the editor in a window, after the plugins load.
kinogaki-studio-api-testingSDKnormalThe 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-studio-ui-apiSDKnormalKinogaki Studio's UI layer for plugins.
kinogaki-studio-ui-api-testingSDKnormalThe UI layer's test support (a dev-dependency only): headless fakes of the host's UI for plugin unit tests: RecordingUi and RecordingPainter record what a plugin asks to show and draw, and play back scripted user actions, with no window and no GPU ...
kinogaki-testkitCore and the appnormalKinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin.
kinogaki-usdUSDnormalUniversal Scene Description as a format plugin for Kinogaki Studio: usda, usdc and usdz files read into the standard values and written from them.
kinogaki-workflowsWorkflowstestsTests alone: tests/workflows drives what a person does across the plugins the app ships, through the real editor offscreen.

Modules

Public types and traits

At the crate root

Traits CanvasDataCodecDataTypeDisplayableElementReaderElementWriterFileFormatFormatWriterHeldHeldEditLookMaterialDisplaysMesherNetworkEditNetworkReadNodeTypeObjectBodyObjectCodecObjectKindSpecObjectPickingPassesPickableRenderableRenderedKindSlotSlotDocSnappableStoredTabular

Structs AdoptionCancelTokenComponentsCookCxCookCxBuilderCreateCxDescriptionDisplayRequestDrawnFileItemGestureMarkGestureTokenHitIconImportedInfoRowInputIterationKeyKindCreationListingMeshedNetworkContextNewCxNodeRefOutputsPackagePackageUiPassPicturePiecePortPortsPortsCxProbeProjectReadCxReadingReadsRegistryRenderCxRenderedSchemaSchemaCxSessionSlotSessionSlotsSnapHitSnapQuerySnapTargetsStoredValueStoredValuesSurfaceTableTableColumnTallyValuedWireColorWriting

Enums CanvasPieceCategoryCellKindCellsCombineDrawPurposeFieldFieldRefInsideInterpNodeRolePieceRolePurposeRenderItemResolvedRowsForScopeSnapKind

Type aliases FormatOptionsStamp

Re-exported from other crates

From kinogaki_edit as edit (the crate)

From kinogaki_geometry BoundsDiagnosticErrorErrorKindRateSeverityTextSpanTimeUnitsUpAxisVec3Xform

From kinogaki_geometry as geometry (the crate)

From kinogaki_value datadata::Checkeddata::Datadata::Typedidid::ContextIdid::CreationIdid::DataTypeIdid::FormatIdid::MesherIdid::NodeTypeIdid::ObjectKindIdid::PackageIdid::SlotIdid::StoredIdid::VerbId

From kinogaki_value as value (the crate)

By module: 198 public types and traits in 65 modules

anim InterpKey

cancel CancelToken

codec DataCodecObjectCodecReadCx

color ColorService

components Components

cook InsideIterationNodeTypeOutputsPassPassesProjectReadsResolvedWritten

cook::binding ScalarVector

cook::context CookCxCookCxBuilder

cook::description ArityCategoryDescriptionListingNodeRolePortPortsReachUnwired

cook::handle ConstraintHandleHandleKindSpace

cook::placement Placement

cook::sheet NewCxPortsCxRowsForSchemaCx

data_type DataTypeInfoRowStampWireColor

element ElementReaderElementWriterFieldFieldRefReadSharedSharedValue

element::memory MemoryElement

entry Entry

facets::canvas CanvasCanvasPieceLiveLiveResultPicturePieceSourceProbeProbedColorTextAlignTextFace

facets::display DisplayableDisplayRequestDrawnDrawPurposePiecePieceRoleTally

facets::glyph GlyphsGlyphScale

facets::held Held

facets::object LookMarqueeMaterialDisplaysObjectPicking

facets::pick CombinePickable

facets::render RenderableRenderCxRendered

facets::snap SnapHitSnapKindSnappableSnapQuerySnapTargets

facets::table CellKindCellsTableTableColumnTabular

format FileFormatFileItemFormatOptionsFormatWriterImportedPurposeReadingWriting

format::budget ReadBudgetReadLimits

format::conversion Conversion

format::files Beside

format::files::named Named

format::input Input

format::unique Unique

held HeldEdit

icon Icon

image_files FileImageImageFilesNoFiles

kernel Verb

mesher MeshedMesher

network::compile CompileCxCompiledFlatFlatNodeNetworkCompilerNodeTypes

network::context AdoptedEvaluationFlagFlagsNetworkContextNetworkKindNetworkStorageNodeLayout

network::edit GrowthInsertionNetworkEditNetworkSeedNewNodeNodeCreationSeedWire

network::read NetworkReadNodeInfoWire

network::run PlanRunnerRunCxRunnerRunStats

object AdoptionCreateCxKindCreationObjectBodyObjectKindSpecRenderedKindValued

package PackagePackageUi

params::code CodeLanguageCompletionCompletionsPlainTextTokenTokenClass

params::schema ButtonSchemaSchemaItem

refs NodeRef

registry Registry

render RenderItem

render::lights::kind DeclaredKind

render::lights::value LightCodec

render::shader ShaderNode

script CodeFactsOverScriptEngineScriptRun

session GestureMarkGestureTokenSessionSlotSessionSlotsSlotSlotDoc

standard::brep BrepCodec

standard::camera CameraCodec

standard::color ColorConfiguration

standard::embedded EmbeddedFileCodec

standard::geometry GeometryCodec

standard::image ImageCodec

standard::instances InstancesInstancesCodec

standard::materials ImportedImageImportedMaterialMaterialsMaterialsCodec

standard::output BackgroundSpaceDisplayOutput

stored ScopeStoredStoredValueStoredValues

viewport CornerHitHitTargetSurface

Besides these, 32 public functions at module level.