diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-27 15:09:06 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-27 15:09:06 +0400 |
commit | 6963e431481b16b42fa4f545c29bb1a35e61f6e2 (patch) | |
tree | 101967f325f40b9150b67e4e8cba94ddb2afaf16 | |
parent | 0ac3ab752ff81dbb34469e4c18c446a1c835f83c (diff) |
More fixes for timecode usage with BKE_movieclip_get_ibuf_flag
-rw-r--r-- | source/blender/blenkernel/BKE_movieclip.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/tracking.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_movieclip_types.h | 2 |
6 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index 4d16df8afa3..b41f038941d 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -60,7 +60,7 @@ void BKE_movieclip_update_scopes(struct MovieClip *clip, struct MovieClipUser *u void BKE_movieclip_get_cache_segments(struct MovieClip *clip, struct MovieClipUser *user, int *totseg_r, int **points_r); -void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, struct MovieDistortion *distortion, +void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, int cfra, int *build_sizes, int build_count, int undistorted); #define TRACK_CLEAR_UPTO 0 diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 7b2cfd46d33..10c060e0aab 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -918,15 +918,17 @@ static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, i IMB_freeImBuf(scaleibuf); } -void BKE_movieclip_build_proxy_frame(MovieClip *clip, struct MovieDistortion *distortion, +void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, int cfra, int *build_sizes, int build_count, int undistorted) { ImBuf *ibuf; MovieClipUser user; user.framenr= cfra; + user.render_flag= 0; + user.render_size= MCLIP_PROXY_RENDER_SIZE_FULL; - ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, 0); + ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag); if(ibuf) { ImBuf *tmpibuf= ibuf; diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index e3a9fdd9b7f..1a0007c5bfe 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -840,7 +840,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u * - MCLIP_USE_PROXY_CUSTOM_DIR is needed because proxy/timecode files might * be stored in a different location * ignore all the rest pssible flags for now */ - context->clip_flag= clip->flag & (MCLIP_USE_PROXY|MCLIP_USE_PROXY_CUSTOM_DIR); + context->clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS; context->user= *user; context->user.render_size= 0; diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 34726732a17..fe0b58ddda9 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -827,6 +827,7 @@ typedef struct ProxyBuildJob { Scene *scene; struct Main *main; MovieClip *clip; + int clip_flag; } ProxyJob; static void proxy_freejob(void *pjv) @@ -877,10 +878,10 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog for(cfra= sfra; cfra<=efra; cfra++) { if(clip->source != MCLIP_SRC_MOVIE) - BKE_movieclip_build_proxy_frame(clip, NULL, cfra, build_sizes, build_count, 0); + BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, NULL, cfra, build_sizes, build_count, 0); if(undistort) - BKE_movieclip_build_proxy_frame(clip, distortion, cfra, build_sizes, build_count, 1); + BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, distortion, cfra, build_sizes, build_count, 1); if(*stop || G.afbreek) break; @@ -911,6 +912,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) pj->scene= scene; pj->main= CTX_data_main(C); pj->clip= clip; + pj->clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS; WM_jobs_customdata(steve, pj, proxy_freejob); WM_jobs_timer(steve, 0.2, NC_MOVIECLIP|ND_DISPLAY, 0); diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 8a11c881527..d911e68236b 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -2406,7 +2406,8 @@ static int detect_features_exec(bContext *C, wmOperator *op) { SpaceClip *sc= CTX_wm_space_clip(C); MovieClip *clip= ED_space_clip(sc); - ImBuf *ibuf= BKE_movieclip_get_ibuf_flag(clip, &sc->user, 0); + int clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS; + ImBuf *ibuf= BKE_movieclip_get_ibuf_flag(clip, &sc->user, clip_flag); MovieTrackingTrack *track= clip->tracking.tracks.first; int placement= RNA_enum_get(op->ptr, "placement"); int margin= RNA_int_get(op->ptr, "margin"); diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index fc21f26fa32..1a065741121 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -113,6 +113,8 @@ typedef struct MovieClipScopes { #define MCLIP_USE_PROXY (1<<0) #define MCLIP_USE_PROXY_CUSTOM_DIR (1<<1) +#define MCLIP_TIMECODE_FLAGS (MCLIP_USE_PROXY|MCLIP_USE_PROXY_CUSTOM_DIR) + /* MovieClip->render_size */ #define MCLIP_PROXY_RENDER_SIZE_FULL 0 #define MCLIP_PROXY_RENDER_SIZE_25 1 |