diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-04 13:42:15 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-04 13:43:31 +0300 |
commit | 4bfa256ea48e51643f848e8dfdaeab615f7b1a88 (patch) | |
tree | 996d59300eeff16f1063a6be8887aaa3cfcb4299 /source/blender/blenkernel/intern/object.c | |
parent | 4e597a5cff6bb4195b8fc9c8102bfbdc4958b31f (diff) |
Refactor ID make local to use a single flag parameter.
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index e9aec7201e2..8d9bffa1637 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1741,11 +1741,10 @@ Object *BKE_object_duplicate(Main *bmain, const Object *ob, const int dupflag) return obn; } -void BKE_object_make_local_ex(Main *bmain, - Object *ob, - const bool lib_local, - const bool clear_proxy) +void BKE_object_make_local(Main *bmain, Object *ob, const int flags) { + const bool lib_local = (flags & LIB_ID_MAKELOCAL_FULL_LIBRARY) != 0; + const bool clear_proxy = (flags & LIB_ID_MAKELOCAL_OBJECT_NO_PROXY_CLEARING) == 0; bool is_local = false, is_lib = false; /* - only lib users: do nothing (unless force_local is set) @@ -1789,11 +1788,6 @@ void BKE_object_make_local_ex(Main *bmain, } } -void BKE_object_make_local(Main *bmain, Object *ob, const bool lib_local) -{ - BKE_object_make_local_ex(bmain, ob, lib_local, true); -} - /* Returns true if the Object is from an external blend file (libdata) */ bool BKE_object_is_libdata(const Object *ob) { |