Fix T91056: GPencil merge layers doesn't preseve Keyframe type.
Now if the frame does not exist in destination layer, the frame type of merge layer is used. For existing frames in destination layer, the existing type is not changed.
This commit is contained in:
parent
e76f04c870
commit
e8684eff30
Notes:
blender-bot
2023-02-13 17:48:00 +01:00
Referenced by issue #91056, GPencil: Merging Layers doesn't preserve Keyframe Type.
|
@ -1347,6 +1347,8 @@ static int gpencil_merge_layer_exec(bContext *C, wmOperator *op)
|
|||
bGPDframe *gpf_dst = BLI_ghash_lookup(gh_frames_dst, POINTER_FROM_INT(gpf_src->framenum));
|
||||
if (!gpf_dst) {
|
||||
gpf_dst = BKE_gpencil_layer_frame_get(gpl_dst, gpf_src->framenum, GP_GETFRAME_ADD_COPY);
|
||||
/* Use same frame type. */
|
||||
gpf_dst->key_type = gpf_src->key_type;
|
||||
BLI_ghash_insert(gh_frames_dst, POINTER_FROM_INT(gpf_src->framenum), gpf_dst);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue