Skip to content

Commit 26514cf

Browse files
eloisebrosseaucedrik-fuoco-adsk
authored andcommitted
Add RV as a participant using the new Live Review schema (AcademySoftwareFoundation#602)
### Add RV as a participant using the new Live Review schema ### Summarize your change. The `read_otio_string` function was added to parse the OTIO object containing the timeline sent by the Review App when RV is joining a new session as a participant. Since the timeline contains some annotation fields, the annotation schema was added in order to let OTIO know that it is a known schema during the deserialization step. However, nothing is done with the annotations at this stage. ### Describe the reason for the change. This is the first step in adding back the new OTIO schema as the preferred way of communication between RV and the Review App. ### Describe what you have tested and on which operating system. Live review using the new schema was tested between a local Review App where the feature was enabled with https://creative-collab.dev.shotguncloud.com and RV on MacOS. --------- Signed-off-by: Éloïse Brosseau <[email protected]> Signed-off-by: Cédrik Fuoco <[email protected]>
1 parent 62e0cd5 commit 26514cf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/plugins/rv-packages/otio_reader/otio_reader.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ class NoNodeFromHook(otio.exceptions.OTIOError):
6060
pass
6161

6262

63+
def read_otio_string(otio_string: str, host_prefix: str | None = None) -> object | None:
64+
"""
65+
Main entry point to expand a given otio string into the current RV session.
66+
67+
Returns the top level node created that represents this otio
68+
timeline.
69+
"""
70+
otio_obj = otio.adapters.read_from_string(otio_string)
71+
timeline = otio_obj["otio"]
72+
73+
context = {"sg_url": host_prefix} if host_prefix else None
74+
75+
return create_rv_node_from_otio(timeline, context), timeline.global_start_time
76+
77+
6378
def read_otio_file(otio_file):
6479
"""
6580
Main entry point to expand a given otio (or file otio can read)

0 commit comments

Comments
 (0)