diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-10 15:52:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-10 15:52:00 +0300 |
commit | 87b974caa1e2b780c8031d67a42488039036c489 (patch) | |
tree | 6776b8d35f25b2c458f90e0ba4cfa497782ebc30 /source/blender/blenkernel/intern/action.c | |
parent | ae2033aca2047afbfe0bf449bcd01b5b79a124b8 (diff) |
Cleanup/Refactor: pass Main pointer to all ID copy functions.
Also allows us to get rid of a few _copy_ex() versions...
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 9d6b2a05681..5ac80ae1b7c 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -148,7 +148,7 @@ void BKE_action_make_local(bAction *act) id_clear_lib_data(bmain, &act->id); } else if (mlac.is_local && mlac.is_lib) { - mlac.act_new = BKE_action_copy(act); + mlac.act_new = BKE_action_copy(bmain, act); mlac.act_new->id.us = 0; BKE_id_lib_local_paths(bmain, act->id.lib, &mlac.act_new->id); @@ -176,7 +176,7 @@ void BKE_action_free(bAction *act) /* .................................. */ -bAction *BKE_action_copy(bAction *src) +bAction *BKE_action_copy(Main *bmain, bAction *src) { bAction *dst = NULL; bActionGroup *dgrp, *sgrp; @@ -184,7 +184,7 @@ bAction *BKE_action_copy(bAction *src) if (src == NULL) return NULL; - dst = BKE_libblock_copy(&src->id); + dst = BKE_libblock_copy(bmain, &src->id); /* duplicate the lists of groups and markers */ BLI_duplicatelist(&dst->groups, &src->groups); @@ -214,7 +214,7 @@ bAction *BKE_action_copy(bAction *src) } if (ID_IS_LINKED_DATABLOCK(src)) { - BKE_id_lib_local_paths(G.main, src->id.lib, &dst->id); + BKE_id_lib_local_paths(bmain, src->id.lib, &dst->id); } return dst; |