diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-12-28 19:30:58 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-12-28 19:30:58 +0300 |
commit | 6ecab6dd8e48d564a2b43e0e81e79d079e8b4c77 (patch) | |
tree | 618e2d24eb34a05a81f726dd52eb2b7468e9296d /source/blender/blenkernel/intern/library.c | |
parent | 605263177b8eea24c1449e4dbf0138175ec3dddf (diff) |
Revert particle system and point cache removal in blender2.8 branch.
This reverts commit 5aa19be91263a249ffae75573e3b32f24269d890 and b4a721af694817fa921b119df83d33ede7d7fed0.
Due to postponement of particle system rewrite it was decided to put particle code
back into the 2.8 branch for the time being.
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 4b854289814..038504040d7 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -113,6 +113,7 @@ #include "BKE_node.h" #include "BKE_object.h" #include "BKE_paint.h" +#include "BKE_particle.h" #include "BKE_packedFile.h" #include "BKE_sound.h" #include "BKE_speaker.h" @@ -435,6 +436,9 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool lib_local) case ID_BR: if (!test) BKE_brush_make_local(bmain, (Brush *)id, lib_local); return true; + case ID_PA: + if (!test) BKE_particlesettings_make_local(bmain, (ParticleSettings *)id, lib_local); + return true; case ID_GD: if (!test) BKE_gpencil_make_local(bmain, (bGPdata *)id, lib_local); return true; @@ -539,6 +543,9 @@ bool id_copy(Main *bmain, ID *id, ID **newid, bool test) case ID_BR: if (!test) *newid = (ID *)BKE_brush_copy(bmain, (Brush *)id); return true; + case ID_PA: + if (!test) *newid = (ID *)BKE_particlesettings_copy(bmain, (ParticleSettings *)id); + return true; case ID_GD: if (!test) *newid = (ID *)BKE_gpencil_data_duplicate(bmain, (bGPdata *)id, false); return true; @@ -657,6 +664,8 @@ ListBase *which_libbase(Main *mainlib, short type) return &(mainlib->nodetree); case ID_BR: return &(mainlib->brush); + case ID_PA: + return &(mainlib->particle); case ID_WM: return &(mainlib->wm); case ID_GD: @@ -809,6 +818,7 @@ int set_listbasepointers(Main *main, ListBase **lb) lb[INDEX_ID_PAL] = &(main->palettes); lb[INDEX_ID_PC] = &(main->paintcurves); lb[INDEX_ID_BR] = &(main->brush); + lb[INDEX_ID_PA] = &(main->particle); lb[INDEX_ID_SPK] = &(main->speaker); lb[INDEX_ID_WO] = &(main->world); @@ -919,6 +929,9 @@ void *BKE_libblock_alloc_notest(short type) case ID_BR: id = MEM_callocN(sizeof(Brush), "brush"); break; + case ID_PA: + id = MEM_callocN(sizeof(ParticleSettings), "ParticleSettings"); + break; case ID_WM: id = MEM_callocN(sizeof(wmWindowManager), "Window manager"); break; @@ -1054,6 +1067,9 @@ void BKE_libblock_init_empty(ID *id) case ID_BR: BKE_brush_init((Brush *)id); break; + case ID_PA: + /* Nothing to do. */ + break; case ID_PC: /* Nothing to do. */ break; |