Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/paint.c
| Show First 20 Lines • Show All 464 Lines • ▼ Show 20 Lines | void BKE_paint_stroke_get_average(Scene *scene, Object *ob, float stroke[3]) | ||||
| } | } | ||||
| else { | else { | ||||
| copy_v3_v3(stroke, ob->obmat[3]); | copy_v3_v3(stroke, ob->obmat[3]); | ||||
| } | } | ||||
| } | } | ||||
| /* returns non-zero if any of the face's vertices | /* returns non-zero if any of the face's vertices | ||||
| * are hidden, zero otherwise */ | * are hidden, zero otherwise */ | ||||
| bool paint_is_face_hidden(const MFace *f, const MVert *mvert) | bool paint_is_face_hidden(const MLoopTri *lt, const MVert *mvert, const MLoop *mloop) | ||||
| { | { | ||||
| return ((mvert[f->v1].flag & ME_HIDE) || | return ((mvert[mloop[lt->tri[0]].v].flag & ME_HIDE) || | ||||
| (mvert[f->v2].flag & ME_HIDE) || | (mvert[mloop[lt->tri[1]].v].flag & ME_HIDE) || | ||||
| (mvert[f->v3].flag & ME_HIDE) || | (mvert[mloop[lt->tri[2]].v].flag & ME_HIDE)); | ||||
| (f->v4 && (mvert[f->v4].flag & ME_HIDE))); | |||||
| } | } | ||||
| /* returns non-zero if any of the corners of the grid | /* returns non-zero if any of the corners of the grid | ||||
| * face whose inner corner is at (x, y) are hidden, | * face whose inner corner is at (x, y) are hidden, | ||||
| * zero otherwise */ | * zero otherwise */ | ||||
| bool paint_is_grid_face_hidden(const unsigned int *grid_hidden, | bool paint_is_grid_face_hidden(const unsigned int *grid_hidden, | ||||
| int gridsize, int x, int y) | int gridsize, int x, int y) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 433 Lines • Show Last 20 Lines | |||||