Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ singlehtml:
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

.PHONY: livehtml
livehtml:
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ A range in time. Encodes the start time and the duration, meaning that end_time

OpenTimelineIO includes several adapters for reading and writing from other file formats. The `otio.adapters` module has convenience functions that will auto-detect which adapter to use, or you can specify the one you want.

Adapters can be added to the system (outside of the distribution) via JSON files that can be placed on the `OTIO_PLUGIN_MANIFEST_PATH` environment variable to be made available to OTIO.
Adapters can be added to the system (outside of the distribution) via JSON files that can be placed on the {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable to be made available to OTIO.

Most common usage only cares about:
- `timeline = otio.adapters.read_from_file(filepath)`
Expand All @@ -127,7 +127,7 @@ For more information, see [How To Write An OpenTimelineIO Adapter](write-an-adap

Media linkers run on the otio file after an adapter calls `.read_from_file()` or `.read_from_string()`. They are intended to replace media references that exist after the adapter runs (which depending on the adapter are likely to be `MissingReference`) with ones that point to valid files in the local system. Since media linkers are plugins, they can use proprietary knowledge or context and do not need to be part of OTIO itself.

You may also specify a media linker to be run after the adapter, either via the `media_linker_name` argument to `.read_from_file()` or `.read_from_string()` or via the `OTIO_DEFAULT_MEDIA_LINKER` environment variable. You can also turn the media linker off completely by setting the `media_linker_name` argument to `otio.media_linker.MediaLinkingPolicy.DoNotLinkMedia`.
You may also specify a media linker to be run after the adapter, either via the `media_linker_name` argument to `.read_from_file()` or `.read_from_string()` or via the {term}`OTIO_DEFAULT_MEDIA_LINKER` environment variable. You can also turn the media linker off completely by setting the `media_linker_name` argument to `otio.media_linker.MediaLinkingPolicy.DoNotLinkMedia`.

For more information about writing media linkers, see [How To Write An OpenTimelineIO Media Linker](write-a-media-linker).

Expand Down
37 changes: 30 additions & 7 deletions docs/tutorials/otio-env-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,39 @@ various aspects of OTIO.

## Plugin Configuration

These variables must be set _before_ the OpenTimelineIO python library is imported. They only impact the python library. The C++ library has no environment variables.
These variables must be set _before_ the OpenTimelineIO python library is imported. They only impact the python library. The C++ library has no environment variables.

- `OTIO_PLUGIN_MANIFEST_PATH`: a ":" separated string with paths to .manifest.json files that contain OTIO plugin manifests. See: [Tutorial on how to write an adapter plugin](write-an-adapter).
- `OTIO_DEFAULT_MEDIA_LINKER`: the name of the default media linker to use after reading a file, if "" then no media linker is automatically invoked.
- `OTIO_DISABLE_PKG_RESOURCE_PLUGINS`: By default, OTIO will use the pkg_resource entry_points mechanism to discover plugins that have been installed into the current python environment. pkg_resources, however, can be slow in certain cases, so for users who wish to disable this behavior, this variable can be set to 1.
- `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL`: if no downgrade arguments are passed to `write_to_file`/`write_to_string`, use the downgrade manifest specified by the family/label combination in the variable. Variable is of the form FAMILY:LABEL. Only one tuple of FAMILY:LABEL may be specified.
```{glossary}

OTIO_PLUGIN_MANIFEST_PATH
A colon (`:`) on POSIX system (or a semicolon (`;`) on Windows) separated string with paths
to `.manifest.json` files that contain OTIO plugin manifests.
See the [tutorial on how to write an adapter plugin](write-an-adapter.md) for additional details.

OTIO_DEFAULT_MEDIA_LINKER
The name of the default media linker to use after reading a file, if `""` then no
media linker is automatically invoked.

OTIO_DISABLE_PKG_RESOURCE_PLUGINS
By default, OTIO will use the `pkg_resource` entry_points mechanism to discover plugins
that have been installed into the current python environment. `pkg_resources`, however, can
be slow in certain cases, so for users who wish to disable this behavior, this variable can be set to 1.

OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL
If no downgrade arguments are passed to `write_to_file`/`write_to_string`, use the downgrade manifest
specified by the family/label combination in the variable. Variable is of the form `FAMILY:LABEL`.
Only one tuple of `FAMILY:LABEL` may be specified.
```

## Unit tests

These variables only impact unit tests.

- `OTIO_DISABLE_SHELLOUT_TESTS`: When running the unit tests, skip the console tests that run the otiocat program and check output through the shell. This is desirable in environments where running the commandline tests is not meaningful or problematic. Does not disable the tests that run through python calling mechanisms.
- `OTIO_DISABLE_SERIALIZED_SCHEMA_TEST`: Skip the unit tests that generate documentation and compare the current state of the schema against the stored one. Useful if the documentation is not available from the test directory.
```{glossary}

OTIO_DISABLE_SHELLOUT_TESTS
When running the unit tests, skip the console tests that run the otiocat program and check output through the shell. This is desirable in environments where running the commandline tests is not meaningful or problematic. Does not disable the tests that run through python calling mechanisms.

OTIO_DISABLE_SERIALIZED_SCHEMA_TEST
Skip the unit tests that generate documentation and compare the current state of the schema against the stored one. Useful if the documentation is not available from the test directory.
```
8 changes: 4 additions & 4 deletions docs/tutorials/versioning-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ sc->to_json_file("/var/tmp/simpleclass.otio", &err, &downgrade_manifest);

In python, an additional level of indirection is provided, "FAMILY", which is intended to allow developers to define their own sets of target versions for their plugin schemas. For example, a studio might have a family named "MYFAMILY" under which they organize labels for their internal releases of their own plugins.

These can be defined in a plugin manifest, which is a `.plugin_manifest.json` file found on the environment variable `${OTIO_PLUGIN_MANIFEST_PATH}`.
These can be defined in a plugin manifest, which is a `.plugin_manifest.json` file found on the environment variable {term}`OTIO_PLUGIN_MANIFEST_PATH`.

For example:

Expand Down Expand Up @@ -204,19 +204,19 @@ See the [versioning module](../api/python/opentimelineio.versioning.rst) for mor
If you are using multiple pieces of software built with mismatched versions of OTIO, you may need to configure the newer one(s) to write out OTIO in an older format without recompiling or modifying the software.

You can accomplish this in two ways:
- The `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable can specify a family and version.
- The {term}`OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable can specify a family and version.
- The `otioconvert` utility program can downgrade an OTIO file to an older version.

### OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL Environment Variable

If your software uses OTIO's Python adapter system, then you can set the `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable with a `FAMILY:VERSION` value.
If your software uses OTIO's Python adapter system, then you can set the {term}`OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable with a `FAMILY:VERSION` value.
For example, in a *nix shell: `env OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL=OTIO_CORE:0.14.0 my_program`

The `OTIO_CORE` family is pre-populated with the core OTIO schema versions for previous OTIO releases, for example `0.14.0`. If you have custom schema that needs to be downgraded as well, you will need to specify your own family and version mapping, as described above.

### Downgrading with otioconvert

If your software uses OTIO's C++ API, then it does not look for the `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable, but you can convert an OTIO file after it has been created with the `otioconvert` utility.
If your software uses OTIO's C++ API, then it does not look for the {term}`OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable, but you can convert an OTIO file after it has been created with the `otioconvert` utility.

You can either use a family like this:
```
Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/write-a-hookscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ To create a new OTIO hook script, you need to create a file myhooks.py. Then add

The ``hook_scripts`` section will register the plugin with the system, and the ``hooks`` section will attach the scripts to hooks.

Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows). You may also define media linkers and adapters via the same manifest.
Then you need to add this manifest to your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable.
You may also define media linkers and adapters via the same manifest.

## Running a Hook Script

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/write-a-media-linker.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ To create a new OTIO Adapter, you need to create a file mymedialinker.py. Then a
}
```

Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows).
Then you need to add this manifest to your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable.

Finally, to specify this linker as the default media linker, set `OTIO_DEFAULT_MEDIA_LINKER` to the name of the media linker:
Finally, to specify this linker as the default media linker, set {term}`OTIO_DEFAULT_MEDIA_LINKER` to the name of the media linker:

```bash
export OTIO_DEFAULT_MEDIA_LINKER="awesome_studios_media_linker"
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/write-a-schemadef.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Then you must add it to a plugin manifest:

The same plugin manifest may also include adapters and media linkers, if desired.

Then you need to add this manifest to your `$OTIO_PLUGIN_MANIFEST_PATH` environment
variable (which is separated with `:` for POSIX or `;` for Windows).
Then you need to add this manifest to your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment
variable.

## Using the New Schema in Your Code

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/write-an-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ And a `plugin_manifest.json` like:

### Custom Adapters

Alternately, if you are creating a site specific adapter that you do _not_ intend to share with the community, you can create your `myadapter.py` file anywhere. In this case, you must create a `mysite.plugin_manifest.json` (with an entry like the below example that points at `myadapter.py`) and then put the path to your `mysite.plugin_manifest.json` on your `$OTIO_PLUGIN_MANIFEST_PATH` environment variable (which is separated with `:` for POSIX or `;` for Windows).
Alternately, if you are creating a site specific adapter that you do _not_ intend to share with the community, you can create your `myadapter.py` file anywhere. In this case, you must create a `mysite.plugin_manifest.json` (with an entry like the below example that points at `myadapter.py`) and then put the path to your `mysite.plugin_manifest.json` on your {term}`OTIO_PLUGIN_MANIFEST_PATH` environment variable.

For example, to register `myadapter.py` that supports files with a `.myext` file extension:
```json
Expand Down
2 changes: 1 addition & 1 deletion src/py-opentimelineio/opentimelineio/plugins/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def load_manifest():

The order of loading (and precedence) is:

1. Manifests specified via the ``OTIO_PLUGIN_MANIFEST_PATH`` variable
1. Manifests specified via the :term:`OTIO_PLUGIN_MANIFEST_PATH` variable
2. Entrypoint based plugin manifests
3. Builtin plugin manifest
4. Contrib plugin manifest
Expand Down