[Bf-blender-cvs] [c6ff9d71642] greasepencil-object: Avoid fill with color without fill enabled
Antonio Vazquez
noreply at git.blender.org
Sat Dec 30 12:53:09 CET 2017
Commit: c6ff9d716423ae397289d2fe578b9bf8ca59f530
Author: Antonio Vazquez
Date: Sat Dec 30 12:04:05 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rBc6ff9d716423ae397289d2fe578b9bf8ca59f530
Avoid fill with color without fill enabled
===================================================================
M source/blender/editors/gpencil/gpencil_fill.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 7abd6d9da09..1f6af3768f1 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -790,6 +790,13 @@ static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *event
tgpf = op->customdata;
}
+ /* Must use a color with pill */
+ if (tgpf->palcolor->fill[3] < GPENCIL_ALPHA_OPACITY_THRESH) {
+ BKE_report(op->reports, RPT_ERROR, "The current color must have fill enabled");
+ return OPERATOR_CANCELLED;
+ }
+
+
/* Enable custom drawing handlers */
tgpf->draw_handle_3d = ED_region_draw_cb_activate(tgpf->ar->type, gpencil_fill_draw_3d, tgpf, REGION_DRAW_POST_VIEW);
More information about the Bf-blender-cvs
mailing list