AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 294 forks source link

otioview's CompositionWidget assumes all stacks have tracks #376

Open avrata opened 6 years ago

avrata commented 6 years ago

otioview CompositionWidget can run into issues when coming across nested stacks that contain direct clip (Item) children. You'll notice this if you have a:

Timeline -> Stack -> Track -> Stack -> Clip

And you try and "Open" (double click for example) the internal Stack you'll see:

  File "...OpenTimelineIO/opentimelineview/timeline_widget.py", line 375, in _adjust_scene_size
    for t in self.composition
  File "...OpenTimelineIO/opentimelineview/timeline_widget.py", line 375, in <genexpr>
    for t in self.composition
AttributeError: 'Clip' object has no attribute 'kind'

This assumption shows up in both _adjust_scene_size() and _add_tracks()

avrata commented 6 years ago

Adding an example otio file with nested tracks and stacks.

376.zip

jminor commented 3 years ago

Here's another example that illustrates the same problem.

stack_with_clips.otio.zip