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:
Diffstat (limited to 'source/blender/python/intern/bpy_rna_anim.c')
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 710ae0433e0..fb9454bf108 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -301,7 +301,7 @@ char pyrna_struct_keyframe_insert_doc[] =
" - ``INSERTKEY_VISUAL`` Insert keyframes based on 'visual transforms'.\n"
" - ``INSERTKEY_XYZ_TO_RGB`` Color for newly added transformation F-Curves (Location, "
"Rotation, Scale) is based on the transform axis.\n"
- " - ``INSERTKEY_REPLACE`` Only replace already exising keyframes.\n"
+ " - ``INSERTKEY_REPLACE`` Only replace already existing keyframes.\n"
" - ``INSERTKEY_AVAILABLE`` Only insert into already existing F-Curves.\n"
" - ``INSERTKEY_CYCLE_AWARE`` Take cyclic extrapolation into account "
"(Cycle-Aware Keying option).\n"
@@ -337,7 +337,6 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
* strips themselves. These are stored separately or else the properties will
* not have any effect.
*/
- struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext());
ReportList reports;
short result = 0;
@@ -357,8 +356,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
NlaStrip *strip = (NlaStrip *)ptr.data;
FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
- result = insert_keyframe_direct(
- depsgraph, &reports, ptr, prop, fcu, cfra, keytype, NULL, options);
+ result = insert_keyframe_direct(&reports, ptr, prop, fcu, cfra, keytype, NULL, options);
}
else {
BKE_reportf(&reports, RPT_ERROR, "Could not resolve path (%s)", path_full);
@@ -373,25 +371,14 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
}
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);
BLI_assert(BKE_id_is_in_global_main(id));
- result = insert_keyframe(G_MAIN,
- depsgraph,
- &reports,
- id,
- NULL,
- group_name,
- path_full,
- index,
- cfra,
- keytype,
- NULL,
- options);
+ result = insert_keyframe(
+ G_MAIN, &reports, id, NULL, group_name, path_full, index, cfra, keytype, NULL, options);
MEM_freeN((void *)path_full);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) {