# Metadata

> The free-form dictionary every named object carries.

Symbols in this group are spelled `otio_metadata_…`. An SDK drops that prefix.

## `clear`

`otio_metadata_clear` · method

Empties an object's metadata.

```c
OtioStatus otio_metadata_clear(
    OtioDocument *target,
    OtioNode node_handle,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `out_error` | `text` | error |

## `contains`

`otio_metadata_contains` · method

Returns whether anything sits at a path.

```c
OtioStatus otio_metadata_contains(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    bool *out_contains,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_contains` | `bool` | output |
| `out_error` | `text` | error |

## `get_bool`

`otio_metadata_get_bool` · method

Reads a boolean from the metadata.

```c
OtioStatus otio_metadata_get_bool(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    bool *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `bool` | output |
| `out_error` | `text` | error |

## `get_box2d`

`otio_metadata_get_box2d` · method

Reads a rectangle from the metadata.

```c
OtioStatus otio_metadata_get_box2d(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioBox2d *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `OtioBox2d` | output |
| `out_error` | `text` | error |

## `get_color`

`otio_metadata_get_color` · method

Reads a colour, and the name that goes with it, from the metadata.

`out_name` may be null if the name is not wanted.

```c
OtioStatus otio_metadata_get_color(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioColor *out_value,
    OtioBuffer *out_name,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `OtioColor` | output |
| `out_name` (optional) | `text` | output |
| `out_error` | `text` | error |

## `get_double`

`otio_metadata_get_double` · method

Reads a number from the metadata.

```c
OtioStatus otio_metadata_get_double(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    double *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `double` | output |
| `out_error` | `text` | error |

## `get_int`

`otio_metadata_get_int` · method

Reads a signed integer from the metadata.

```c
OtioStatus otio_metadata_get_int(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    int64_t *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `int64` | output |
| `out_error` | `text` | error |

## `get_object`

`otio_metadata_get_object` · method

Reads a handle to an OTIO object held in the metadata.

```c
OtioStatus otio_metadata_get_object(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioNode *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `node` | output |
| `out_error` | `text` | error |

## `get_rational_time`

`otio_metadata_get_rational_time` · method

Reads a time from the metadata.

```c
OtioStatus otio_metadata_get_rational_time(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioRationalTime *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `OtioRationalTime` | output |
| `out_error` | `text` | error |

## `get_string`

`otio_metadata_get_string` · method

Reads a string from the metadata.

```c
OtioStatus otio_metadata_get_string(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioBuffer *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `text` | output |
| `out_error` | `text` | error |

## `get_time_range`

`otio_metadata_get_time_range` · method

Reads a span from the metadata.

```c
OtioStatus otio_metadata_get_time_range(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioTimeRange *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `OtioTimeRange` | output |
| `out_error` | `text` | error |

## `get_time_transform`

`otio_metadata_get_time_transform` · method

Reads a transform from the metadata.

```c
OtioStatus otio_metadata_get_time_transform(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioTimeTransform *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `OtioTimeTransform` | output |
| `out_error` | `text` | error |

## `get_uint`

`otio_metadata_get_uint` · method

Reads an unsigned integer from the metadata.

```c
OtioStatus otio_metadata_get_uint(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    uint64_t *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `uint64` | output |
| `out_error` | `text` | error |

## `get_v2d`

`otio_metadata_get_v2d` · method

Reads a point from the metadata.

```c
OtioStatus otio_metadata_get_v2d(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioV2d *out_value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_value` | `OtioV2d` | output |
| `out_error` | `text` | error |

## `key_at`

`otio_metadata_key_at` · method · may answer nothing

Returns the key at an index of a dictionary at a path.

Keys are ordered, so walking the indices walks them the same way twice.

```c
OtioStatus otio_metadata_key_at(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    size_t index,
    OtioBuffer *out_key,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `index` | `size` | input |
| `out_key` | `text` | output |
| `out_error` | `text` | error |

## `kind`

`otio_metadata_kind` · method · may answer nothing

Returns what kind of value sits at a path.

An empty or null path names the metadata dictionary itself, which is always `OTIO_VALUE_DICTIONARY`.

```c
OtioStatus otio_metadata_kind(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    OtioValueKind *out_kind,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_kind` | `OtioValueKind` | output |
| `out_error` | `text` | error |

## `len`

`otio_metadata_len` · method · may answer nothing

Returns how many entries a dictionary or an array at a path holds.

```c
OtioStatus otio_metadata_len(
    const OtioDocument *source,
    OtioNode node_handle,
    const char *path,
    size_t *out_len,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `source` (optional) | `document` | document in |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_len` | `size` | output |
| `out_error` | `text` | error |

## `remove`

`otio_metadata_remove` · method · may answer nothing

Removes whatever sits at a path.

Removing a key of a dictionary takes the key with it; removing an element of an array shortens the array.

```c
OtioStatus otio_metadata_remove(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_error` | `text` | error |

## `set_bool`

`otio_metadata_set_bool` · setter

Writes a boolean into the metadata.

```c
OtioStatus otio_metadata_set_bool(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    bool value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `bool` | input |
| `out_error` | `text` | error |

## `set_box2d`

`otio_metadata_set_box2d` · setter

Writes a rectangle into the metadata.

```c
OtioStatus otio_metadata_set_box2d(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioBox2d value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `OtioBox2d` | input |
| `out_error` | `text` | error |

## `set_color`

`otio_metadata_set_color` · setter

Writes a colour into the metadata. `name` may be null for an unnamed one.

```c
OtioStatus otio_metadata_set_color(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioColor value,
    const char *name,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `OtioColor` | input |
| `name` (optional) | `text` | input |
| `out_error` | `text` | error |

## `set_dictionary`

`otio_metadata_set_dictionary` · setter

Writes an empty dictionary into the metadata, to be filled through deeper paths.

```c
OtioStatus otio_metadata_set_dictionary(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_error` | `text` | error |

## `set_double`

`otio_metadata_set_double` · setter

Writes a number into the metadata.

```c
OtioStatus otio_metadata_set_double(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    double value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `double` | input |
| `out_error` | `text` | error |

## `set_int`

`otio_metadata_set_int` · setter

Writes a signed integer into the metadata.

```c
OtioStatus otio_metadata_set_int(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    int64_t value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `int64` | input |
| `out_error` | `text` | error |

## `set_null`

`otio_metadata_set_null` · setter

Writes a null into the metadata.

```c
OtioStatus otio_metadata_set_null(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `out_error` | `text` | error |

## `set_object`

`otio_metadata_set_object` · setter

Writes a handle to an OTIO object into the metadata.

The object stays where it is and the metadata names it. The handle must come from `target`, as every handle passed with a document must. Nothing checks that it is live, because a document being built may not hold the object yet.

```c
OtioStatus otio_metadata_set_object(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioNode value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `node` | input |
| `out_error` | `text` | error |

## `set_rational_time`

`otio_metadata_set_rational_time` · setter

Writes a time into the metadata.

```c
OtioStatus otio_metadata_set_rational_time(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioRationalTime value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `OtioRationalTime` | input |
| `out_error` | `text` | error |

## `set_string`

`otio_metadata_set_string` · setter

Writes a string into the metadata.

```c
OtioStatus otio_metadata_set_string(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    const char *value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `text` | input |
| `out_error` | `text` | error |

## `set_time_range`

`otio_metadata_set_time_range` · setter

Writes a span into the metadata.

```c
OtioStatus otio_metadata_set_time_range(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioTimeRange value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `OtioTimeRange` | input |
| `out_error` | `text` | error |

## `set_time_transform`

`otio_metadata_set_time_transform` · setter

Writes a transform into the metadata.

```c
OtioStatus otio_metadata_set_time_transform(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioTimeTransform value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `OtioTimeTransform` | input |
| `out_error` | `text` | error |

## `set_uint`

`otio_metadata_set_uint` · setter

Writes an unsigned integer into the metadata.

```c
OtioStatus otio_metadata_set_uint(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    uint64_t value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `uint64` | input |
| `out_error` | `text` | error |

## `set_v2d`

`otio_metadata_set_v2d` · setter

Writes a point into the metadata.

```c
OtioStatus otio_metadata_set_v2d(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    OtioV2d value,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `value` | `OtioV2d` | input |
| `out_error` | `text` | error |

## `set_vector`

`otio_metadata_set_vector` · setter

Writes an array of `len` nulls into the metadata, to be filled by index.

```c
OtioStatus otio_metadata_set_vector(
    OtioDocument *target,
    OtioNode node_handle,
    const char *path,
    size_t len,
    OtioBuffer *out_error);
```

| Parameter | Type | Role |
| --- | --- | --- |
| `target` | `document` | document mut |
| `node_handle` | `node` | receiver |
| `path` | `text` | input |
| `len` | `size` | input |
| `out_error` | `text` | error |

---

Page: https://otio-rust-docs.vercel.app/reference/metadata/
