Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_utils.c
| Show First 20 Lines • Show All 383 Lines • ▼ Show 20 Lines | static int imapaint_pick_face(ViewContext *vc, | ||||
| unsigned int *r_index, | unsigned int *r_index, | ||||
| unsigned int totpoly) | unsigned int totpoly) | ||||
| { | { | ||||
| if (totpoly == 0) { | if (totpoly == 0) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| /* sample only on the exact position */ | /* sample only on the exact position */ | ||||
| ED_view3d_select_id_validate(vc); | |||||
| *r_index = ED_view3d_select_id_sample(vc, mval[0], mval[1]); | *r_index = ED_view3d_select_id_sample(vc, mval[0], mval[1]); | ||||
| if ((*r_index) == 0 || (*r_index) > (unsigned int)totpoly) { | if ((*r_index) == 0 || (*r_index) > (unsigned int)totpoly) { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| (*r_index)--; | (*r_index)--; | ||||
| ▲ Show 20 Lines • Show All 414 Lines • Show Last 20 Lines | |||||