Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_utils.c
| Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | |||||
| static int imapaint_pick_face( | static int imapaint_pick_face( | ||||
| ViewContext *vc, const int mval[2], | ViewContext *vc, const int mval[2], | ||||
| unsigned int *r_index, unsigned int totpoly) | unsigned int *r_index, 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 */ | ||||
| *r_index = ED_view3d_backbuf_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)--; | ||||
| return 1; | return 1; | ||||
| ▲ Show 20 Lines • Show All 401 Lines • Show Last 20 Lines | |||||