diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-14 14:03:22 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-14 19:33:12 +0300 |
commit | f87603662d03bf908094ed7a7f002a07bf13be38 (patch) | |
tree | 0c16ff1a26bd3ceffd4a9cbf7044c77b19797f24 /source/blender/blenkernel/intern/action.c | |
parent | f2509e764e3be417c6a400e56be75dce9b6acde5 (diff) |
Add option to id_make_local to force localization of datablock, even if not used locally.
Will be used by link/append code.
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index f7ff1261c8a..fa49797126d 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -95,11 +95,11 @@ bAction *add_empty_action(Main *bmain, const char name[]) /* .................................. */ // does copy_fcurve... -void BKE_action_make_local(Main *bmain, bAction *act) +void BKE_action_make_local(Main *bmain, bAction *act, const bool force_local) { bool is_local = false, is_lib = false; - /* - only lib users: do nothing + /* - only lib users: do nothing (unless force_local is set) * - only local users: set flag * - mixed: make copy */ @@ -110,7 +110,7 @@ void BKE_action_make_local(Main *bmain, bAction *act) BKE_library_ID_test_usages(bmain, act, &is_local, &is_lib); - if (is_local) { + if (force_local || is_local) { if (!is_lib) { id_clear_lib_data(bmain, &act->id); BKE_id_expand_local(&act->id); |