diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_main.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 16 |
2 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 30cf800a3d8..6881bdfdb2c 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -77,6 +77,7 @@ typedef struct Main { ListBase brush; ListBase particle; ListBase wm; + ListBase gpencil; } Main; diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 0712b53c5dd..5728b844a88 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -79,6 +79,7 @@ #include "DNA_space_types.h" #include "DNA_windowmanager_types.h" #include "DNA_anim_types.h" +#include "DNA_gpencil_types.h" #include "BLI_blenlib.h" #include "BLI_dynstr.h" @@ -114,6 +115,7 @@ #include "BKE_brush.h" #include "BKE_idprop.h" #include "BKE_particle.h" +#include "BKE_gpencil.h" #define MAX_IDPUP 60 /* was 24 */ @@ -199,6 +201,8 @@ ListBase *wich_libbase(Main *mainlib, short type) return &(mainlib->particle); case ID_WM: return &(mainlib->wm); + case ID_GD: + return &(mainlib->gpencil); } return 0; } @@ -269,6 +273,7 @@ int set_listbasepointers(Main *main, ListBase **lb) lb[a++]= &(main->scene); lb[a++]= &(main->library); lb[a++]= &(main->wm); + lb[a++]= &(main->gpencil); lb[a]= NULL; @@ -374,6 +379,9 @@ static ID *alloc_libblock_notest(short type) case ID_WM: id = MEM_callocN(sizeof(wmWindowManager), "Window manager"); break; + case ID_GD: + id = MEM_callocN(sizeof(bGPdata), "Grease Pencil"); + break; } return id; } @@ -577,6 +585,9 @@ void free_libblock(ListBase *lb, void *idv) if(free_windowmanager_cb) free_windowmanager_cb(NULL, (wmWindowManager *)id); break; + case ID_GD: + free_gpencil_data((bGPdata *)id); + break; } if (id->properties) { @@ -986,14 +997,15 @@ static void lib_indirect_test_id(ID *id) if(id->lib) return; - + if(GS(id->name)==ID_OB) { Object *ob= (Object *)id; bActionStrip *strip; Mesh *me; int a; - + + // XXX old animation system! for (strip=ob->nlastrips.first; strip; strip=strip->next){ LIBTAG(strip->object); LIBTAG(strip->act); |