diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
commit | b9898ebde44d6584ea37a05aaeca8760d31ccc7b (patch) | |
tree | e6dfc796cc82b4b8b8c248c4ff29d2e2047ff84c /source/blender/blenkernel/intern/movieclip.c | |
parent | b17380971a144896b34b7863a82bbda3ff68a39f (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 6bc83f8dd09..f67bc419210 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -53,6 +53,7 @@ #include "BKE_animsys.h" #include "BKE_colortools.h" +#include "BKE_global.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_movieclip.h" @@ -1772,9 +1773,17 @@ static void movieclip_selection_synchronize(MovieClip *clip_dst, const MovieClip } } -void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, MovieClip *clip) +static void movieclip_eval_update_reload(struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip) +{ + BKE_movieclip_reload(bmain, clip); + if (DEG_is_active(depsgraph)) { + MovieClip *clip_orig = (MovieClip *)DEG_get_original_id(&clip->id); + BKE_movieclip_reload(bmain, clip_orig); + } +} + +static void movieclip_eval_update_generic(struct Depsgraph *depsgraph, MovieClip *clip) { - DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip); BKE_tracking_dopesheet_tag_update(&clip->tracking); if (DEG_is_active(depsgraph)) { MovieClip *clip_orig = (MovieClip *)DEG_get_original_id(&clip->id); @@ -1782,6 +1791,17 @@ void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, MovieClip *clip) } } +void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, Main *bmain, MovieClip *clip) +{ + DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip); + if (clip->id.recalc & ID_RECALC_SOURCE) { + movieclip_eval_update_reload(depsgraph, bmain, clip); + } + else { + movieclip_eval_update_generic(depsgraph, clip); + } +} + void BKE_movieclip_eval_selection_update(struct Depsgraph *depsgraph, MovieClip *clip) { DEG_debug_print_eval(depsgraph, __func__, clip->id.name, clip); |