Maniphest T78148

Python Clip_Editor tracking script not run
Closed, Archived

Assigned To
Germano Cavalcante (mano-wii)
Authored By
Jack Feet (JackFeet)
Jun 23 2020, 4:17 AM
Tags
  • BF Blender
Subscribers
Germano Cavalcante (mano-wii)
Jack Feet (JackFeet)

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: Intel(R) HD Graphics 620 Intel 4.5.0 - Build 26.20.100.7812

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-22 22:06, hash: rB51bf04383aa0
Worked: Not Sure

Short description of error
Detect Features and Track Markers does not work correctly from script

Exact steps for others to reproduce the error
Delete Cube <lol>
Clip_Editor Load Clip
Text_Editor Use either of the two scripts provided.
Script appears to work but does not go beyond one frame advancement and only detects features and tracks for that one frame

Script 1

import bpy

bpy.context.area.ui_type = 'CLIP_EDITOR'
ctx = bpy.context.copy()
for area in bpy.context.screen.areas:
    if area.type == 'CLIP_EDITOR':
        ctx['area'] = area
        bpy.ops.clip.detect_features(ctx)
        bpy.ops.clip.track_markers(ctx,backwards=False, sequence=False)
        bpy.ops.clip.detect_features(ctx)
        bpy.ops.clip.track_markers(ctx,backwards=False, sequence=False)
        bpy.ops.clip.detect_features(ctx)
        bpy.ops.clip.track_markers(ctx,backwards=False, sequence=False)

Script 2

import bpy


bpy.context.area.ui_type = 'CLIP_EDITOR'
ctx = bpy.context.copy()
for area in bpy.context.screen.areas:
    if area.type == 'CLIP_EDITOR':
        for loopv in range (10):
            ctx['area'] = area
            bpy.ops.clip.detect_features(ctx)
            bpy.ops.clip.track_markers(ctx,backwards=False, sequence=False)

Event Timeline

Jack Feet (JackFeet) created this task.Jun 23 2020, 4:17 AM
Germano Cavalcante (mano-wii) closed this task as Archived.Jun 24 2020, 8:29 PM
Germano Cavalcante (mano-wii) claimed this task.
Germano Cavalcante (mano-wii) added a subscriber: Germano Cavalcante (mano-wii).

It is a bad assumption that specifying an area type with this line "bpy.context.area.ui_type = 'CLIP_EDITOR'" will immediately change the editor.
Other things need to be updated, which usually happens when an operator ends.
It is a problem similar to what is described in T54468.

Thanks for the report, but we do not handle user support on this tracker, only bug reports.
User forums like blenderartists.org or blender.stackexchange.com should be used for that matter.