diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-21 19:48:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-21 19:53:48 +0400 |
commit | 4ae7ae6f2e49287f4565b8bd6bec486f37a826af (patch) | |
tree | fad0aeb96fdd585951bb775262dd1f97193830a4 /source/blender/editors/uvedit | |
parent | 70ce11d640e0a85c863db08f269167a75c0eb251 (diff) |
Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index b5bcd8158e1..7c8a0f24f0b 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -91,7 +91,7 @@ static void uv_select_flush_from_tag_loop(SpaceImage *sima, Scene *scene, Object /************************* state testing ************************/ -int ED_uvedit_test(Object *obedit) +bool ED_uvedit_test(Object *obedit) { BMEditMesh *em; int ret; @@ -132,12 +132,12 @@ static int UNUSED_FUNCTION(ED_operator_uvmap_mesh) (bContext *C) } /**************************** object active image *****************************/ -static int is_image_texture_node(bNode *node) +static bool is_image_texture_node(bNode *node) { return ELEM(node->type, SH_NODE_TEX_IMAGE, SH_NODE_TEX_ENVIRONMENT); } -int ED_object_get_active_image(Object *ob, int mat_nr, Image **ima, ImageUser **iuser, bNode **node_r) +bool ED_object_get_active_image(Object *ob, int mat_nr, Image **ima, ImageUser **iuser, bNode **node_r) { Material *ma = give_current_material(ob, mat_nr); bNode *node = (ma && ma->use_nodes) ? nodeGetActiveTexture(ma->nodetree) : NULL; @@ -866,7 +866,7 @@ void uv_find_nearest_vert(Scene *scene, Image *ima, BMEditMesh *em, } } -int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float co[2], float r_uv[2]) +bool ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float co[2], float r_uv[2]) { BMEditMesh *em = BKE_editmesh_from_object(obedit); BMFace *efa; @@ -875,7 +875,7 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float c MTexPoly *tf; MLoopUV *luv; float mindist, dist; - int found = FALSE; + bool found = false; const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); const int cd_poly_tex_offset = CustomData_get_offset(&em->bm->pdata, CD_MTEXPOLY); @@ -896,7 +896,7 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float c mindist = dist; copy_v2_v2(r_uv, luv->uv); - found = TRUE; + found = true; } } } |