[Bf-blender-cvs] [64f6750fce9] asset-greasepencil: GPencil: Fix compiler errors after merge
Antonio Vazquez
noreply at git.blender.org
Thu Mar 24 11:40:28 CET 2022
Commit: 64f6750fce97c92d64dec28c834793f588c97d0c
Author: Antonio Vazquez
Date: Thu Mar 24 11:40:13 2022 +0100
Branches: asset-greasepencil
https://developer.blender.org/rB64f6750fce97c92d64dec28c834793f588c97d0c
GPencil: Fix compiler errors after merge
The event parameters have changed
===================================================================
M source/blender/editors/gpencil/gpencil_asset.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_asset.c b/source/blender/editors/gpencil/gpencil_asset.c
index 664f215666b..7f144d4da97 100644
--- a/source/blender/editors/gpencil/gpencil_asset.c
+++ b/source/blender/editors/gpencil/gpencil_asset.c
@@ -1393,6 +1393,7 @@ static int gpencil_asset_import_modal(bContext *C, wmOperator *op, const wmEvent
{
tGPDasset *tgpa = op->customdata;
wmWindow *win = CTX_wm_window(C);
+ bool shift = (event->modifier & KM_SHIFT) != 0;
switch (event->type) {
case LEFTMOUSE: {
@@ -1471,7 +1472,7 @@ static int gpencil_asset_import_modal(bContext *C, wmOperator *op, const wmEvent
case MOUSEMOVE: {
/* Apply transform. */
if (tgpa->flag & GP_ASSET_FLAG_TRANSFORMING) {
- gpencil_asset_transform_strokes(tgpa, event->mval, event->shift);
+ gpencil_asset_transform_strokes(tgpa, event->mval, shift);
gpencil_2d_cage_calc(tgpa);
ED_area_tag_redraw(tgpa->area);
}
@@ -1488,10 +1489,10 @@ static int gpencil_asset_import_modal(bContext *C, wmOperator *op, const wmEvent
/* Flip. */
tgpa->flag &= ~GP_ASSET_FLAG_IDLE;
tgpa->flag |= GP_ASSET_FLAG_TRANSFORMING;
- tgpa->manipulator_index = (event->shift) ? CAGE_FLIP_VERT : CAGE_FLIP_HORZ;
+ tgpa->manipulator_index = (shift) ? CAGE_FLIP_VERT : CAGE_FLIP_HORZ;
tgpa->mode = GP_ASSET_TRANSFORM_SCALE;
- gpencil_asset_transform_strokes(tgpa, event->mval, event->shift);
+ gpencil_asset_transform_strokes(tgpa, event->mval, shift);
gpencil_2d_cage_calc(tgpa);
ED_area_tag_redraw(tgpa->area);
More information about the Bf-blender-cvs
mailing list