def find_effect_strips(sequence):
"""
Takes a single strip and finds effect strips that use it as input
Returns the effect strip(s) found as a list, ordered by starting frame
Returns None if no effect was found
"""
if sequence.type not in SequenceTypes.VIDEO and sequence.type not in SequenceTypes.IMAGE:
return None
effect_sequences = (s
for s in bpy.context.sequences
if s.type in SequenceTypes.EFFECT)
found_effect_strips = []
for s in effect_sequences:
if s.input_1.name == sequence.name:
found_effect_strips.append(s)
if s.input_count == 2:
if s.input_2.name == sequence.name:
found_effect_strips.append(s)
found_effect_strips = sorted(found_effect_strips,
key=attrgetter('frame_final_start'))
return found_effect_strips
评论列表
文章目录