From f79b4850fb3c29bf2a153428b1b4d4b5f67121f9 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 29 Sep 2020 10:52:10 +0200 Subject: Fix T81248: World nodetree action is linked after duplication This was already changed for Material nodetrees on duplication in rBa75ac18638f4. Since it is not obvious from the UI how change World actions - and to be consistent with Material actions, it is best to copy the action as the default behavior. So use generic BKE_id_copy functions with LIB_ID_COPY_ACTIONS flag [which also enables us to get rid of `BKE_world_copy`] Note: taking the User Preference `USER_DUP_ACT` into account here (for both material and world actions) could be a followup step. Maniphest Tasks: T81248 Differential Revision: https://developer.blender.org/D9046 --- source/blender/blenkernel/intern/world.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'source/blender/blenkernel/intern/world.c') diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 99f35d06c1d..d5142e2d1a4 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -210,13 +210,6 @@ World *BKE_world_add(Main *bmain, const char *name) return wrld; } -World *BKE_world_copy(Main *bmain, const World *wrld) -{ - World *wrld_copy; - BKE_id_copy(bmain, &wrld->id, (ID **)&wrld_copy); - return wrld_copy; -} - World *BKE_world_localize(World *wrld) { /* TODO(bastien): Replace with something like: -- cgit v1.2.3