Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-07 13:47:00 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-07 13:48:29 +0300
commitb3a7a75a266de6765d8c04953c0dabce3c30c359 (patch)
tree98d27c5eb1d6573235c42e6e4b14137a8cee5c49 /source/blender/python/intern/bpy_rna_anim.c
parent16017178b24c9c84df5c1114fae8dce4796c6c26 (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/python/intern/bpy_rna_anim.c')
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 693ff954993..3eec87593dc 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -40,11 +40,12 @@
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
-#include "BKE_report.h"
-#include "BKE_context.h"
#include "BKE_animsys.h"
+#include "BKE_context.h"
#include "BKE_fcurve.h"
+#include "BKE_global.h"
#include "BKE_idcode.h"
+#include "BKE_report.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
@@ -270,7 +271,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
BKE_reports_init(&reports, RPT_STORE);
- result = insert_keyframe(&reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, keytype, options);
+ result = insert_keyframe(G.main, &reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, keytype, options);
MEM_freeN((void *)path_full);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1)