File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
src/py-opentimelineio/opentimelineio/console Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def diffTimelines(timelineA, timelineB):
3636
3737 makeTimelineSummary (timelineA , timelineB )
3838
39- outputTimeline = None
39+ outputTimeline = otio . schema . Timeline ()
4040 # process video tracks, audio tracks, or both
4141 if hasVideo and hasAudio :
4242 videoClipTable = categorizeClipsByTracks (timelineA .video_tracks (), timelineB .video_tracks ())
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ def main():
121121
122122 if args .diff :
123123 # TODO? stack, concat, diff make mutually exclusive
124- diff_otio (timelines )
124+ timelines = [ diff_otio (timelines )]
125125
126126 # Phase 6: Remove/Redaction
127127
@@ -510,8 +510,6 @@ def read_inputs(input_paths):
510510 timelines .append (timeline )
511511 return timelines
512512
513- # ======= NEW =======
514-
515513def diff_otio (timelines ):
516514 # TODO: check file format of timelines for OTIO
517515 """Return an annotated timeline showing how clips changed from the first to the second timeline"""
@@ -520,13 +518,7 @@ def diff_otio(timelines):
520518 if len (timelines ) != 2 :
521519 print ("Warning: more than 2 timelines provided as input. Only the first two timelines will be diffed." )
522520 else :
523- timelines = [getDiff .diffTimelines (timelines [0 ], timelines [1 ])]
524- if len (timelines ) == 0 :
525- print ("No output timeline generated by diff" )
526-
527- return timelines
528-
529- # ===================
521+ return getDiff .diffTimelines (timelines [0 ], timelines [1 ])
530522
531523def keep_only_video_tracks (timeline ):
532524 """Remove all tracks except for video tracks from a timeline."""
You can’t perform that action at this time.
0 commit comments