diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 6b13decd41b..889c1f31362 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -183,7 +183,7 @@ BLI_INLINE unsigned char f_to_char(const float val) #define PROJ_VERT_CULL 1 /* to avoid locking in tile initialization */ -#define TILE_PENDING SET_INT_IN_POINTER(-1) +#define TILE_PENDING POINTER_FROM_INT(-1) /* This is mainly a convenience struct used so we can keep an array of images we use - * their imbufs, etc, in 1 array, When using threads this array is copied for each thread @@ -593,7 +593,7 @@ static int project_paint_PickFace( * that the point its testing is only every originated from an existing face */ for (node = ps->bucketFaces[bucket_index]; node; node = node->next) { - const int tri_index = GET_INT_FROM_POINTER(node->link); + const int tri_index = POINTER_AS_INT(node->link); const MLoopTri *lt = &ps->dm_mlooptri[tri_index]; const float *vtri_ss[3] = { ps->screenCoords[ps->dm_mloop[lt->tri[0]].v], @@ -807,7 +807,7 @@ static bool project_bucket_point_occluded( * that the point its testing is only every originated from an existing face */ for (; bucketFace; bucketFace = bucketFace->next) { - const int tri_index = GET_INT_FROM_POINTER(bucketFace->link); + const int tri_index = POINTER_AS_INT(bucketFace->link); if (orig_face != tri_index) { const MLoopTri *lt = &ps->dm_mlooptri[tri_index]; @@ -1028,7 +1028,7 @@ static bool check_seam( int i1_fidx = -1, i2_fidx = -1; /* index in face */ for (node = ps->vertFaces[i1]; node; node = node->next) { - const int tri_index = GET_INT_FROM_POINTER(node->link); + const int tri_index = POINTER_AS_INT(node->link); if (tri_index != orig_face) { const MLoopTri *lt = &ps->dm_mlooptri[tri_index]; @@ -2937,7 +2937,7 @@ static void project_bucket_init( for (node = ps->bucketFaces[bucket_index]; node; node = node->next) { project_paint_face_init( - ps, thread_index, bucket_index, GET_INT_FROM_POINTER(node->link), 0, + ps, thread_index, bucket_index, POINTER_AS_INT(node->link), 0, clip_rect, bucket_bounds, ibuf, &tmpibuf, (ima->tpageflag & IMA_CLAMP_U) != 0, (ima->tpageflag & IMA_CLAMP_V) != 0); } @@ -2946,7 +2946,7 @@ static void project_bucket_init( /* More complicated loop, switch between images */ for (node = ps->bucketFaces[bucket_index]; node; node = node->next) { - tri_index = GET_INT_FROM_POINTER(node->link); + tri_index = POINTER_AS_INT(node->link); /* Image context switching */ tpage = project_paint_face_paint_image(ps, tri_index); @@ -3057,7 +3057,7 @@ static void project_paint_delayed_face_init(ProjPaintState *ps, const MLoopTri * int bucket_index = bucket_x + (bucket_y * ps->buckets_x); BLI_linklist_prepend_arena( &ps->bucketFaces[bucket_index], - SET_INT_IN_POINTER(tri_index), /* cast to a pointer to shut up the compiler */ + POINTER_FROM_INT(tri_index), /* cast to a pointer to shut up the compiler */ arena ); @@ -3415,7 +3415,7 @@ static void project_paint_bleed_add_face_user( /* annoying but we need to add all faces even ones we never use elsewhere */ if (ps->seam_bleed_px > 0.0f) { const int lt_vtri[3] = { PS_LOOPTRI_AS_VERT_INDEX_3(ps, lt) }; - void *tri_index_p = SET_INT_IN_POINTER(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[1]], tri_index_p, arena); BLI_linklist_prepend_arena(&ps->vertFaces[lt_vtri[2]], tri_index_p, arena); |