diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 21:45:57 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 22:30:02 +0300 |
commit | 3c8f22a528b2a2236b8f05ecd69a62e721704944 (patch) | |
tree | 9acf3737166b7363c0eee57d17f196ae39c0230f /source/blender/blenkernel/intern/world.c | |
parent | c3996b792a75b867491c345661c8a5271101866c (diff) |
Use new generic BKE_id_expand_local() for make_local() for image/material/texture/world.
As said in previous commits, did not touch to copy functions for now, due to ntree issues...
Diffstat (limited to 'source/blender/blenkernel/intern/world.c')
-rw-r--r-- | source/blender/blenkernel/intern/world.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 69e89fc9171..8ca30af88d8 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -175,21 +175,6 @@ World *localize_world(World *wrld) return wrldn; } -static int extern_local_world_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 expand_local_world(World *wrld) -{ - BKE_library_foreach_ID_link(&wrld->id, extern_local_world_callback, NULL, 0); -} - void BKE_world_make_local(Main *bmain, World *wrld) { bool is_local = false, is_lib = false; @@ -208,7 +193,7 @@ void BKE_world_make_local(Main *bmain, World *wrld) if (is_local) { if (!is_lib) { id_clear_lib_data(bmain, &wrld->id); - expand_local_world(wrld); + BKE_id_expand_local(&wrld->id, false); } else { World *wrld_new = BKE_world_copy(bmain, wrld); |