Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 10 additions & 7 deletions contrib/opentimelineio_contrib/adapters/extern_rv.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,16 @@ def _create_media_reference(item, src, track_kind=None):
def _write_item(it, to_session, track_kind=None):
src = to_session.newNode("Source", str(it.name) or "clip")

src.setProperty(
"RVSourceGroup",
"source",
"attributes",
"otio_metadata",
rvSession.gto.STRING, str(it.metadata)
)
if it.metadata:
src.setProperty(
"RVSourceGroup",
"source",
"otio",
"metadata",
rvSession.gto.STRING,
# Serialize to a string as it seems gto has issues with unicode
str(otio.core.serialize_json_to_string(it.metadata, indent=-1))
)

range_to_read = it.trimmed_range()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"OTIO_SCHEMA": "Timeline.1",
"metadata": {},
"name": "OTIO_Test_ppjoshm1.Exported.01",
"tracks": {
"OTIO_SCHEMA": "Stack.1",
"children": [
{
"OTIO_SCHEMA": "Track.1",
"children": [
{
"OTIO_SCHEMA": "Clip.1",
"effects": [],
"markers": [],
"media_reference": {
"OTIO_SCHEMA": "ExternalReference.1",
"available_range": {
"OTIO_SCHEMA": "TimeRange.1",
"duration": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24,
"value": 192
},
"start_time": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24,
"value": 1
}
},
"metadata": {},
"name": null,
"target_url": "sample_data/one_clip.mov"
},
"metadata": {
"cmx_3600": {
"comments": [
"SOURCE FILE: ZZ100_507C.LAY2.01"
],
"reel": "ZZ100_50"
}
},
"name": "ppjoshm_1 (SIM1)",
"source_range": {
"OTIO_SCHEMA": "TimeRange.1",
"duration": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24.0,
"value": 10
},
"start_time": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24.0,
"value": 101
}
}
}
],
"effects": [],
"kind": "Video",
"markers": [],
"metadata": {},
"name": "TimelineMobSlot",
"source_range": null
},
{
"OTIO_SCHEMA": "Track.1",
"children": [
{
"OTIO_SCHEMA": "Clip.1",
"effects": [],
"markers": [],
"media_reference": {
"OTIO_SCHEMA": "ExternalReference.1",
"available_range": {
"OTIO_SCHEMA": "TimeRange.1",
"duration": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24,
"value": 192
},
"start_time": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24,
"value": 1
}
},
"metadata": {},
"name": null,
"target_url": "sample_data/one_clip.mov"
},
"metadata": {
"pixar": {
"OTIO_SCHEMA": "PixarMetadata.1",
"cache": {
"hitech": {
"OTIO_SCHEMA": "PixarHitech.1",
"shot": null,
"take": null
}
},
"take": {
"OTIO_SCHEMA": "PixarTake.1",
"globaltake": 1,
"prod": "ppjoshm",
"shot": "ppjoshm_1",
"unit": "none"
}
}
},
"name": "ppjoshm_1 (SIM1)",
"source_range": {
"OTIO_SCHEMA": "TimeRange.1",
"duration": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24.0,
"value": 10
},
"start_time": {
"OTIO_SCHEMA": "RationalTime.1",
"rate": 24.0,
"value": 0
}
}
}
],
"effects": [],
"kind": "Audio",
"markers": [],
"metadata": {},
"name": "TimelineMobSlot",
"source_range": null
}
],
"effects": [],
"markers": [],
"metadata": {},
"name": "tracks",
"source_range": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
GTOa (4)

rv : RVSession (4)
{
session
{
string viewNode = "Stack000000"
}

writer
{
string name = "rvSession.py"
string version = "0.5"
}
}

connections : connection (2)
{
evaluation
{
string[2] connections = [ [ "sourceGroup000001" "Sequence000001" ] [ "sourceGroup000000" "Sequence000000" ] [ "Sequence000000" "Stack000000" ] [ "Sequence000001" "Stack000000" ] ]
}
}

Sequence000000 : RVSequenceGroup (1)
{
ui
{
string name = "TimelineMobSlot"
}
}

Sequence000001 : RVSequenceGroup (1)
{
ui
{
string name = "TimelineMobSlot"
}
}

Stack000000 : RVStackGroup (1)
{
ui
{
string name = "tracks"
}
}

sourceGroup000000 : RVSourceGroup (1)
{
ui
{
string name = "ppjoshm_1 (SIM1)"
}
}

sourceGroup000000_source : RVFileSource (1)
{
cut
{
int in = 101
int out = 110
}

group
{
float fps = 24
}

media
{
string movie = "sample_data/one_clip.mov"
}

otio
{
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_507C.LAY2.01\"],\"reel\":\"ZZ100_50\"}}"
}
}

sourceGroup000001 : RVSourceGroup (1)
{
ui
{
string name = "ppjoshm_1 (SIM1)"
}
}

sourceGroup000001_source : RVFileSource (1)
{
cut
{
int in = 0
int out = 9
}

group
{
float fps = 24
}

media
{
string movie = [ "blank,start=1.0,end=192.0,fps=24.0.movieproc" "blank,start=1.0,end=192.0,fps=24.0.movieproc" "sample_data/one_clip.mov" ]
}

otio
{
string metadata = "{\"pixar\":{\"OTIO_SCHEMA\":\"PixarMetadata.1\",\"cache\":{\"hitech\":{\"OTIO_SCHEMA\":\"PixarHitech.1\",\"shot\":null,\"take\":null}},\"take\":{\"OTIO_SCHEMA\":\"PixarTake.1\",\"globaltake\":1,\"prod\":\"ppjoshm\",\"shot\":\"ppjoshm_1\",\"unit\":\"none\"}}}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ sourceGroup000000_source : RVFileSource (1)
string movie = "smptebars,start=86501.0,end=86531.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_501.LAY3.01']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_501.LAY3.01\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -96,9 +96,9 @@ sourceGroup000001_source : RVFileSource (1)
string movie = "smptebars,start=86557.0,end=86606.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_502A.LAY3.02']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_502A.LAY3.02\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -128,9 +128,9 @@ sourceGroup000002_source : RVFileSource (1)
string movie = "smptebars,start=86601.0,end=86628.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_503A.LAY1.01']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_503A.LAY1.01\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -160,9 +160,9 @@ sourceGroup000003_source : RVFileSource (1)
string movie = "smptebars,start=86641.0,end=86755.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_504C.LAY1.02']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_504C.LAY1.02\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -192,9 +192,9 @@ sourceGroup000004_source : RVFileSource (1)
string movie = "smptebars,start=86753.0,end=86853.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_504B.LAY1.02']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_504B.LAY1.02\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -224,9 +224,9 @@ sourceGroup000005_source : RVFileSource (1)
string movie = "smptebars,start=86501.0,end=86661.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_507C.LAY2.01']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_507C.LAY2.01\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -256,9 +256,9 @@ sourceGroup000006_source : RVFileSource (1)
string movie = "smptebars,start=86628.0,end=86797.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_50', 'comments': [u'SOURCE FILE: ZZ100_508.LAY2.02']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_508.LAY2.02\"],\"reel\":\"ZZ100_50\"}}"
}
}

Expand Down Expand Up @@ -288,9 +288,9 @@ sourceGroup000007_source : RVFileSource (1)
string movie = "smptebars,start=86722.0,end=86857.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_51', 'comments': [u'SOURCE FILE: ZZ100_510.LAY1.02']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"SOURCE FILE: ZZ100_510.LAY1.02\"],\"reel\":\"ZZ100_51\"}}"
}
}

Expand Down Expand Up @@ -320,8 +320,8 @@ sourceGroup000008_source : RVFileSource (1)
string movie = "smptebars,start=86501.0,end=86757.0,fps=24.0.movieproc"
}

attributes
otio
{
string otio_metadata = "{'cmx_3600': {'reel': u'ZZ100_51', 'comments': [u'AVX2 EFFECT, RESIZE', u'SOURCE FILE: ZZ100_510B.LAY1.02']}}"
string metadata = "{\"cmx_3600\":{\"comments\":[\"AVX2 EFFECT, RESIZE\",\"SOURCE FILE: ZZ100_510B.LAY1.02\"],\"reel\":\"ZZ100_51\"}}"
}
}
Loading