Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-16 03:38:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-16 03:45:22 +0300
commitbd1d80d0cf9c8aa856b37a91750c94a0048528f5 (patch)
treeb300e3a743191eec57439698199aebf10c8f2ff5 /source/blender/editors/mesh/meshtools.c
parent3600bb79d05d9a115ca036f1dcb864205ef3c0ce (diff)
Cleanup: use return args last
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r--source/blender/editors/mesh/meshtools.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 0b2b9355a8a..5339c83d158 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -1014,7 +1014,9 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em, Mesh *me_eval)
*
* \return boolean true == Found
*/
-bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], unsigned int *index, uint dist_px)
+bool ED_mesh_pick_face(
+ bContext *C, Object *ob, const int mval[2], uint dist_px,
+ uint *r_index)
{
ViewContext vc;
Mesh *me = ob->data;
@@ -1032,18 +1034,19 @@ bool ED_mesh_pick_face(bContext *C, Object *ob, const int mval[2], unsigned int
ED_view3d_select_id_validate(&vc);
- *index = ED_view3d_select_id_read_nearest(
+ *r_index = ED_view3d_select_id_read_nearest(
&vc, mval, 1, me->totpoly + 1, &dist_px);
}
else {
/* sample only on the exact position */
- *index = ED_view3d_select_id_sample(&vc, mval[0], mval[1]);
+ *r_index = ED_view3d_select_id_sample(&vc, mval[0], mval[1]);
}
- if ((*index) == 0 || (*index) > (unsigned int)me->totpoly)
+ if ((*r_index) == 0 || (*r_index) > (unsigned int)me->totpoly) {
return false;
+ }
- (*index)--;
+ (*r_index)--;
return true;
}
@@ -1076,7 +1079,9 @@ static void ed_mesh_pick_face_vert__mpoly_find(
* Use when the back buffer stores face index values. but we want a vert.
* This gets the face then finds the closest vertex to mval.
*/
-bool ED_mesh_pick_face_vert(bContext *C, Object *ob, const int mval[2], uint *r_index, uint dist_px)
+bool ED_mesh_pick_face_vert(
+ bContext *C, Object *ob, const int mval[2], uint dist_px,
+ uint *r_index)
{
Depsgraph *depsgraph = CTX_data_depsgraph(C);
unsigned int poly_index;
@@ -1084,7 +1089,7 @@ bool ED_mesh_pick_face_vert(bContext *C, Object *ob, const int mval[2], uint *r_
BLI_assert(me && GS(me->id.name) == ID_ME);
- if (ED_mesh_pick_face(C, ob, mval, &poly_index, dist_px)) {
+ if (ED_mesh_pick_face(C, ob, mval, dist_px, &poly_index)) {
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
struct ARegion *ar = CTX_wm_region(C);
@@ -1184,7 +1189,9 @@ static void ed_mesh_pick_vert__mapFunc(void *userData, int index, const float co
}
}
}
-bool ED_mesh_pick_vert(bContext *C, Object *ob, const int mval[2], uint *r_index, uint dist_px, bool use_zbuf)
+bool ED_mesh_pick_vert(
+ bContext *C, Object *ob, const int mval[2], uint dist_px, bool use_zbuf,
+ uint *r_index)
{
ViewContext vc;
Mesh *me = ob->data;