From b1566742516a66d2b68ebb4bacb6802582c09489 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 21 Jul 2016 16:09:08 +0200 Subject: Fix missing datablocks types in id_make_local. Adding make_local for vfont/gpencil/group/freestyle linestyle/mask/scene/sound/text. Note that there are still some lose ends here, since some type are not handled by id_copy (Scene, Sound and VFont), which means in case a datablock of that type is used both directly and indirectly, localization will fail. Scene copying might be doable though (maybe with a simple new 'full shalow' mode to existing BKE_scene_copy?), not sure about sounds and vfonts... Situations where this becomes an issue should be very rare corner cases anyway. --- source/blender/blenkernel/intern/gpencil.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenkernel/intern/gpencil.c') diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index ac4f566dc62..8621da0d42e 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -390,6 +390,11 @@ bGPdata *gpencil_data_duplicate(Main *bmain, bGPdata *src, bool internal_copy) return dst; } +void BKE_gpencil_make_local(Main *bmain, bGPdata *gpd, const bool lib_local) +{ + BKE_id_make_local_generic(bmain, &gpd->id, true, lib_local); +} + /* -------- GP-Stroke API --------- */ /* ensure selection status of stroke is in sync with its points */ -- cgit v1.2.3