diff options
author | Tianwei Shen <shentianweipku@gmail.com> | 2016-07-15 11:07:59 +0300 |
---|---|---|
committer | Tianwei Shen <shentianweipku@gmail.com> | 2016-07-15 11:07:59 +0300 |
commit | fc965a85c6d141edff11f9e634c2bc95d363f7c5 (patch) | |
tree | 6a2cf0db07e2778874854d5e68ea3e3d16fd1121 /source/blender/editors/space_clip | |
parent | 9be7037e5a14fea72b7faca8ff9468e8939edf02 (diff) |
add a new mode in space clip view
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops_correspondence.c | 7 |
2 files changed, 22 insertions, 5 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 1ff656243d6..ca7466b3f24 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -133,6 +133,17 @@ int ED_space_clip_maskedit_mask_poll(bContext *C) return false; } +int ED_space_clip_correspondence_poll(bContext *C) +{ + SpaceClip *sc = CTX_wm_space_clip(C); + + if (sc && sc->clip) { + return ED_space_clip_check_show_correspondence(sc); + } + + return false; +} + /* ******** common editing functions ******** */ void ED_space_clip_get_size(SpaceClip *sc, int *width, int *height) @@ -549,6 +560,15 @@ bool ED_space_clip_check_show_maskedit(SpaceClip *sc) return false; } +bool ED_space_clip_check_show_correspondence(SpaceClip *sc) +{ + if (sc) { + return sc->mode == SC_MODE_CORRESPONDENCE; + } + + return false; +} + /* ******** clip editing functions ******** */ MovieClip *ED_space_clip_get_clip(SpaceClip *sc) diff --git a/source/blender/editors/space_clip/tracking_ops_correspondence.c b/source/blender/editors/space_clip/tracking_ops_correspondence.c index 58c2504dd9f..608d637c9de 100644 --- a/source/blender/editors/space_clip/tracking_ops_correspondence.c +++ b/source/blender/editors/space_clip/tracking_ops_correspondence.c @@ -113,8 +113,6 @@ static int add_correspondence_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - // TODO(tianwei): mark these two tracks in a different color when clicked - // add these correspondence char error_msg[256] = "\0"; if (!BKE_tracking_correspondence_add(&(tracking->correspondences), primary_track, witness_track, @@ -304,7 +302,7 @@ static void solve_multiview_startjob(void *scv, short *stop, short *do_update, f sizeof(smj->stats_message)); } -// TODO(tianwei): setting status for witness camera is not finished +// TODO(tianwei): not sure about the scene for witness cameras, check with Sergey static void solve_multiview_freejob(void *scv) { SolveMultiviewJob *smj = (SolveMultiviewJob *)scv; @@ -332,7 +330,7 @@ static void solve_multiview_freejob(void *scv) tracking->reconstruction.error); } - /* Set currently solved clip as active for scene. */ + /* Set the currently solved primary clip as active for scene. */ if (scene->clip != NULL) { id_us_min(&clip->id); } @@ -363,7 +361,6 @@ static void solve_multiview_freejob(void *scv) BKE_tracking_multiview_reconstruction_context_free(smj->context); MEM_freeN(smj); - printf("free multiview reconstruction context\n"); } static int solve_multiview_exec(bContext *C, wmOperator *op) |