Merging r41555 through r41563 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / library.c
index 0b01c3d..119e2e0 100644 (file)
@@ -70,6 +70,7 @@
 #include "DNA_windowmanager_types.h"
 #include "DNA_world_types.h"
 #include "DNA_gpencil_types.h"
+#include "DNA_movieclip_types.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BKE_fcurve.h"
 #include "BKE_speaker.h"
 #include "BKE_utildefines.h"
+#include "BKE_movieclip.h"
 
 #include "RNA_access.h"
 
@@ -484,6 +486,8 @@ ListBase *which_libbase(Main *mainlib, short type)
                        return &(mainlib->wm);
                case ID_GD:
                        return &(mainlib->gpencil);
+               case ID_MC:
+                       return &(mainlib->movieclip);
        }
        return NULL;
 }
@@ -565,6 +569,7 @@ int set_listbasepointers(Main *main, ListBase **lb)
        lb[a++]= &(main->scene);
        lb[a++]= &(main->library);
        lb[a++]= &(main->wm);
+       lb[a++]= &(main->movieclip);
        
        lb[a]= NULL;
 
@@ -673,6 +678,9 @@ static ID *alloc_libblock_notest(short type)
                case ID_GD:
                        id = MEM_callocN(sizeof(bGPdata), "Grease Pencil");
                        break;
+               case ID_MC:
+                       id = MEM_callocN(sizeof(MovieClip), "Movie Clip");
+                       break;
        }
        return id;
 }
@@ -880,6 +888,9 @@ void free_libblock(ListBase *lb, void *idv)
                case ID_GD:
                        free_gpencil_data((bGPdata *)id);
                        break;
+               case ID_MC:
+                       free_movieclip((MovieClip *)id);
+                       break;
        }
 
        if (id->properties) {