[Bf-blender-cvs] [c98240139e8] blender-v2.83-release: Fix T76470: GPencil sequence interpolate crash when not enough frames in layer
Antonio Vazquez
noreply at git.blender.org
Wed May 6 12:22:06 CEST 2020
Commit: c98240139e8ebfb5abdcc3734cbd5248cf313644
Author: Antonio Vazquez
Date: Wed May 6 12:21:53 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBc98240139e8ebfb5abdcc3734cbd5248cf313644
Fix T76470: GPencil sequence interpolate crash when not enough frames in layer
If try to interpolate a layer without an active a next frame, the interpolation failed.
Now, check for both frames before start interpolation.
===================================================================
M source/blender/editors/gpencil/gpencil_interpolate.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index b6e84205815..5cb49600d05 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -970,12 +970,16 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
bGPDstroke *gps_from, *gps_to;
int cframe, fFrame;
+ /* Need a set of frames to interpolate. */
+ if ((gpl->actframe == NULL) || (gpl->actframe->next == NULL)) {
+ continue;
+ }
/* all layers or only active */
if (((flag & GP_TOOLFLAG_INTERPOLATE_ALL_LAYERS) == 0) && (gpl != active_gpl)) {
continue;
}
/* only editable and visible layers are considered */
- if (!BKE_gpencil_layer_is_editable(gpl) || (gpl->actframe == NULL)) {
+ if (!BKE_gpencil_layer_is_editable(gpl)) {
continue;
}
More information about the Bf-blender-cvs
mailing list