diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-09 22:59:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-09 23:00:53 +0300 |
commit | 9c6fe810a3cae2a5498f5760822b7a7e4a82bf4f (patch) | |
tree | fae726eb9d43fe1bf587bd952506954efd7268e4 /source/blender/editors/space_outliner/outliner_tools.c | |
parent | f761ae8f116909f1d5c92398f8a4812a5fad8ca4 (diff) |
Fake user: add BKE_library helpers to set/clear that flag.
Since it also involves usercount manipulation, safer and cleaner to do it in BKE_library...
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index c0464c84061..313a75f373a 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -421,10 +421,7 @@ static void id_fake_user_set_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeE { ID *id = tselem->id; - if ((id) && ((id->flag & LIB_FAKEUSER) == 0)) { - id->flag |= LIB_FAKEUSER; - id_us_plus(id); - } + id_fake_user_set(id); } static void id_fake_user_clear_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), @@ -432,10 +429,7 @@ static void id_fake_user_clear_cb(bContext *UNUSED(C), Scene *UNUSED(scene), Tre { ID *id = tselem->id; - if ((id) && (id->flag & LIB_FAKEUSER)) { - id->flag &= ~LIB_FAKEUSER; - id_us_min(id); - } + id_fake_user_clear(id); } static void id_select_linked_cb(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), |