svn merge ^/trunk/blender -r47070:47099
[blender.git] / source / blender / blenkernel / intern / library.c
index de67119d85024339ceefefa4d3bd5f90770bf6f0..0abeb48374543848d825202c5001d2e510a0fd8a 100644 (file)
@@ -66,6 +66,7 @@
 #include "DNA_world_types.h"
 #include "DNA_gpencil_types.h"
 #include "DNA_movieclip_types.h"
+#include "DNA_mask_types.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BKE_speaker.h"
 #include "BKE_utildefines.h"
 #include "BKE_movieclip.h"
+#include "BKE_mask.h"
 
 #include "RNA_access.h"
 
@@ -486,6 +488,8 @@ ListBase *which_libbase(Main *mainlib, short type)
                        return &(mainlib->gpencil);
                case ID_MC:
                        return &(mainlib->movieclip);
+               case ID_MSK:
+                       return &(mainlib->mask);
        }
        return NULL;
 }
@@ -569,6 +573,7 @@ int set_listbasepointers(Main *main, ListBase **lb)
        lb[a++] = &(main->library);
        lb[a++] = &(main->wm);
        lb[a++] = &(main->movieclip);
+       lb[a++] = &(main->mask);
        
        lb[a] = NULL;
 
@@ -680,6 +685,9 @@ static ID *alloc_libblock_notest(short type)
                case ID_MC:
                        id = MEM_callocN(sizeof(MovieClip), "Movie Clip");
                        break;
+               case ID_MSK:
+                       id = MEM_callocN(sizeof(Mask), "Mask");
+                       break;
        }
        return id;
 }
@@ -888,6 +896,9 @@ void BKE_libblock_free(ListBase *lb, void *idv)
                case ID_MC:
                        BKE_movieclip_free((MovieClip *)id);
                        break;
+               case ID_MSK:
+                       BKE_mask_free((Mask *)id);
+                       break;
        }
 
        if (id->properties) {