Skip to content

Commit

Permalink
Added OTIO_CORE 0.14.0 version_manifest. (#1415)
Browse files Browse the repository at this point in the history
* Added OTIO_CORE 0.14.0 version_manifest.
* Adding instructions for runtime downgrading to versioning-schemas.md
* Removed Test schema from 0.14.0 version manifest.

Signed-off-by: Joshua Minor <[email protected]>
  • Loading branch information
jminor authored Sep 23, 2022
1 parent b9c2aa2 commit 419ab8e
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/tutorials/versioning-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,35 @@ otio.adapters.write_to_file(

See the [versioning module](../api/python/opentimelineio.versioning.rst) for more information on accessing these.

## Downgrading at Runtime

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 `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.
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.

You can either use a family like this:
```
env OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL=OTIO_CORE:0.14.0 otioconvert -i input.otio -o output.otio
```

or you can specify the version mapping for each schema you care about like this:
```
otioconvert -i input.otio -o output.otio -A target_schema_versions="{'Clip':1, 'Timeline':1, 'Marker':2}"
```

## For Developers

During the development of OpenTimelineIO schemas, whether they are in the core or in plugins, it is expected that schemas will change and evolve over time. Here are some processes for doing that.
Expand Down
32 changes: 32 additions & 0 deletions src/opentimelineio/CORE_VERSION_MAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,38 @@
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {

const label_to_schema_version_map CORE_VERSION_MAP {
{ "0.14.0",
{
{ "Adapter", 1 },
{ "Clip", 1 },
{ "Composable", 1 },
{ "Composition", 1 },
{ "Effect", 1 },
{ "ExternalReference", 1 },
{ "FreezeFrame", 1 },
{ "Gap", 1 },
{ "GeneratorReference", 1 },
{ "HookScript", 1 },
{ "ImageSequenceReference", 1 },
{ "Item", 1 },
{ "LinearTimeWarp", 1 },
{ "Marker", 2 },
{ "MediaLinker", 1 },
{ "MediaReference", 1 },
{ "MissingReference", 1 },
{ "PluginManifest", 1 },
{ "SchemaDef", 1 },
{ "SerializableCollection", 1 },
{ "SerializableObject", 1 },
{ "SerializableObjectWithMetadata", 1 },
{ "Stack", 1 },
{ "TimeEffect", 1 },
{ "Timeline", 1 },
{ "Track", 1 },
{ "Transition", 1 },
{ "UnknownSchema", 1 },
}
},
{ "0.15.0.dev1",
{
{ "Adapter", 1 },
Expand Down
32 changes: 32 additions & 0 deletions src/opentimelineio/CORE_VERSION_MAP.last.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,38 @@
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {

const label_to_schema_version_map CORE_VERSION_MAP {
{ "0.14.0",
{
{ "Adapter", 1 },
{ "Clip", 1 },
{ "Composable", 1 },
{ "Composition", 1 },
{ "Effect", 1 },
{ "ExternalReference", 1 },
{ "FreezeFrame", 1 },
{ "Gap", 1 },
{ "GeneratorReference", 1 },
{ "HookScript", 1 },
{ "ImageSequenceReference", 1 },
{ "Item", 1 },
{ "LinearTimeWarp", 1 },
{ "Marker", 2 },
{ "MediaLinker", 1 },
{ "MediaReference", 1 },
{ "MissingReference", 1 },
{ "PluginManifest", 1 },
{ "SchemaDef", 1 },
{ "SerializableCollection", 1 },
{ "SerializableObject", 1 },
{ "SerializableObjectWithMetadata", 1 },
{ "Stack", 1 },
{ "TimeEffect", 1 },
{ "Timeline", 1 },
{ "Track", 1 },
{ "Transition", 1 },
{ "UnknownSchema", 1 },
}
},
// {next}
};

Expand Down

0 comments on commit 419ab8e

Please sign in to comment.