3
$\begingroup$

There are the following commands:

create sequence editor

bpy.context.scene.sequence_editor_create()

add strip (name, filepath, channel, frame_start)

bpy.context.scene.sequence_editor.sequences.new_image("coolName", "path/db.png", 4, 1)

Until now I have created a sequence on channel 4, starting at frame 1 like in the following picture:

enter image description here

I want to control the starting frame of the slider and the ending frame of this strip. How can I achieve this using blender script?

$\endgroup$
2
$\begingroup$

You can reference the sequence object immediately when creating it:

seq = bpy.context.scene.sequence_editor.sequences.new_image("coolName", "somePath/img.PNG", 4, 1)

Then you can edit the frame_final_start and frame_final_end to edit the sequence start and finish, same as the handles:

seq.frame_final_start = 10
seq.frame_final_end   = 50
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.