Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyingsets.c
| Show First 20 Lines • Show All 1,114 Lines • ▼ Show 20 Lines | for (ksp = ks->paths.first; ksp; ksp = ksp->next) { | ||||
| /* we should do at least one step */ | /* we should do at least one step */ | ||||
| if (arraylen == i) { | if (arraylen == i) { | ||||
| arraylen++; | arraylen++; | ||||
| } | } | ||||
| /* for each possible index, perform operation | /* for each possible index, perform operation | ||||
| * - assume that arraylen is greater than index | * - assume that arraylen is greater than index | ||||
| */ | */ | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); | |||||
| const AnimationEvalContext anim_eval_context = BKE_animsys_eval_context_construct(depsgraph, | |||||
| cfra); | |||||
| for (; i < arraylen; i++) { | for (; i < arraylen; i++) { | ||||
| /* action to take depends on mode */ | /* action to take depends on mode */ | ||||
| if (mode == MODIFYKEY_MODE_INSERT) { | if (mode == MODIFYKEY_MODE_INSERT) { | ||||
| num_channels += insert_keyframe(bmain, | num_channels += insert_keyframe(bmain, | ||||
| reports, | reports, | ||||
| ksp->id, | ksp->id, | ||||
| act, | act, | ||||
| groupname, | groupname, | ||||
| ksp->rna_path, | ksp->rna_path, | ||||
| i, | i, | ||||
| cfra, | &anim_eval_context, | ||||
| keytype, | keytype, | ||||
| &nla_cache, | &nla_cache, | ||||
| kflag2); | kflag2); | ||||
| } | } | ||||
| else if (mode == MODIFYKEY_MODE_DELETE) { | else if (mode == MODIFYKEY_MODE_DELETE) { | ||||
| num_channels += delete_keyframe(bmain, reports, ksp->id, act, ksp->rna_path, i, cfra); | num_channels += delete_keyframe(bmain, reports, ksp->id, act, ksp->rna_path, i, cfra); | ||||
| } | } | ||||
| } | } | ||||
| Show All 28 Lines | |||||