[Bf-blender-cvs] [9ee08542a21] temp-gpencil-bezier-stroke-type: GPencil: Extrude curves
Falk David
noreply at git.blender.org
Mon Mar 15 00:36:25 CET 2021
Commit: 9ee08542a21bb9a611b47a6dbc711749f5e1cf9b
Author: Falk David
Date: Sun Mar 14 17:05:08 2021 +0100
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rB9ee08542a21bb9a611b47a6dbc711749f5e1cf9b
GPencil: Extrude curves
Just use the new macro to check if the stroke is of type bezier.
===================================================================
M source/blender/editors/gpencil/gpencil_edit.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 68b712f0f24..007a8e8f7e6 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1401,9 +1401,7 @@ static int gpencil_extrude_exec(bContext *C, wmOperator *op)
{
Object *obact = CTX_data_active_object(C);
bGPdata *gpd = (bGPdata *)obact->data;
- const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd);
const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);
- bGPDstroke *gps = NULL;
if (gpd == NULL) {
BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data");
@@ -1420,16 +1418,13 @@ static int gpencil_extrude_exec(bContext *C, wmOperator *op)
continue;
}
- for (gps = gpf->strokes.first; gps; gps = gps->next) {
+ LISTBASE_FOREACH(bGPDstroke *, gps, &gpf->strokes) {
/* skip strokes that are invalid for current view */
if (ED_gpencil_stroke_can_use(C, gps) == false) {
continue;
}
- if (is_curve_edit) {
- if (gps->editcurve == NULL) {
- continue;
- }
+ if (GPENCIL_STROKE_TYPE_BEZIER(gps)) {
bGPDcurve *gpc = gps->editcurve;
if (gpc->flag & GP_CURVE_SELECT) {
gpencil_curve_extrude_points(gpd, gpf, gps, gpc);
More information about the Bf-blender-cvs
mailing list