diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-05 15:18:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-05 15:18:33 +0400 |
commit | 36fc4e15f69f4150812408b32a9052017590eb8b (patch) | |
tree | 84e1bdf0728fa8e4640ea683781a665fc612afeb /source/blender/editors/sculpt_paint/paint_vertex.c | |
parent | fc9626b1df5f9a05673199e82f4aafd1f4d42d08 (diff) |
Fix for vpaint_stroke_test_start returning operator flags, not bool
also use bools for paint callbacks
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index a1ce39a4833..d97eb223c3d 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2196,7 +2196,7 @@ static bool wpaint_ensure_data(bContext *C, wmOperator *op) return TRUE; } -static int wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNUSED(mouse[2])) +static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNUSED(mouse[2])) { Scene *scene = CTX_data_scene(C); struct PaintStroke *stroke = op->customdata; @@ -2779,7 +2779,7 @@ static void vpaint_build_poly_facemap(struct VPaintData *vd, Mesh *me) tessface_origindex, me->totface); } -static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const float UNUSED(mouse[2])) +static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const float UNUSED(mouse[2])) { ToolSettings *ts = CTX_data_tool_settings(C); struct PaintStroke *stroke = op->customdata; @@ -2793,12 +2793,12 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const fl /* context checks could be a poll() */ me = BKE_mesh_from_object(ob); if (me == NULL || me->totpoly == 0) - return OPERATOR_PASS_THROUGH; + return false; if (me->mloopcol == NULL) make_vertexcol(ob); if (me->mloopcol == NULL) - return OPERATOR_CANCELLED; + return false; /* Update tessface data if needed * Added here too because e.g. switching to/from edit mode would remove tessface data, |