Depsgraph: remove EvaluationContext, pass Depsgraph instead.
[blender.git] / source / blender / blenkernel / intern / library.c
index e0608efece21037b5125c5221160a299d549ba23..c0eb9e770875b5a685835402e81ccae051f75b1a 100644 (file)
@@ -840,6 +840,7 @@ void BKE_libblock_management_main_add(Main *bmain, void *idv)
        new_id(lb, id, NULL);
        /* alphabetic insertion: is in new_id */
        id->tag &= ~(LIB_TAG_NO_MAIN | LIB_TAG_NO_USER_REFCOUNT);
+       bmain->is_memfile_undo_written = false;
        BKE_main_unlock(bmain);
 }
 
@@ -859,6 +860,7 @@ void BKE_libblock_management_main_remove(Main *bmain, void *idv)
        BKE_main_lock(bmain);
        BLI_remlink(lb, id);
        id->tag |= LIB_TAG_NO_MAIN;
+       bmain->is_memfile_undo_written = false;
        BKE_main_unlock(bmain);
 }
 
@@ -1229,6 +1231,7 @@ void *BKE_libblock_alloc(Main *bmain, short type, const char *name, const int fl
                        BKE_main_lock(bmain);
                        BLI_addtail(lb, id);
                        new_id(lb, id, name);
+                       bmain->is_memfile_undo_written = false;
                        /* alphabetic insertion: is in new_id */
                        BKE_main_unlock(bmain);
 
@@ -1463,7 +1466,6 @@ void BKE_library_free(Library *lib)
 Main *BKE_main_new(void)
 {
        Main *bmain = MEM_callocN(sizeof(Main), "new main");
-       bmain->eval_ctx = DEG_evaluation_context_new(DAG_EVAL_VIEWPORT);
        bmain->lock = MEM_mallocN(sizeof(SpinLock), "main lock");
        BLI_spin_init((SpinLock *)bmain->lock);
        return bmain;
@@ -1538,7 +1540,6 @@ void BKE_main_free(Main *mainvar)
 
        BLI_spin_end((SpinLock *)mainvar->lock);
        MEM_freeN(mainvar->lock);
-       DEG_evaluation_context_free(mainvar->eval_ctx);
        MEM_freeN(mainvar);
 }