diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 13:47:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 13:48:29 +0300 |
commit | b3a7a75a266de6765d8c04953c0dabce3c30c359 (patch) | |
tree | 98d27c5eb1d6573235c42e6e4b14137a8cee5c49 /source/blender/editors/animation/keyframes_general.c | |
parent | 16017178b24c9c84df5c1114fae8dce4796c6c26 (diff) |
Cleanup: remove moar G.main usages.
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
Diffstat (limited to 'source/blender/editors/animation/keyframes_general.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_general.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index f8af504f1ed..a6ed6643257 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -48,6 +48,7 @@ #include "BKE_fcurve.h" #include "BKE_report.h" #include "BKE_library.h" +#include "BKE_main.h" #include "BKE_global.h" #include "BKE_deform.h" @@ -729,7 +730,8 @@ static tAnimCopybufItem *pastebuf_match_path_full(FCurve *fcu, const short from_ } /* medium match strictness: path match only (i.e. ignore ID) */ -static tAnimCopybufItem *pastebuf_match_path_property(FCurve *fcu, const short from_single, const short UNUSED(to_simple)) +static tAnimCopybufItem *pastebuf_match_path_property( + Main *bmain, FCurve *fcu, const short from_single, const short UNUSED(to_simple)) { tAnimCopybufItem *aci; @@ -742,7 +744,7 @@ static tAnimCopybufItem *pastebuf_match_path_property(FCurve *fcu, const short f * resolve, or a bone could be renamed after copying for eg. but in normal copy & paste * this should work out ok. */ - if (BLI_findindex(which_libbase(G.main, aci->id_type), aci->id) == -1) { + if (BLI_findindex(which_libbase(bmain, aci->id_type), aci->id) == -1) { /* pedantic but the ID could have been removed, and beats crashing! */ printf("paste_animedit_keys: error ID has been removed!\n"); } @@ -996,7 +998,7 @@ short paste_animedit_keys(bAnimContext *ac, ListBase *anim_data, case 1: /* less strict, just compare property names */ - aci = pastebuf_match_path_property(fcu, from_single, to_simple); + aci = pastebuf_match_path_property(ac->bmain, fcu, from_single, to_simple); break; case 2: |