forked from bartvdbraak/blender
Fix for clip proxies builder reloading original footage frames
This isn't needed if the source is the image sequence.
This commit is contained in:
parent
f51b583ea0
commit
76f50cd17a
@ -46,6 +46,7 @@ void BKE_movieclip_unlink(struct Main *bmain, struct MovieClip *clip);
|
||||
struct MovieClip *BKE_movieclip_file_add(struct Main *bmain, const char *name);
|
||||
void BKE_movieclip_reload(struct MovieClip *clip);
|
||||
void BKE_movieclip_clear_cache(struct MovieClip *clip);
|
||||
void BKE_movieclip_clear_proxy_cache(struct MovieClip *clip);
|
||||
|
||||
struct ImBuf *BKE_movieclip_get_ibuf(struct MovieClip *clip, struct MovieClipUser *user);
|
||||
struct ImBuf *BKE_movieclip_get_postprocessed_ibuf(struct MovieClip *clip, struct MovieClipUser *user, int postprocess_flag);
|
||||
|
@ -525,6 +525,15 @@ static bool put_imbuf_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, i
|
||||
}
|
||||
}
|
||||
|
||||
static bool moviecache_check_free_proxy(ImBuf *UNUSED(ibuf),
|
||||
void *userkey,
|
||||
void *UNUSED(userdata))
|
||||
{
|
||||
MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *)userkey;
|
||||
|
||||
return !(key->proxy == IMB_PROXY_NONE && key->render_flag == 0);
|
||||
}
|
||||
|
||||
/*********************** common functions *************************/
|
||||
|
||||
/* only image block itself */
|
||||
@ -1167,6 +1176,15 @@ void BKE_movieclip_clear_cache(MovieClip *clip)
|
||||
free_buffers(clip);
|
||||
}
|
||||
|
||||
void BKE_movieclip_clear_proxy_cache(MovieClip *clip)
|
||||
{
|
||||
if (clip->cache && clip->cache->moviecache) {
|
||||
IMB_moviecache_cleanup(clip->cache->moviecache,
|
||||
moviecache_check_free_proxy,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void BKE_movieclip_reload(MovieClip *clip)
|
||||
{
|
||||
/* clear cache */
|
||||
|
@ -1307,7 +1307,14 @@ static void proxy_endjob(void *pjv)
|
||||
if (pj->index_context)
|
||||
IMB_anim_index_rebuild_finish(pj->index_context, pj->stop);
|
||||
|
||||
BKE_movieclip_reload(pj->clip);
|
||||
if (pj->clip->source == MCLIP_SRC_MOVIE) {
|
||||
/* Timecode might have changed, so do a full reload to deal with this. */
|
||||
BKE_movieclip_reload(pj->clip);
|
||||
}
|
||||
else {
|
||||
/* For image sequences we'll preserve original cache. */
|
||||
BKE_movieclip_clear_proxy_cache(pj->clip);
|
||||
}
|
||||
|
||||
WM_main_add_notifier(NC_MOVIECLIP | ND_DISPLAY, pj->clip);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user