I can't find head or tails in the information pulled from crossfades in the VSE. I even get negative numbers?
I need the in and out points inside the clips(what part of the clip to be used) and the in and out points where the clips should be located in the timeline - and that is for both clips of the transition. How do I do that?
Test script. You'll need a transition in the VSE to test it:
import bpy
seq_strips = bpy.context.scene.sequence_editor.sequences
for strip in reversed(seq_strips):
if strip.type in ['CROSS']:
print("INPUT_1:\n")
print("frame_final_end: "+str(strip.input_1.frame_final_end))
print("frame_final_start: "+str(strip.input_1.frame_final_start))
print("frame_start: "+str(strip.input_1.frame_start))
print("frame_offset_start: "+str(strip.input_1.frame_offset_end))
print("frame_offset_end: "+str(strip.input_1.frame_offset_end))
print("frame_final_duration: "+str(strip.input_1.frame_final_duration))
print("frame_duration: "+str(strip.input_1.frame_duration)+"\n")
print("INPUT_2:\n")
print("frame_final_end: "+str(strip.input_2.frame_final_end))
print("frame_final_start: "+str(strip.input_2.frame_final_start))
print("frame_start: "+str(strip.input_2.frame_start))
print("frame_offset_start: "+str(strip.input_2.frame_offset_end))
print("frame_offset_end: "+str(strip.input_2.frame_offset_end))
print("frame_final_duration: "+str(strip.input_2.frame_final_duration))
print("frame_duration: "+str(strip.input_2.frame_duration)+"\n")
print("STRAIGHT:\n")
print("frame_final_end: "+str(strip.frame_final_end))
print("frame_final_start: "+str(strip.frame_final_start))
print("frame_start: "+str(strip.frame_start))
print("frame_offset_start: "+str(strip.frame_offset_end))
print("frame_offset_end: "+str(strip.frame_offset_end))
print("frame_final_duration: "+str(strip.frame_final_duration))
print("frame_duration: "+str(strip.frame_duration)+"\n")
The script is based on this question: Pull clip info from crossfades/fades via python
strip.input_1is the left clip, then you just need to calculatestrip.input_1.frame_final_end - strip.frame_final_startto get the in point inside of input_1... And correspondinglystrip.frame_durationshould be the out point inside of input_2. Right? (didn't test it) – Samoth Mar 26 '17 at 22:07b.recIn = TimeCode(strip.frame_final_start,edl_fps) b.recOut = TimeCode(strip.frame_final_end,edl_fps)But the inside clip in and out points are causing me trouble. Your suggestion gives strange values and even negative values. – tintwotin Mar 26 '17 at 22:55