0
0
Fork 0

me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
2 changed files with 11 additions and 1 deletions
Showing only changes of commit dc9f7fe64f - Show all commits

View File

@ -1261,7 +1261,9 @@ bGPDframe *BKE_gpencil_layer_frame_get(bGPDlayer *gpl, int cframe, eGP_GetFrame_
found = true;
break;
}
if ((gpf->next) && (gpf->next->framenum > cframe)) {
/* If this is the last frame or the next frame is at a later time, we found the right
* frame. */
if (!(gpf->next) || (gpf->next->framenum > cframe)) {
found = true;
break;
}

View File

@ -3327,6 +3327,14 @@ void ED_gpencil_layer_merge(bGPdata *gpd,
gpf_dst->key_type = gpf_src->key_type;
BLI_ghash_insert(gh_frames_dst, POINTER_FROM_INT(gpf_src->framenum), gpf_dst);
}
/* Copy current source frame to further frames
* that are keyframes in destination layer and not in source layer
* to keep the image equals. */
if (gpf_dst->next && (!gpf_src->next || (gpf_dst->next->framenum < gpf_src->next->framenum))) {
gpf_dst = gpf_dst->next;
BKE_gpencil_layer_frame_get(gpl_src, gpf_dst->framenum, GP_GETFRAME_ADD_COPY);
}
}
/* Read all frames from merge layer and add strokes. */