[Bf-blender-cvs] [f24992d2ec7] blender-v2.92-release: GPencil: Deactivate interpolation of gpencil curves
Falk David
noreply at git.blender.org
Thu Jan 21 21:59:04 CET 2021
Commit: f24992d2ec76bae600879ee6222ffbcc98de3fe8
Author: Falk David
Date: Thu Jan 21 21:58:39 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rBf24992d2ec76bae600879ee6222ffbcc98de3fe8
GPencil: Deactivate interpolation of gpencil curves
To avoid unexpected behavior and desync issues with
stroke and curve data, the interpolation operators are deactivated
in curve edit mode.
===================================================================
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 1c967110198..b51604f3bfc 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -554,6 +554,13 @@ static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent
return OPERATOR_CANCELLED;
}
+ if (GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) {
+ BKE_report(op->reports,
+ RPT_ERROR,
+ "Cannot interpolate in curve edit mode");
+ return OPERATOR_CANCELLED;
+ }
+
/* need editable strokes */
if (!gpencil_interpolate_check_todo(C, gpd)) {
BKE_report(op->reports, RPT_ERROR, "Interpolation requires some editable strokes");
@@ -978,6 +985,13 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+ if (GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) {
+ BKE_report(op->reports,
+ RPT_ERROR,
+ "Cannot interpolate in curve edit mode");
+ return OPERATOR_CANCELLED;
+ }
+
/* loop all layer to check if need interpolation */
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
bGPDframe *prevFrame, *nextFrame;
More information about the Bf-blender-cvs
mailing list