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/editors/space_nla/nla_edit.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/editors/space_nla/nla_edit.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index a2159696394..3e7e8ccc3f4 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1856,6 +1856,7 @@ void NLA_OT_action_sync_length(wmOperatorType *ot) static int nlaedit_make_single_user_exec(bContext *C, wmOperator *UNUSED(op)) { + Main *bmain = CTX_data_main(C); bAnimContext ac; ListBase anim_data = {NULL, NULL}; @@ -1887,7 +1888,7 @@ static int nlaedit_make_single_user_exec(bContext *C, wmOperator *UNUSED(op)) /* multi-user? */ if (ID_REAL_USERS(strip->act) > 1) { /* make a new copy of the action for us to use (it will have 1 user already) */ - bAction *new_action = BKE_action_copy(strip->act); + bAction *new_action = BKE_action_copy(bmain, strip->act); /* decrement user count of our existing action */ id_us_min(&strip->act->id); @@ -1945,6 +1946,7 @@ static short bezt_apply_nlamapping(KeyframeEditData *ked, BezTriple *bezt) static int nlaedit_apply_scale_exec(bContext *C, wmOperator *UNUSED(op)) { + Main *bmain = CTX_data_main(C); bAnimContext ac; ListBase anim_data = {NULL, NULL}; @@ -1974,7 +1976,7 @@ static int nlaedit_apply_scale_exec(bContext *C, wmOperator *UNUSED(op)) continue; if (strip->act->id.us > 1) { /* make a copy of the Action to work on */ - bAction *act = BKE_action_copy(strip->act); + bAction *act = BKE_action_copy(bmain, strip->act); /* set this as the new referenced action, decrementing the users of the old one */ id_us_min(&strip->act->id); |