diff options
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index cf23cac38a7..3a4f12acf9c 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -75,20 +75,20 @@ typedef struct StitchPreviewer { /* here we'll store the preview triangle indices of the mesh */ float *preview_polys; /* uvs per polygon. */ - unsigned int *uvs_per_polygon; + uint *uvs_per_polygon; /*number of preview polygons */ - unsigned int num_polys; + uint num_polys; /* preview data. These will be either the previewed vertices or edges * depending on stitch mode settings */ float *preview_stitchable; float *preview_unstitchable; /* here we'll store the number of elements to be drawn */ - unsigned int num_stitchable; - unsigned int num_unstitchable; - unsigned int preview_uvs; + uint num_stitchable; + uint num_unstitchable; + uint preview_uvs; /* ...and here we'll store the static island triangles */ float *static_tris; - unsigned int num_static_tris; + uint num_static_tris; } StitchPreviewer; struct IslandStitchData; @@ -119,16 +119,16 @@ typedef struct IslandStitchData { /* just for averaging UVs */ typedef struct UVVertAverage { float uv[2]; - unsigned short count; + ushort count; } UVVertAverage; typedef struct UvEdge { /** index to uv buffer */ - unsigned int uv1; - unsigned int uv2; + uint uv1; + uint uv2; /** general use flag * (Used to check if edge is boundary here, and propagates to adjacency elements) */ - unsigned char flag; + uchar flag; /** element that guarantees element->face * has the edge on element->tfindex and element->tfindex+1 is the second uv */ UvElement *element; @@ -172,7 +172,7 @@ typedef struct StitchState { int selection_size; /* store number of primitives per face so that we can allocate the active island buffer later */ - unsigned int *tris_per_island; + uint *tris_per_island; /* preview data */ StitchPreviewer *stitch_preview; } StitchState; @@ -299,9 +299,9 @@ static void stitch_update_header(StitchStateContainer *ssc, bContext *C) "shift select vertices"); char msg[UI_MAX_DRAW_STR]; - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); - if (sa) { + if (area) { BLI_snprintf(msg, sizeof(msg), str, @@ -544,7 +544,7 @@ static void stitch_island_calculate_edge_rotation(UvEdge *edge, StitchStateContainer *ssc, StitchState *state, UVVertAverage *uv_average, - unsigned int *uvfinal_map, + uint *uvfinal_map, IslandStitchData *island_stitch_data) { BMesh *bm = state->em->bm; @@ -1032,7 +1032,7 @@ static int stitch_process_data(StitchStateContainer *ssc, char stitch_midpoints = ssc->midpoints; /* used to map uv indices to uvaverage indices for selection */ - unsigned int *uvfinal_map = NULL; + uint *uvfinal_map = NULL; /* per face preview position in preview buffer */ PreviewPosition *preview_position = NULL; @@ -1229,7 +1229,7 @@ static int stitch_process_data(StitchStateContainer *ssc, BMIter liter; BMLoop *l; MLoopUV *luv; - unsigned int buffer_index = 0; + uint buffer_index = 0; /* initialize the preview buffers */ preview->preview_polys = MEM_mallocN(preview->preview_uvs * sizeof(float) * 2, @@ -1575,7 +1575,7 @@ static int stitch_process_data_all(StitchStateContainer *ssc, Scene *scene, int } /* Stitch hash initialization functions */ -static unsigned int uv_edge_hash(const void *key) +static uint uv_edge_hash(const void *key) { const UvEdge *edge = key; return (BLI_ghashutil_uinthash(edge->uv2) + BLI_ghashutil_uinthash(edge->uv1)); @@ -1760,14 +1760,14 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void for (uint ob_index = 0; ob_index < ssc->objects_len; ob_index++) { int j, index = 0; - unsigned int num_line = 0, num_tri, tri_idx = 0, line_idx = 0; + uint num_line = 0, num_tri, tri_idx = 0, line_idx = 0; StitchState *state = ssc->states[ob_index]; StitchPreviewer *stitch_preview = state->stitch_preview; GPUVertBuf *vbo, *vbo_line; float col[4]; static GPUVertFormat format = {0}; - static unsigned int pos_id; + static uint pos_id; if (format.attr_len == 0) { pos_id = GPU_vertformat_attr_add(&format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); } @@ -2438,7 +2438,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished) { Scene *scene = CTX_data_scene(C); SpaceImage *sima = CTX_wm_space_image(C); - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); StitchStateContainer *ssc = (StitchStateContainer *)op->customdata; @@ -2492,7 +2492,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished) MEM_freeN(objs_selection_count); } - if (sa) { + if (area) { ED_workspace_status_text(C, NULL); } |