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-22 13:46:16 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-22 13:46:16 +0300
commit646412004b1da5d6b7b831a5a49022d1fd138e0b (patch)
treec3e2ba99cd4eb8ea312a59efd4ed7a8e9c1c7f28 /source/blender/python/intern/bpy_rna_anim.c
parentb6b7c83dd8e4838d4819c25d95dd01cacf81c8d8 (diff)
parent2fe528424d168f124efca5d94c6b0363be49dbf3 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/makesrna/intern/rna_image.c source/blender/makesrna/intern/rna_object.c source/blender/makesrna/intern/rna_object_force.c source/blender/makesrna/intern/rna_screen.c source/blender/makesrna/intern/rna_sculpt_paint.c source/blender/makesrna/intern/rna_space.c source/blender/python/bmesh/bmesh_py_types.c source/blender/python/generic/bpy_internal_import.h source/blender/python/intern/bpy_rna_anim.c source/blender/python/intern/gpu_offscreen.c
Diffstat (limited to 'source/blender/python/intern/bpy_rna_anim.c')
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 7903f92265b..7012e04628c 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -45,6 +45,7 @@
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_idcode.h"
+#include "BKE_library.h"
#include "BKE_report.h"
#include "RNA_access.h"
@@ -267,13 +268,15 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
return PyBool_FromLong(result);
}
else {
+ ID *id = self->ptr.id.data;
struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext());
ReportList reports;
short result;
BKE_reports_init(&reports, RPT_STORE);
- result = insert_keyframe(G.main, depsgraph, &reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, keytype, options);
+ BLI_assert(BKE_id_is_in_gobal_main(id));
+ result = insert_keyframe(G_MAIN, depsgraph, &reports, id, NULL, group_name, path_full, index, cfra, keytype, options);
MEM_freeN((void *)path_full);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1)