timeline.py
def flatten_timeline(timeline_collection):
    '''
    A flat timeline representation, with all objects except any group objects.
    (Groups disappear when expanded - The icon is no longer there in the timeline.)
    '''
    flat_collection = []
    
    for obj in timeline_collection:
        if obj.isGroup:
            # Groups only appear in the timeline if they are collapsed
            # In that case, the features inside the group are only listed within the group
            # and not as part of the top-level timeline. So timeline essentially gives us
            # what is literally shown in the timeline control in Fusion.

            # Flatten the group
            flat_collection += flatten_timeline(obj)
        else:
            flat_collection.append(obj)

    return flat_collection

    A flat timeline representation, with all objects except any group objects.
    (Groups disappear when expanded - The icon is no longer there in the timeline.)
    
A flat timeline representation, with all objects except any group objects.
(Groups disappear when expanded - The icon is no longer there in the timeline.)
A flat timeline representation with all objects except any group objects . ( Groups disappear when expanded - The icon is no longer there in the timeline . )
def flatten_timeline(timeline_collection):
    flat_collection = []
    for obj in timeline_collection:
        if obj.isGroup:
            flat_collection += flatten_timeline(obj)
        else:
            flat_collection.append(obj)
    return flat_collection
def flatten_timeline ( timeline_collection ) : flat_collection = [ ] for obj in timeline_collection : if obj . isGroup : flat_collection += flatten_timeline ( obj ) else : flat_collection . append ( obj ) return flat_collection
A flat timeline representation, with all objects except any group objects.
A flat timeline representation with all objects except any group objects .
'''
    A flat timeline representation, with all objects except any group objects.
    (Groups disappear when expanded - The icon is no longer there in the timeline.)
    ''' # Groups only appear in the timeline if they are collapsed # In that case, the features inside the group are only listed within the group # and not as part of the top-level timeline. So timeline essentially gives us # what is literally shown in the timeline control in Fusion. # Flatten the group
timeline_collection