diff options
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 970eae0ad14..4afec844f6d 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -82,6 +82,8 @@ #include "PIL_time.h" +#include "DEG_depsgraph_build.h" + #include "clip_intern.h" // own include /******************** view navigation utilities *********************/ @@ -247,6 +249,7 @@ static int open_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_MOVIECLIP | NA_ADDED, clip); + DEG_relations_tag_update(bmain); MEM_freeN(op->customdata); return OPERATOR_FINISHED; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 3f1e9ae7f7d..52b953549ba 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -86,6 +86,7 @@ #include "BKE_linestyle.h" #include "BKE_workspace.h" +#include "DEG_depsgraph_build.h" #include "DEG_depsgraph_query.h" #include "DNA_armature_types.h" @@ -556,9 +557,13 @@ static MovieClip *rna_Main_movieclip_load(Main *bmain, ReportList *reports, cons clip = BKE_movieclip_file_add(bmain, filepath); } - if (!clip) + if (clip != NULL) { + DEG_relations_tag_update(bmain); + } + else { BKE_reportf(reports, RPT_ERROR, "Cannot read '%s': %s", filepath, errno ? strerror(errno) : TIP_("unable to load movie clip")); + } id_us_min((ID *)clip); return clip; |