diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-19 05:14:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-19 05:14:36 +0300 |
commit | f35e9f047a0381732a41ec331945b7a0654ee578 (patch) | |
tree | 5be3c632483cf2bc2960b21789849af27c9b2b59 /source/blender/editors/sculpt_paint/paint_image_proj.c | |
parent | 0ad183bf0289c3b9b1af0cd581bc30435cae3800 (diff) | |
parent | bb3ec3ebafbc2c0e5d8530148a433242e0adad30 (diff) |
Merge branch 'master' into blender2.8
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 43ca0382bf1..805f51f008a 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -186,7 +186,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 @@ -598,7 +598,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->mlooptri_eval[tri_index]; const float *vtri_ss[3] = { ps->screenCoords[ps->mloop_eval[lt->tri[0]].v], @@ -812,7 +812,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->mlooptri_eval[tri_index]; @@ -1033,7 +1033,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->mlooptri_eval[tri_index]; @@ -2928,7 +2928,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); } } @@ -2936,7 +2936,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); @@ -3045,7 +3045,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 ); @@ -3385,7 +3385,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); |