Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-09-13 12:48:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-09-13 12:59:34 +0300
commit592a3d7b4771c8d329d586e8bfa776b25666921b (patch)
tree3973860f49d85bc6f6b682fbf770bd5e03665ff0 /source/blender/editors/space_clip/tracking_ops_track.c
parent49c36d34307ae510426455f834973b53f7d1db35 (diff)
Tracking: Perform tracking and solving from a locked interface
Solves stability issues with possibly doing destructive changes to the tracking setup. Locking interface is the simplest and most reliable way to avoid crashes. It is still possible to run non-destructive changes such as clip view navigation. More operations can be marked as safe if needed. Fixes T67012: Software closes when a processing marker is deleted
Diffstat (limited to 'source/blender/editors/space_clip/tracking_ops_track.c')
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index 4d3281c6cf9..adbb3e30850 100644
--- a/source/blender/editors/space_clip/tracking_ops_track.c
+++ b/source/blender/editors/space_clip/tracking_ops_track.c
@@ -59,6 +59,7 @@ typedef struct TrackMarkersJob {
float delay; /* Delay in milliseconds to allow
* tracking at fixed FPS */
+ struct wmWindowManager *wm;
struct Main *main;
struct Scene *scene;
struct bScreen *screen;
@@ -202,7 +203,15 @@ static bool track_markers_initjob(bContext *C, TrackMarkersJob *tmj, bool backwa
tmj->main = CTX_data_main(C);
tmj->screen = CTX_wm_screen(C);
- return track_markers_check_direction(backwards, tmj->sfra, tmj->efra);
+ tmj->wm = CTX_wm_manager(C);
+
+ if (!track_markers_check_direction(backwards, tmj->sfra, tmj->efra)) {
+ return false;
+ }
+
+ WM_set_locked_interface(tmj->wm, true);
+
+ return true;
}
static void track_markers_startjob(void *tmv, short *stop, short *do_update, float *progress)
@@ -281,6 +290,7 @@ static void track_markers_freejob(void *tmv)
{
TrackMarkersJob *tmj = (TrackMarkersJob *)tmv;
tmj->clip->tracking_context = NULL;
+ WM_set_locked_interface(tmj->wm, false);
BKE_autotrack_context_free(tmj->context);
MEM_freeN(tmj);
}