diff options
author | Bastien Montagne <bastien@blender.org> | 2021-09-16 13:41:21 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-09-16 15:30:56 +0300 |
commit | 3deb56424f2927ffe8a7ca8ef3de3fa5bc56e304 (patch) | |
tree | 29664df489b39f2f2d3278d19a3679de93fd8081 /source/blender | |
parent | e04a10adabea33cf4b3f92e721f86fdbd50c8ac5 (diff) |
Cleanup/Fix outliner 'make local' code.
While likely harmless, this code was doing extremely bad thing,
by-passing the whole lower-level `BKE_lib_id_make_local` call in case it
would fail and deciding by itself to forcefully make the given ID local.
Bad. Very, very, very bad.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 062d98c93af..9e314701719 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -737,13 +737,8 @@ static void id_local_fn(bContext *C, { if (ID_IS_LINKED(tselem->id) && (tselem->id->tag & LIB_TAG_EXTERN)) { Main *bmain = CTX_data_main(C); - /* if the ID type has no special local function, - * just clear the lib */ - if (!BKE_lib_id_make_local(bmain, tselem->id, 0)) { - BKE_lib_id_clear_library_data(bmain, tselem->id); - } - else { - BKE_main_id_newptr_and_tag_clear(bmain); + if (BKE_lib_id_make_local(bmain, tselem->id, 0)) { + BKE_id_newptr_and_tag_clear(tselem->id); } } else if (ID_IS_OVERRIDE_LIBRARY_REAL(tselem->id)) { |