From b3a7a75a266de6765d8c04953c0dabce3c30c359 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 7 Jun 2018 12:47:00 +0200 Subject: 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 ;) --- source/blender/editors/space_graph/graph_edit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 0370a9149bf..0b8e89160b7 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -54,11 +54,12 @@ #include "BLT_translation.h" +#include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" +#include "BKE_main.h" #include "BKE_nla.h" -#include "BKE_context.h" #include "BKE_report.h" #include "UI_view2d.h" @@ -607,7 +608,8 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) * up adding the keyframes on a new F-Curve in the action data instead. */ if (ale->id && !ale->owner && !fcu->driver) { - insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, ts->keyframe_type, flag); + insert_keyframe(ac->bmain, reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), + fcu->rna_path, fcu->array_index, cfra, ts->keyframe_type, flag); } else { const float curval = evaluate_fcurve(fcu, cfra); -- cgit v1.2.3