i'm having some troubles in a script that use the auto detect features function from the tracking layout. The above script return the error:
RuntimeError: Operator bpy.ops.clip.detect_features.poll() failed, context is incorrect
Does someone knows how to force a change context to clip tracking?
import bpy
import random
scene = bpy.context.scene
bpy.ops.clip.open(directory="/home/lucasa/Vídeos/", files=[{"name":"100_0921.MP4", "name":"100_0921.MP4"}], relative_path=True)
print('video clip imported')
clip = bpy.data.movieclips[0]
print("\nMovie Clip %s" % clip.name)
bpy.ops.clip.detect_features()
print('\nDetect Features')