From eaf8569c1bdbea8bff568f063acb5318db9b7d15 Mon Sep 17 00:00:00 2001 From: Stephan Steinbach <61017+ssteinbach@users.noreply.github.com> Date: Fri, 21 Jul 2023 17:03:54 -0700 Subject: [PATCH] fix a bug in the docs for using schema downgrading (#1641) * fix a bug in the docs for using schema downgrading * Update docs/tutorials/versioning-schemas.md Co-authored-by: Jean-Christophe Morin <38703886+JeanChristopheMorinPerso@users.noreply.github.com> Signed-off-by: Stephan Steinbach <61017+ssteinbach@users.noreply.github.com> --- docs/tutorials/versioning-schemas.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/versioning-schemas.md b/docs/tutorials/versioning-schemas.md index f872ad06b1..33d9efb6c4 100644 --- a/docs/tutorials/versioning-schemas.md +++ b/docs/tutorials/versioning-schemas.md @@ -189,14 +189,26 @@ For example: To fetch the version maps and work with this, the python API provides some additional functions: ```python +# example using a built in family +downgrade_manifest = otio.versioning.fetch_map("OTIO_CORE", "0.15.0") +otio.adapters.write_to_file( + sc, + "/path/to/file.otio", + target_schema_versions=downgrade_manifest +) + +# using a custom family defined in a plugin manifest json file downgrade_manifest = otio.versioning.fetch_map("MYFAMILY", "June2022") otio.adapters.write_to_file( sc, "/path/to/file.otio", - downgrade_manifest + target_schema_versions=downgrade_manifest ) + ``` +To fetch the version sets defined by the core from python, use the `OTIO_CORE` family of version sets. + See the [versioning module](../api/python/opentimelineio.versioning.rst) for more information on accessing these. ## Downgrading at Runtime