magnetic-lab/magla

`start_frame_in_parent` mechanism should instead use order index pattern.

Opened this issue · 0 comments

magla/magla/core/shot.py

Lines 87 to 95 in 04f9848

def start_frame_in_parent(self):
"""Retrieve start_frame_in_parent from data.
Returns
-------
int
Frame number in the timeline that this shot populates inserts itself at
"""
return self.data.start_frame_in_parent or 0

What needs to change

Currently, the implementation for a persistent project timeline edit is to store each shot's start frame in its respective opentimelineio track. In this way, the edit can be re-assembled on the fly. This needs to instead use a more abstract arbitrary ordering system.

Reasoning

One of the primary goals of magla timelines is to be able to dynamically create them based on custom criteria. The problem with current implementation is that shot start times are way too hard-coded and locked in and cannot flexibly react to new shot insertions or changes in FPS settings.

Example usage of proposed change

Calling the timeline build method with every other shot excluded, should result in a timeline with no gaps where the removed shots were. Additionally, more advanced insertions and removes can take place while the relative ordering of the project's root edit is preserved.