Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_rna_anim.c
| Show First 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | else if (self->ptr.type == &RNA_NlaStrip) { | ||||
| if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { | if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| return PyBool_FromLong(result); | return PyBool_FromLong(result); | ||||
| } | } | ||||
| else { | else { | ||||
| ID *id = self->ptr.id.data; | ID *id = self->ptr.id.data; | ||||
| struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext()); | |||||
| ReportList reports; | ReportList reports; | ||||
| short result; | short result; | ||||
| BKE_reports_init(&reports, RPT_STORE); | BKE_reports_init(&reports, RPT_STORE); | ||||
| BLI_assert(BKE_id_is_in_global_main(id)); | BLI_assert(BKE_id_is_in_global_main(id)); | ||||
| result = insert_keyframe(G_MAIN, | result = insert_keyframe( | ||||
| depsgraph, | G_MAIN, &reports, id, NULL, group_name, path_full, index, cfra, keytype, NULL, options); | ||||
| &reports, | |||||
| id, | |||||
| NULL, | |||||
| group_name, | |||||
| path_full, | |||||
| index, | |||||
| cfra, | |||||
| keytype, | |||||
| NULL, | |||||
| options); | |||||
| MEM_freeN((void *)path_full); | MEM_freeN((void *)path_full); | ||||
| if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { | if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| return PyBool_FromLong(result); | return PyBool_FromLong(result); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines | |||||