Skip to content

Commit 3d1d811

Browse files
jminorMichaelPlug
authored andcommitted
Added OTIO_CORE 0.14.0 version_manifest. (AcademySoftwareFoundation#1415)
* 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]> Signed-off-by: Michele Spina <[email protected]>
1 parent 8dba0c2 commit 3d1d811

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed

docs/tutorials/versioning-schemas.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,35 @@ otio.adapters.write_to_file(
199199

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

202+
## Downgrading at Runtime
203+
204+
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.
205+
206+
You can accomplish this in two ways:
207+
- The `OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL` environment variable can specify a family and version.
208+
- The `otioconvert` utility program can downgrade an OTIO file to an older version.
209+
210+
### OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL Environment Variable
211+
212+
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.
213+
For example, in a *nix shell: `env OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL=OTIO_CORE:0.14.0 my_program`
214+
215+
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.
216+
217+
### Downgrading with otioconvert
218+
219+
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.
220+
221+
You can either use a family like this:
222+
```
223+
env OTIO_DEFAULT_TARGET_VERSION_FAMILY_LABEL=OTIO_CORE:0.14.0 otioconvert -i input.otio -o output.otio
224+
```
225+
226+
or you can specify the version mapping for each schema you care about like this:
227+
```
228+
otioconvert -i input.otio -o output.otio -A target_schema_versions="{'Clip':1, 'Timeline':1, 'Marker':2}"
229+
```
230+
202231
## For Developers
203232

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

src/opentimelineio/CORE_VERSION_MAP.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,38 @@
1515
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
1616

1717
const label_to_schema_version_map CORE_VERSION_MAP {
18+
{ "0.14.0",
19+
{
20+
{ "Adapter", 1 },
21+
{ "Clip", 1 },
22+
{ "Composable", 1 },
23+
{ "Composition", 1 },
24+
{ "Effect", 1 },
25+
{ "ExternalReference", 1 },
26+
{ "FreezeFrame", 1 },
27+
{ "Gap", 1 },
28+
{ "GeneratorReference", 1 },
29+
{ "HookScript", 1 },
30+
{ "ImageSequenceReference", 1 },
31+
{ "Item", 1 },
32+
{ "LinearTimeWarp", 1 },
33+
{ "Marker", 2 },
34+
{ "MediaLinker", 1 },
35+
{ "MediaReference", 1 },
36+
{ "MissingReference", 1 },
37+
{ "PluginManifest", 1 },
38+
{ "SchemaDef", 1 },
39+
{ "SerializableCollection", 1 },
40+
{ "SerializableObject", 1 },
41+
{ "SerializableObjectWithMetadata", 1 },
42+
{ "Stack", 1 },
43+
{ "TimeEffect", 1 },
44+
{ "Timeline", 1 },
45+
{ "Track", 1 },
46+
{ "Transition", 1 },
47+
{ "UnknownSchema", 1 },
48+
}
49+
},
1850
{ "0.15.0.dev1",
1951
{
2052
{ "Adapter", 1 },

src/opentimelineio/CORE_VERSION_MAP.last.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,38 @@
1515
namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
1616

1717
const label_to_schema_version_map CORE_VERSION_MAP {
18+
{ "0.14.0",
19+
{
20+
{ "Adapter", 1 },
21+
{ "Clip", 1 },
22+
{ "Composable", 1 },
23+
{ "Composition", 1 },
24+
{ "Effect", 1 },
25+
{ "ExternalReference", 1 },
26+
{ "FreezeFrame", 1 },
27+
{ "Gap", 1 },
28+
{ "GeneratorReference", 1 },
29+
{ "HookScript", 1 },
30+
{ "ImageSequenceReference", 1 },
31+
{ "Item", 1 },
32+
{ "LinearTimeWarp", 1 },
33+
{ "Marker", 2 },
34+
{ "MediaLinker", 1 },
35+
{ "MediaReference", 1 },
36+
{ "MissingReference", 1 },
37+
{ "PluginManifest", 1 },
38+
{ "SchemaDef", 1 },
39+
{ "SerializableCollection", 1 },
40+
{ "SerializableObject", 1 },
41+
{ "SerializableObjectWithMetadata", 1 },
42+
{ "Stack", 1 },
43+
{ "TimeEffect", 1 },
44+
{ "Timeline", 1 },
45+
{ "Track", 1 },
46+
{ "Transition", 1 },
47+
{ "UnknownSchema", 1 },
48+
}
49+
},
1850
// {next}
1951
};
2052

0 commit comments

Comments
 (0)