diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 20:44:14 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 22:30:02 +0300 |
commit | eac7faa0e6a91ba17dcaad78c581e2061fd000e6 (patch) | |
tree | b950c84a4e8e296b8c34ee483d7e6d7b379dcf88 /source/blender/blenkernel/intern | |
parent | 13f0b59f1180042b07f439d36841a52a6ddcd75e (diff) |
Use new generic BKE_id_expand_local() for make_local() for nodetree.
Did not changed ntree copy for now, this func is a mess of expand/non-expand/bmain/non-bmain cases...
Keep it for later!
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index b1882722162..75c323ad04e 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1950,21 +1950,6 @@ bNodeTree *ntreeFromID(ID *id) } } -static int extern_local_ntree_callback( - void *UNUSED(user_data), struct ID *UNUSED(id_self), struct ID **id_pointer, int cd_flag) -{ - /* We only tag usercounted ID usages as extern... Why? */ - if ((cd_flag & IDWALK_USER) && *id_pointer) { - id_lib_extern(*id_pointer); - } - return IDWALK_RET_NOP; -} - -static void extern_local_ntree(bNodeTree *ntree) -{ - BKE_library_foreach_ID_link(&ntree->id, extern_local_ntree_callback, NULL, 0); -} - void ntreeMakeLocal(Main *bmain, bNodeTree *ntree, bool id_in_mainlist) { bool is_lib = false, is_local = false; @@ -1983,7 +1968,7 @@ void ntreeMakeLocal(Main *bmain, bNodeTree *ntree, bool id_in_mainlist) if (is_local) { if (!is_lib) { id_clear_lib_data_ex(bmain, (ID *)ntree, id_in_mainlist); - extern_local_ntree(ntree); + BKE_id_expand_local(&ntree->id, false); } else { bNodeTree *ntree_new = ntreeCopyTree(bmain, ntree); |