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.
Adds the commands in `commands_json`, a JSON list of ORI objects, at the end of the annotation clip `clip`'s commands.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| clip | node | input |
| commands_json | text | input |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| width | double | input |
| height | double | input |
| out_half | double | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| x | double | input |
| y | double | input |
| min_x | double | input |
| min_y | double | input |
| max_x | double | input |
| max_y | double | input |
| out_x | double | written through, not read |
| out_y | double | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| holder | node | input |
| pretty | bool | input |
| out_json | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| session | uint64 | input |
| source ? | document | the document, borrowed |
| timeline | node | input |
| anchor_json | text | input |
| body_markdown | text | input |
| commands_json | text | input |
| client_mutation_id | text | input |
| out_id | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| holder | node | input |
| out_json | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| track | node | input |
| clip_guid | text | input |
| value | double | input |
| rate | double | input |
| out_clip | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| timeline | node | input |
| out_track | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| track | node | input |
| clip_guid | text | input |
| frame | int64 | input |
| out_clip | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| timeline | node | input |
| out_track | node | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| timeline | node | input |
| event_json | text | input |
| out_clip | node | written through, not read |
| out_already ? | bool | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Writes whether ORI Annotations is on to `out_enabled`.
| Parameter | Type | Role |
|---|---|---|
| out_enabled | bool | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| timeline | node | input |
| out_nodes | list<node> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| timeline | node | input |
| clip_guid | text | input |
| frame | int64 | input |
| out_nodes | list<node> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
Returns the object holding each annotation of the media clip whose sync GUID is `clip_guid`.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| timeline | node | input |
| clip_guid | text | input |
| out_nodes | list<node> | a list written through, sized by the count |
| capacity | size | how many the buffer can hold |
| out_count | size | how many the call had to give |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| clip | node | input |
| commands_json | text | input |
| out_replaced | size | written through, not read |
| out_added ? | size | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| timeline | node | input |
| out_count | size | written through, not read |
| out_error | text | why the call failed, or null to skip it |
Writes a new uuid for a command, a version 4 UUID, to `out_uuid`.
| Parameter | Type | Role |
|---|---|---|
| out_uuid | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| x | double | input |
| y | double | input |
| min_x | double | input |
| min_y | double | input |
| max_x | double | input |
| max_y | double | input |
| out_x | double | written through, not read |
| out_y | double | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| width | double | input |
| height | double | input |
| x | double | input |
| y | double | input |
| out_px | double | written through, not read |
| out_py | double | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| source ? | document | the document, borrowed |
| clip | node | input |
| uuid | text | input |
| out_owner | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| width | double | input |
| height | double | input |
| px | double | input |
| py | double | input |
| out_x | double | written through, not read |
| out_y | double | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| event_json | text | input |
| out_partial_json | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| clip | node | input |
| uuids_json | text | input |
| out_count | size | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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`.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| clip | node | input |
| commands_json | text | input |
| out_removed | size | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| clip | node | input |
| uuid | text | input |
| commands_json | text | input |
| out_replaced | bool | written through, not read |
| out_error | text | why the call failed, or null to skip it |
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.
| Parameter | Type | Role |
|---|---|---|
| session | uint64 | input |
| partial_json | text | input |
| out_error | text | why the call failed, or null to skip it |
Replaces all of `clip`'s commands with those in `commands_json`, as ORI's `REPLACE_ANNOTATION_COMMANDS` does. An empty list, `[]`, clears it.
| Parameter | Type | Role |
|---|---|---|
| target | document | the document, changed |
| clip | node | input |
| commands_json | text | input |
| out_error | text | why the call failed, or null to skip it |
Writes the current time in ISO 8601, for a command's `timestamp`, to `out_timestamp`.
| Parameter | Type | Role |
|---|---|---|
| out_timestamp | text | written through, not read |
| out_error | text | why the call failed, or null to skip it |