diff options
author | Tianwei Shen <shentianweipku@gmail.com> | 2016-08-16 10:04:37 +0300 |
---|---|---|
committer | Tianwei Shen <shentianweipku@gmail.com> | 2016-08-16 10:04:37 +0300 |
commit | c493fff3d5abd547f096c375f9912070c709cbf9 (patch) | |
tree | 3d866e7af57d09c2a3e2aaa50fb23ded363220d9 /source/blender/editors/space_clip | |
parent | 1cb668054e7f8d75e1f10397ef3845fe62fa49c9 (diff) |
Multiview tracking count clip using main.movieclip
- using open clip given by main->movieclip
- haven't set up clip pointer using main.movieclip
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops_correspondence.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_correspondence.c b/source/blender/editors/space_clip/tracking_ops_correspondence.c index 5f73d111490..208ea0dab5c 100644 --- a/source/blender/editors/space_clip/tracking_ops_correspondence.c +++ b/source/blender/editors/space_clip/tracking_ops_correspondence.c @@ -42,6 +42,7 @@ #include "BLI_blenlib.h" #include "BLI_string.h" +#include "BKE_main.h" #include "BKE_context.h" #include "BKE_movieclip.h" #include "BKE_tracking.h" @@ -212,19 +213,13 @@ static bool solve_multiview_initjob(bContext *C, MovieTrackingObject *object = BKE_tracking_object_get_active(tracking); int width, height; - /* count all clips number, primary clip will always be the first */ - // TODO(tianwei): don't count clips for now, because we can only do with two cameras. - smj->clip_num = 2; - //wmWindow *window = CTX_wm_window(C); - //for (ScrArea *sa = window->screen->areabase.first; sa != NULL; sa = sa->next) { - // if (sa->spacetype == SPACE_CLIP) { - // SpaceClip *other_sc = sa->spacedata.first; - // if (other_sc != sc && other_sc->view == SC_VIEW_CLIP) { - // smj->clip_num++; - // } - // } - //} - printf("%d active clips for reconstruction\n", smj->clip_num); + /* count all clips number, primary clip will always be the first + * iterate over bContext->data.main.movieclip to get open clips. + */ + Main *main = CTX_data_main(C); + ListBase *mc_base = &(main->movieclip); + smj->clip_num = BLI_listbase_count(mc_base); + printf("%d open clips for reconstruction\n", smj->clip_num); smj->clips = MEM_callocN(smj->clip_num * sizeof(MovieClip*), "multiview clip pointers"); smj->clips[0] = clip; |