[Bf-blender-cvs] [985dcbf6db1] master: GP: Guides: Fix bug with Mkey and Circular guides
Charlie Jolly
noreply at git.blender.org
Fri Jan 18 16:50:35 CET 2019
Commit: 985dcbf6db1199dc247a2c6bb13c380035a613e6
Author: Charlie Jolly
Date: Fri Jan 18 15:50:16 2019 +0000
Branches: master
https://developer.blender.org/rB985dcbf6db1199dc247a2c6bb13c380035a613e6
GP: Guides: Fix bug with Mkey and Circular guides
Reported by @pepeland.
Adding missing events on the first point was breaking the guide behaviour.
Also, updated Ckey so it always defaults to Circular mode when guides are off.
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 46b3d539477..eaa5345eae1 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -3069,8 +3069,11 @@ static void gpencil_guide_event_handling(bContext *C, wmOperator *op, const wmEv
/* Point guide */
else if ((event->type == CKEY) && (event->val == KM_RELEASE)) {
add_notifier = true;
- guide->use_guide = true;
- if (guide->type == GP_GUIDE_CIRCULAR) {
+ if (!guide->use_guide) {
+ guide->use_guide = true;
+ guide->type = GP_GUIDE_CIRCULAR;
+ }
+ else if (guide->type == GP_GUIDE_CIRCULAR) {
guide->type = GP_GUIDE_RADIAL;
}
else if (guide->type == GP_GUIDE_RADIAL) {
@@ -3632,7 +3635,9 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* handle drawing event */
/* printf("\t\tGP - add point\n"); */
- gpencil_add_missing_events(C, op, event, p);
+ if ((!(p->flags & GP_PAINTFLAG_FIRSTRUN)) && guide->use_guide) {
+ gpencil_add_missing_events(C, op, event, p);
+ }
gpencil_draw_apply_event(C, op, event, CTX_data_depsgraph(C), 0.0f, 0.0f);
More information about the Bf-blender-cvs
mailing list