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:
authorTianwei Shen <shentianweipku@gmail.com>2016-08-10 19:15:13 +0300
committerTianwei Shen <shentianweipku@gmail.com>2016-08-10 19:15:13 +0300
commit62614850c95571435d46ee0acfc474f4f126a3a5 (patch)
tree2440d51ebd5c611f8ea2d4f3a79ba1444be87908 /source/blender/editors/space_clip
parent1e1371567d8918429eb1c36758eaf0f146cc4e97 (diff)
comment out iterating code
we don't need to iterate over all open spaceclip to find witness cameras since we now know where the witness comes from (secondary_clip pointer). However, the con is that we don't know how to access more than one witness camera. Need to fix this later.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/tracking_ops_correspondence.c50
1 files changed, 26 insertions, 24 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops_correspondence.c b/source/blender/editors/space_clip/tracking_ops_correspondence.c
index 1d2096559d6..5f73d111490 100644
--- a/source/blender/editors/space_clip/tracking_ops_correspondence.c
+++ b/source/blender/editors/space_clip/tracking_ops_correspondence.c
@@ -213,36 +213,38 @@ static bool solve_multiview_initjob(bContext *C,
int width, height;
/* count all clips number, primary clip will always be the first */
- smj->clip_num = 1;
- 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++;
- }
- }
- }
+ // 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);
smj->clips = MEM_callocN(smj->clip_num * sizeof(MovieClip*), "multiview clip pointers");
smj->clips[0] = clip;
/* do multi-view reconstruction
- * TODO(tianwei): it can only count clip that are open?
+ * TODO(tianwei): it cannot count clip other than primary and secondary clips.
* */
- if (smj->clip_num > 1) {
- int count = 1; // witness cameras start from 1
- 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) {
- MovieClip *other_clip;
- other_clip = ED_space_clip_get_clip(other_sc);
- smj->clips[count++] = other_clip;
- }
- }
- }
- }
+ //if (smj->clip_num > 1) {
+ // int count = 1; // witness cameras start from 1
+ // 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) {
+ // MovieClip *other_clip;
+ // other_clip = ED_space_clip_get_clip(other_sc);
+ // smj->clips[count++] = other_clip;
+ // }
+ // }
+ // }
+ //}
+ smj->clips[1] = ED_space_clip_get_secondary_clip(sc);
if (!BKE_tracking_multiview_reconstruction_check(smj->clips,
object,