Is it possible to set the active clip in the Motion Tracking workspace?

clip = bpy.data.movieclips.load(filepath)
#somehow set the clip as the active
  • By active I mean that it displays in the viewer so I don't have to select it in the dropdown.

1 Answer 1


Set active clip in all Movie Clip Editor in current workspace

import bpy

clip = ...

spaces = []
for area in bpy.context.screen.areas:
    if area.type == 'CLIP_EDITOR':
        for space in area.spaces:
            if space.type == "CLIP_EDITOR":
                if space.view == "CLIP":

for space in spaces:
    space.clip = clip
  • $\begingroup$ Thanks for the help, appreciated! $\endgroup$ Nov 14, 2023 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .