1
$\begingroup$

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.
$\endgroup$

1 Answer 1

1
$\begingroup$

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":
                    spaces.append(space)


for space in spaces:
    space.clip = clip
$\endgroup$
1
  • $\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 .