New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten Algorithm #205

Merged
merged 15 commits into from Jan 12, 2018

Conversation

Projects
None yet
2 participants
@jminor
Collaborator

jminor commented Jan 10, 2018

We now have a function that takes a Stack with many Tracks and returns a single Track with all of the items composed together.
Note: that flattening does not yet handle Transitions or nested Tracks, only Stacks, Clips and Gaps.

This also includes:

  • Moved responsibility for updating parenting from _set_parent() to Composition.
  • Added tests for equality and truthiness.
  • Created stack_algo module.
@jminor

This comment has been minimized.

Show comment
Hide comment
@jminor

jminor Jan 10, 2018

Collaborator

Addresses #201

Collaborator

jminor commented Jan 10, 2018

Addresses #201

@ssteinbach

Some questions, otherwise looks good!

yield item
else:
trim = item.range_in_parent()
if trim_range is not None:

This comment has been minimized.

@ssteinbach

ssteinbach Jan 10, 2018

Member

when does range_in_parent return None?

@ssteinbach

ssteinbach Jan 10, 2018

Member

when does range_in_parent return None?

Show outdated Hide outdated opentimelineio/core/composition.py Outdated
@@ -1180,12 +1234,38 @@ def test_deeply_nested(self):
self.assertEqual(stack.transformed_time(fifty, clip), middle)
self.assertEqual(stack.transformed_time(ninetynine, clip), last)
def _nest(self, item):

This comment has been minimized.

@ssteinbach

ssteinbach Jan 10, 2018

Member

Should this just be a member method of the test class? that way you wouldn't have to explicitly pass in self below. Could stay _ prefixed.

@ssteinbach

ssteinbach Jan 10, 2018

Member

Should this just be a member method of the test class? that way you wouldn't have to explicitly pass in self below. Could stay _ prefixed.

@jminor jminor added this to the Public Beta 7 milestone Jan 12, 2018

@jminor jminor merged commit 3f7fe68 into PixarAnimationStudios:master Jan 12, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jminor jminor deleted the jminor:flatten branch Jun 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment