Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_proj.c
| Show First 20 Lines • Show All 4,016 Lines • ▼ Show 20 Lines | static void project_paint_bleed_add_face_user(const ProjPaintState *ps, | ||||
| /* annoying but we need to add all faces even ones we never use elsewhere */ | /* annoying but we need to add all faces even ones we never use elsewhere */ | ||||
| if (ps->seam_bleed_px > 0.0f) { | if (ps->seam_bleed_px > 0.0f) { | ||||
| const float *lt_tri_uv[3] = {PS_LOOPTRI_AS_UV_3(ps->poly_to_loop_uv, lt)}; | const float *lt_tri_uv[3] = {PS_LOOPTRI_AS_UV_3(ps->poly_to_loop_uv, lt)}; | ||||
| /* Check for degenerate triangles. Degenerate faces cause trouble with bleed computations. | /* Check for degenerate triangles. Degenerate faces cause trouble with bleed computations. | ||||
| * Ideally this would be checked later, not to add to the cost of computing non-degenerate | * Ideally this would be checked later, not to add to the cost of computing non-degenerate | ||||
| * triangles, but that would allow other triangles to still find adjacent seams on degenerate | * triangles, but that would allow other triangles to still find adjacent seams on degenerate | ||||
| * triangles, potentially causing incorrect results. */ | * triangles, potentially causing incorrect results. */ | ||||
| if (area_tri_v2(UNPACK3(lt_tri_uv)) > FLT_EPSILON) { | if (area_tri_v2(UNPACK3(lt_tri_uv)) > 0.0f) { | ||||
| const int lt_vtri[3] = {PS_LOOPTRI_AS_VERT_INDEX_3(ps, lt)}; | const int lt_vtri[3] = {PS_LOOPTRI_AS_VERT_INDEX_3(ps, lt)}; | ||||
| void *tri_index_p = POINTER_FROM_INT(tri_index); | void *tri_index_p = POINTER_FROM_INT(tri_index); | ||||
| BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[0]], tri_index_p, arena); | BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[0]], tri_index_p, arena); | ||||
| BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[1]], tri_index_p, arena); | BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[1]], tri_index_p, arena); | ||||
| BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[2]], tri_index_p, arena); | BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[2]], tri_index_p, arena); | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 2,785 Lines • Show Last 20 Lines | |||||