Fix T94903: GPencil: Copying keys doesn't preserve Keyframe Type

When a new frame is created, ensure the keytype of source key is used.
This commit is contained in:
Antonio Vazquez 2022-01-14 13:05:50 +01:00 committed by Philipp Oeser
parent caf362422e
commit 4cd881c70f
Notes: blender-bot 2023-02-14 08:35:51 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #94903, GPencil: Copying keys doesn't preserve Keyframe Type
1 changed files with 2 additions and 0 deletions

View File

@ -474,6 +474,8 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode)
/* get frame to copy data into (if no frame returned, then just ignore) */
gpf = BKE_gpencil_layer_frame_get(gpld, gpfs->framenum, GP_GETFRAME_ADD_NEW);
/* Ensure to use same keyframe type. */
gpf->key_type = gpfs->key_type;
if (gpf) {
bGPDstroke *gps, *gpsn;