forked from blender/blender
me-main #1
@ -1261,7 +1261,9 @@ bGPDframe *BKE_gpencil_layer_frame_get(bGPDlayer *gpl, int cframe, eGP_GetFrame_
|
|||||||
found = true;
|
found = true;
|
||||||
break;
|
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;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3327,6 +3327,14 @@ void ED_gpencil_layer_merge(bGPdata *gpd,
|
|||||||
gpf_dst->key_type = gpf_src->key_type;
|
gpf_dst->key_type = gpf_src->key_type;
|
||||||
BLI_ghash_insert(gh_frames_dst, POINTER_FROM_INT(gpf_src->framenum), gpf_dst);
|
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. */
|
/* Read all frames from merge layer and add strokes. */
|
||||||
|
Loading…
Reference in New Issue
Block a user