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/curve.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/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 0e634e21ea3..fa7dac5d432 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -215,11 +215,11 @@ Curve *BKE_curve_copy(Main *bmain, Curve *cu) return cun; } -void BKE_curve_make_local(Main *bmain, Curve *cu) +void BKE_curve_make_local(Main *bmain, Curve *cu, const bool force_local) { bool is_local = false, is_lib = false; - /* - when there are only lib users: don't do + /* - only lib users: do nothing (unless force_local is set) * - when there are only local users: set flag * - mixed: do a copy */ @@ -230,11 +230,11 @@ void BKE_curve_make_local(Main *bmain, Curve *cu) BKE_library_ID_test_usages(bmain, cu, &is_local, &is_lib); - if (is_local) { + if (force_local || is_local) { if (!is_lib) { id_clear_lib_data(bmain, &cu->id); if (cu->key) { - BKE_key_make_local(bmain, cu->key); + BKE_key_make_local(bmain, cu->key, force_local); } BKE_id_expand_local(&cu->id); } |