Planar tracking support for motion tracking
[blender.git] / source / blender / editors / space_clip / space_clip.c
index d61dd862096c696153712e792ca1ae0c5a027fd6..54724881e37bc3044a122b208f3a481ae3d384b9 100644 (file)
@@ -306,6 +306,9 @@ static void clip_free(SpaceLink *sl)
        if (sc->scopes.track_preview)
                IMB_freeImBuf(sc->scopes.track_preview);
 
+       if (sc->scopes.track_search)
+               IMB_freeImBuf(sc->scopes.track_search);
+
        ED_space_clip_free_texture_buffer(sc);
 }
 
@@ -323,6 +326,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
        SpaceClip *scn = MEM_dupallocN(sl);
 
        /* clear or remove stuff from old */
+       scn->scopes.track_search = NULL;
        scn->scopes.track_preview = NULL;
        scn->scopes.ok = FALSE;
        scn->draw_context = NULL;
@@ -392,9 +396,12 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
                                        break;
                        }
                        break;
-                case NC_SCREEN:
-                       if (wmn->data == ND_ANIMPLAY) {
-                               ED_area_tag_redraw(sa);
+               case NC_SCREEN:
+                        switch (wmn->data) {
+                               case ND_ANIMPLAY:
+                               case ND_GPENCIL:
+                                       ED_area_tag_redraw(sa);
+                                       break;
                        }
                        break;
                case NC_SPACE:
@@ -1047,7 +1054,7 @@ static void clip_main_area_init(wmWindowManager *wm, ARegion *ar)
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy);
 
        /* own keymap */
-       keymap= WM_keymap_find(wm->defaultconf, "Mask Editing", 0, 0);
+       keymap = WM_keymap_find(wm->defaultconf, "Mask Editing", 0, 0);
        WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
 
        keymap = WM_keymap_find(wm->defaultconf, "Clip", SPACE_CLIP, 0);