diff options
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index b4bb07f0d3a..79b3c0b49d0 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -45,6 +45,7 @@ #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_brush_types.h" +#include "DNA_cache_library_types.h" #include "DNA_camera_types.h" #include "DNA_group_types.h" #include "DNA_gpencil_types.h" @@ -79,6 +80,7 @@ #include "BKE_armature.h" #include "BKE_bpath.h" #include "BKE_brush.h" +#include "BKE_cache_library.h" #include "BKE_camera.h" #include "BKE_context.h" #include "BKE_curve.h" @@ -107,6 +109,7 @@ #include "BKE_paint.h" #include "BKE_particle.h" #include "BKE_packedFile.h" +#include "BKE_pointcache.h" #include "BKE_speaker.h" #include "BKE_sound.h" #include "BKE_screen.h" @@ -411,6 +414,10 @@ bool id_unlink(ID *id, int test) if (test) return true; BKE_object_unlink((Object *)id); break; + case ID_CL: + if (test) return true; + BKE_cache_library_unlink((CacheLibrary *)id); + break; } if (id->us == 0) { @@ -523,6 +530,8 @@ ListBase *which_libbase(Main *mainlib, short type) return &(mainlib->palettes); case ID_PC: return &(mainlib->paintcurves); + case ID_CL: + return &(mainlib->cache_library); } return NULL; } @@ -620,6 +629,7 @@ int set_listbasepointers(Main *main, ListBase **lb) lb[a++] = &(main->linestyle); /* referenced by scenes */ lb[a++] = &(main->scene); lb[a++] = &(main->library); + lb[a++] = &(main->cache_library); lb[a++] = &(main->wm); lb[a++] = &(main->mask); @@ -751,6 +761,9 @@ static ID *alloc_libblock_notest(short type) case ID_PC: id = MEM_callocN(sizeof(PaintCurve), "Paint Curve"); break; + case ID_CL: + id = MEM_callocN(sizeof(CacheLibrary), "Cache Library"); + break; } return id; } @@ -1039,6 +1052,9 @@ void BKE_libblock_free_ex(Main *bmain, void *idv, bool do_id_user) case ID_PC: BKE_paint_curve_free((PaintCurve *)id); break; + case ID_CL: + BKE_cache_library_free((CacheLibrary *)id); + break; } /* avoid notifying on removed data */ |