diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-21 11:35:50 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-21 11:37:23 +0300 |
commit | 3bb53b0ee640e744219e2a38207d1fbc76ca2068 (patch) | |
tree | b84afd5a022be12f02ce36c17e867fbdd0dcd266 /source/blender/editors/sculpt_paint/paint_image.c | |
parent | 213445e3896922c2278fc7cdcb74d8ca13fa6a3e (diff) |
Cleanup: Sculpt/Paint ED code: correct return constant types.
Mainly use false/true for bool, but also a few others.
No change in behavior expected.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d2ae6912fc3..6bdc072ff64 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -275,13 +275,13 @@ static bool image_paint_poll_ex(bContext *C, bool check_tool) Object *obact; if (!image_paint_brush(C)) { - return 0; + return false; } obact = CTX_data_active_object(C); if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) && CTX_wm_region_view3d(C)) { if (!check_tool || WM_toolsystem_active_tool_is_brush(C)) { - return 1; + return true; } } else { @@ -291,12 +291,12 @@ static bool image_paint_poll_ex(bContext *C, bool check_tool) ARegion *region = CTX_wm_region(C); if ((sima->mode == SI_MODE_PAINT) && region->regiontype == RGN_TYPE_WINDOW) { - return 1; + return true; } } } - return 0; + return false; } static bool image_paint_poll(bContext *C) @@ -316,12 +316,12 @@ static bool image_paint_2d_clone_poll(bContext *C) if (!CTX_wm_region_view3d(C) && image_paint_poll(C)) { if (brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE)) { if (brush->clone.image) { - return 1; + return true; } } } - return 0; + return false; } /************************ paint operator ************************/ @@ -769,13 +769,13 @@ bool get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy) if (sima->mode == SI_MODE_PAINT) { ARegion *region = CTX_wm_region(C); ED_space_image_get_zoom(sima, region, zoomx, zoomy); - return 1; + return true; } } *zoomx = *zoomy = 1; - return 0; + return false; } /************************ cursor drawing *******************************/ @@ -1211,13 +1211,13 @@ static bool texture_paint_toggle_poll(bContext *C) { Object *ob = CTX_data_active_object(C); if (ob == NULL || ob->type != OB_MESH) { - return 0; + return false; } if (!ob->data || ID_IS_LINKED(ob->data)) { - return 0; + return false; } - return 1; + return true; } static int texture_paint_toggle_exec(bContext *C, wmOperator *op) @@ -1346,11 +1346,11 @@ static bool texture_paint_poll(bContext *C) { if (texture_paint_toggle_poll(C)) { if (CTX_data_active_object(C)->mode & OB_MODE_TEXTURE_PAINT) { - return 1; + return true; } } - return 0; + return false; } bool image_texture_paint_poll(bContext *C) |