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:
-rw-r--r--source/blender/editors/space_clip/tracking_ops_solve.c6
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_solve.c b/source/blender/editors/space_clip/tracking_ops_solve.c
index 96b00ec5463..1d2fc239a89 100644
--- a/source/blender/editors/space_clip/tracking_ops_solve.c
+++ b/source/blender/editors/space_clip/tracking_ops_solve.c
@@ -50,6 +50,7 @@
/********************** solve camera operator *********************/
typedef struct {
+ struct wmWindowManager *wm;
Scene *scene;
MovieClip *clip;
MovieClipUser user;
@@ -78,6 +79,7 @@ static bool solve_camera_initjob(
/* Could fail if footage uses images with different sizes. */
BKE_movieclip_get_size(clip, &sc->user, &width, &height);
+ scj->wm = CTX_wm_manager(C);
scj->clip = clip;
scj->scene = scene;
scj->reports = op->reports;
@@ -88,6 +90,8 @@ static bool solve_camera_initjob(
tracking->stats = MEM_callocN(sizeof(MovieTrackingStats), "solve camera stats");
+ WM_set_locked_interface(scj->wm, true);
+
return true;
}
@@ -114,6 +118,8 @@ static void solve_camera_freejob(void *scv)
MovieClip *clip = scj->clip;
int solved;
+ WM_set_locked_interface(scj->wm, false);
+
if (!scj->context) {
/* job weren't fully initialized due to some error */
MEM_freeN(scj);
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);
}