O
Sections
Every group

Ori

The ORI project's review annotations, an otio-rust extension and not part of OpenTimelineIO: strokes, text and shapes drawn on a frame, read and written on a timeline.

Symbols in this group are spelled otio_ext_ori_…. An SDK drops that prefix, which is why the name beside each call is the short one.

add_commands

free

Adds the commands in `commands_json`, a JSON list of ORI objects, at the end of the annotation clip `clip`'s commands.

ParameterTypeRole
targetdocumentthe document, changed
clipnodeinput
commands_jsontextinput
out_errortextwhy the call failed, or null to skip it

aspect_half

free

Writes half the width of an image `width` by `height` pixels in ORI's units, `width / (2 * height)`, to `out_half`: ORI's 16:9 default, 8/9, when the height is not positive.

ParameterTypeRole
widthdoubleinput
heightdoubleinput
out_halfdoublewritten through, not read
out_errortextwhy the call failed, or null to skip it

bounds_to_ori

free

Converts the point `x`, `y`, in OpenTimelineIO image space, to ORI's coordinates within a picture's `available_image_bounds`, the box from `min_x`, `min_y` to `max_x`, `max_y`, and writes them to `out_x` and `out_y`. The inverse of `otio_ext_ori_ori_to_bounds`.

ParameterTypeRole
xdoubleinput
ydoubleinput
min_xdoubleinput
min_ydoubleinput
max_xdoubleinput
max_ydoubleinput
out_xdoublewritten through, not read
out_ydoublewritten through, not read
out_errortextwhy the call failed, or null to skip it

commands

free

Writes the commands `holder` holds to `out_json`, as a JSON list of ORI objects, indented as OTIO files are with `pretty` and compact without.

ParameterTypeRole
source ?documentthe document, borrowed
holdernodeinput
prettyboolinput
out_jsontextwritten through, not read
out_errortextwhy the call failed, or null to skip it

commit

free

Commits a review comment to the sync session `session`'s ledger, and writes its id to `out_id`: `client_mutation_id`, or a new one if that is empty.

`anchor_json` is Furnace's anchor: `sequenceId`, `capturedGeneration`, `clipGuid`, `sourceTime` and `capturedSequenceTime` (each `{"value", "rate"}`), `capturedAt` in Unix milliseconds, and optionally `sessionId` (filled in when empty) and `mediaFingerprint`. `body_markdown` is the comment, and `commands_json` its strokes, text and shapes. `source` and `timeline` are this client's copy: the commit is refused, with `OTIO_STATUS_INVALID_ARGUMENT`, if it would replace commands that belong to someone else.

ParameterTypeRole
sessionuint64input
source ?documentthe document, borrowed
timelinenodeinput
anchor_jsontextinput
body_markdowntextinput
commands_jsontextinput
client_mutation_idtextinput
out_idtextwritten through, not read
out_errortextwhy the call failed, or null to skip it

describe

free

Writes what `holder`, an annotation clip or an `AnnotationEffect.1`, says about its annotation to `out_json`, as a JSON object: `form` (`track` or `effect`), `clip_guid` (the annotated clip's sync GUID, or `null`), `clip_name` (the clip's name where only that is known, as in ORI's review export, or `null`), `frame` (`{"value", "rate"}`, or `null` for an effect), `note` and `status` (text or `null`), and `command_count`.

Reports `OTIO_STATUS_INVALID_ARGUMENT` for an object that holds no annotation.

ParameterTypeRole
source ?documentthe document, borrowed
holdernodeinput
out_jsontextwritten through, not read
out_errortextwhy the call failed, or null to skip it

enable

free

Turns ORI Annotations on, and timeline sync which it is built on. The same as `otio_ext_enable("ori-annotations")`.

Enabling it again does nothing and succeeds.

ParameterTypeRole
out_errortextwhy the call failed, or null to skip it

ensure_clip

free

Writes the annotation clip on `track` for `clip_guid` at the time `value` at `rate` to `out_clip`, first adding it if there is none: one frame long at that time, at the end of the track, after a gap if the time is later than the track's end, as ORI adds one.

ParameterTypeRole
targetdocumentthe document, changed
tracknodeinput
clip_guidtextinput
valuedoubleinput
ratedoubleinput
out_clipnodewritten through, not read
out_errortextwhy the call failed, or null to skip it

ensure_track

free

Writes the annotation track of `timeline` to `out_track`, first adding a video track named `Annotations`, with a new sync GUID, on top of its stack if it has none.

ParameterTypeRole
targetdocumentthe document, changed
timelinenodeinput
out_tracknodewritten through, not read
out_errortextwhy the call failed, or null to skip it

find_clip

freemay answer nothing

Finds the annotation clip on `track` for the media clip whose sync GUID is `clip_guid`, at source frame `frame`, and writes it to `out_clip`.

Reports `OTIO_STATUS_NO_VALUE` when there is none.

ParameterTypeRole
source ?documentthe document, borrowed
tracknodeinput
clip_guidtextinput
frameint64input
out_clipnodewritten through, not read
out_errortextwhy the call failed, or null to skip it

find_track

freemay answer nothing

Finds the annotation track of `timeline`, the first track whose name contains "annotation" in any case, and writes it to `out_track`.

Reports `OTIO_STATUS_NO_VALUE` when it has none.

ParameterTypeRole
source ?documentthe document, borrowed
timelinenodeinput
out_tracknodewritten through, not read
out_errortextwhy the call failed, or null to skip it

fold

free

Folds the review comment a `review_relay` event, `event_json`, carries into `timeline`, on the host: adds the annotation track and clip if need be, merges the comment's commands in by uuid, and records the comment on the clip. Writes the clip to `out_clip`, and to `out_already` whether the comment was there already, so nothing changed. The host then publishes the timeline.

Reports `OTIO_STATUS_INVALID_ARGUMENT` for another kind of event, or a comment that would replace commands that are not its author's, in which case nothing changes.

ParameterTypeRole
targetdocumentthe document, changed
timelinenodeinput
event_jsontextinput
out_clipnodewritten through, not read
out_already ?boolwritten through, not read
out_errortextwhy the call failed, or null to skip it

is_enabled

free

Writes whether ORI Annotations is on to `out_enabled`.

ParameterTypeRole
out_enabledboolwritten through, not read
out_errortextwhy the call failed, or null to skip it

list

free

Returns the object holding each annotation on `timeline`: an annotation clip, or an `AnnotationEffect.1` on a clip, in the order the timeline is walked.

ParameterTypeRole
source ?documentthe document, borrowed
timelinenodeinput
out_nodeslist<node>a list written through, sized by the count
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

list_at_frame

free

Returns the object holding each annotation of the media clip whose sync GUID is `clip_guid` at source frame `frame`. An `AnnotationEffect.1` covers every frame of its clip.

ParameterTypeRole
source ?documentthe document, borrowed
timelinenodeinput
clip_guidtextinput
frameint64input
out_nodeslist<node>a list written through, sized by the count
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

list_for_clip

free

Returns the object holding each annotation of the media clip whose sync GUID is `clip_guid`.

ParameterTypeRole
source ?documentthe document, borrowed
timelinenodeinput
clip_guidtextinput
out_nodeslist<node>a list written through, sized by the count
capacitysizehow many the buffer can hold
out_countsizehow many the call had to give
out_errortextwhy the call failed, or null to skip it

merge_commands

free

Merges the commands in `commands_json` into the annotation clip `clip` by `uuid`: a stroke, text or shape the clip already holds is replaced where it was, and the rest are added at the end. Writes how many uuids it replaced to `out_replaced` and how many it added to `out_added`.

ParameterTypeRole
targetdocumentthe document, changed
clipnodeinput
commands_jsontextinput
out_replacedsizewritten through, not read
out_added ?sizewritten through, not read
out_errortextwhy the call failed, or null to skip it

merge_duplicates

free

Makes the annotation track of `timeline` hold one annotation clip for each media clip and source frame, merging later clips for the same frame into the first by uuid, and writes how many clips it removed to `out_count`.

ParameterTypeRole
targetdocumentthe document, changed
timelinenodeinput
out_countsizewritten through, not read
out_errortextwhy the call failed, or null to skip it

new_uuid

free

Writes a new uuid for a command, a version 4 UUID, to `out_uuid`.

ParameterTypeRole
out_uuidtextwritten through, not read
out_errortextwhy the call failed, or null to skip it

ori_to_bounds

free

Converts the point `x`, `y`, in ORI's coordinates, to OpenTimelineIO image space within a picture's `available_image_bounds`, the box from `min_x`, `min_y` to `max_x`, `max_y`, whose centre is ORI's origin and whose height is ORI's unit, and writes it to `out_x` and `out_y`.

ParameterTypeRole
xdoubleinput
ydoubleinput
min_xdoubleinput
min_ydoubleinput
max_xdoubleinput
max_ydoubleinput
out_xdoublewritten through, not read
out_ydoublewritten through, not read
out_errortextwhy the call failed, or null to skip it

ori_to_pixels

free

Converts the point `x`, `y`, in ORI's coordinates, to a pixel position counted from the top left of an image `width` by `height` pixels, unrounded, and writes it to `out_px` and `out_py`.

ParameterTypeRole
widthdoubleinput
heightdoubleinput
xdoubleinput
ydoubleinput
out_pxdoublewritten through, not read
out_pydoublewritten through, not read
out_errortextwhy the call failed, or null to skip it

owner_of

freemay answer nothing

Writes who the commands with `uuid` on the annotation clip `clip` belong to, by person id, to `out_owner`: the author of the review comment that added them.

Reports `OTIO_STATUS_NO_VALUE` when no comment did, as for strokes drawn over ORI's wire or read from a file.

ParameterTypeRole
source ?documentthe document, borrowed
clipnodeinput
uuidtextinput
out_ownertextwritten through, not read
out_errortextwhy the call failed, or null to skip it

pixels_to_ori

free

Converts the pixel position `px`, `py`, counted from the top left of an image `width` by `height` pixels, to ORI's height-normalised, centre-origin, Y-up coordinates, and writes them to `out_x` and `out_y`.

ParameterTypeRole
widthdoubleinput
heightdoubleinput
pxdoubleinput
pydoubleinput
out_xdoublewritten through, not read
out_ydoublewritten through, not read
out_errortextwhy the call failed, or null to skip it

read_partial

freemay answer nothing

Writes the stroke in progress the sync event `event_json` carries to `out_partial_json`, as ORI's `PARTIAL` payload with every field a command left out filled in with ORI's default.

Reports `OTIO_STATUS_NO_VALUE` when the event is not a stroke in progress.

ParameterTypeRole
event_jsontextinput
out_partial_jsontextwritten through, not read
out_errortextwhy the call failed, or null to skip it

remove_commands

free

Removes every command of `clip` whose `uuid` is in `uuids_json`, a JSON list of strings, and writes how many it removed to `out_count`.

ParameterTypeRole
targetdocumentthe document, changed
clipnodeinput
uuids_jsontextinput
out_countsizewritten through, not read
out_errortextwhy the call failed, or null to skip it

replace_by_kind

free

Replaces the commands of `clip` kind by kind with those in `commands_json`: an empty list, `[]`, clears it, but a list holding no command of one kind (strokes, text, each kind of shape) leaves the clip's commands of that kind alone. Writes how many commands it removed to `out_removed`.

ParameterTypeRole
targetdocumentthe document, changed
clipnodeinput
commands_jsontextinput
out_removedsizewritten through, not read
out_errortextwhy the call failed, or null to skip it

replace_commands

free

Replaces every command of `clip` whose `uuid` is `uuid`, such as one whole stroke, with the commands in `commands_json`, put where the first was, and writes whether any had that uuid to `out_replaced`. If none did, nothing changes.

ParameterTypeRole
targetdocumentthe document, changed
clipnodeinput
uuidtextinput
commands_jsontextinput
out_replacedboolwritten through, not read
out_errortextwhy the call failed, or null to skip it

send_partial

free

Sends a stroke in progress to everyone in the sync session `session`: `partial_json` is ORI's `PARTIAL` payload, an object with `clip_guid`, `frame`, `fps` and `events`, the commands drawn so far. Peers show it and never store it. A newer one not yet sent replaces it.

Furnace cannot relay it yet, and refuses it with `OTIO_STATUS_UNSUPPORTED` when it is about to be sent.

ParameterTypeRole
sessionuint64input
partial_jsontextinput
out_errortextwhy the call failed, or null to skip it

set_commands

free

Replaces all of `clip`'s commands with those in `commands_json`, as ORI's `REPLACE_ANNOTATION_COMMANDS` does. An empty list, `[]`, clears it.

ParameterTypeRole
targetdocumentthe document, changed
clipnodeinput
commands_jsontextinput
out_errortextwhy the call failed, or null to skip it

timestamp_now

free

Writes the current time in ISO 8601, for a command's `timestamp`, to `out_timestamp`.

ParameterTypeRole
out_timestamptextwritten through, not read
out_errortextwhy the call failed, or null to skip it