From b8e8c0e325d213f2dcf4adad5506989fa224716e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Jan 2019 23:24:20 +1100 Subject: Cleanup: comment line length (editors) Prevents clang-format wrapping text before comments. --- source/blender/editors/uvedit/uvedit_buttons.c | 2 +- source/blender/editors/uvedit/uvedit_draw.c | 3 +- source/blender/editors/uvedit/uvedit_ops.c | 10 +++-- .../blender/editors/uvedit/uvedit_parametrizer.c | 3 +- .../blender/editors/uvedit/uvedit_smart_stitch.c | 45 ++++++++++++++-------- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 9 +++-- 6 files changed, 46 insertions(+), 26 deletions(-) (limited to 'source/blender/editors/uvedit') diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c index 4af46ffa610..f9e7fadb70a 100644 --- a/source/blender/editors/uvedit/uvedit_buttons.c +++ b/source/blender/editors/uvedit/uvedit_buttons.c @@ -237,7 +237,7 @@ void ED_uvedit_buttons_register(ARegionType *art) pt = MEM_callocN(sizeof(PanelType), "spacetype image panel uv"); strcpy(pt->idname, "IMAGE_PT_uv"); - strcpy(pt->label, N_("UV Vertex")); /* XXX C panels are not available through RNA (bpy.types)! */ + strcpy(pt->label, N_("UV Vertex")); /* XXX C panels unavailable through RNA bpy.types! */ pt->draw = image_panel_uv; pt->poll = image_panel_uv_poll; BLI_addtail(&art->paneltypes, pt); diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 356f24e0758..4aa3f8fd08a 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -384,7 +384,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit, Depsgraph * UI_GetThemeColor4fv(TH_WIRE_EDIT, col1); UI_GetThemeColor4fv(TH_EDGE_SELECT, col2); - /* We could modify the vbo's data filling instead of modifying the provoking vert. */ + /* We could modify the vbo's data filling + * instead of modifying the provoking vert. */ glProvokingVertex(GL_FIRST_VERTEX_CONVENTION); GPU_line_width(1.0f); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index bb0c11b171b..bb56f9f18b0 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2328,7 +2328,9 @@ static int uv_mouse_select_multi( UvNearestHit hit = UV_NEAREST_HIT_INIT; int i, selectmode, sticky, sync, *hitv = NULL; bool select = true; - int flush = 0, hitlen = 0; /* 0 == don't flush, 1 == sel, -1 == desel; only use when selection sync is enabled */ + /* 0 == don't flush, 1 == sel, -1 == desel; only use when selection sync is enabled */ + int flush = 0; + int hitlen = 0; float limit[2], **hituv = NULL; /* notice 'limit' is the same no matter the zoom level, since this is like @@ -2460,7 +2462,8 @@ static int uv_mouse_select_multi( /* TODO(MULTI_EDIT): We only need to de-select non-active */ uv_select_all_perform_multi(scene, ima, objects, objects_len, SEL_DESELECT); } - /* Current behavior of 'extend' is actually toggling, so pass extend flag as 'toggle' here */ + /* Current behavior of 'extend' + * is actually toggling, so pass extend flag as 'toggle' here */ uv_select_linked_multi(scene, ima, objects, objects_len, limit, &hit, false, false, extend, false); } else if (extend) { @@ -4453,7 +4456,8 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op) UvMapVert *mv1, *mvinit1, *mv2, *mvinit2, *mviter; /* mv2cache stores the first of the list of coincident uv's for later comparison - * mv2sep holds the last separator and is copied to mv2cache when a hit is first found */ + * mv2sep holds the last separator and is copied to mv2cache + * when a hit is first found */ UvMapVert *mv2cache = NULL, *mv2sep = NULL; mvinit1 = vmap->vert[BM_elem_index_get(editedge->v1)]; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index ded4a4899c7..7a96bc60fd4 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -4547,7 +4547,8 @@ void param_pack(ParamHandle *handle, float margin, bool do_rotate, bool ignore_p if (margin > 0.0f) { /* multiply the margin by the area to give predictable results not dependent on UV scale, * ...Without using the area running pack multiple times also gives a bad feedback loop. - * multiply by 0.1 so the margin value from the UI can be from 0.0 to 1.0 but not give a massive margin */ + * multiply by 0.1 so the margin value from the UI can be from + * 0.0 to 1.0 but not give a massive margin */ margin = (margin * (float)area) * 0.1f; unpacked = 0; for (i = 0; i < phandle->ncharts; i++) { diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 4c8d8b77513..4f770d82db8 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -89,7 +89,8 @@ typedef struct StitchPreviewer { unsigned int *uvs_per_polygon; /*number of preview polygons */ unsigned int num_polys; - /* preview data. These will be either the previewed vertices or edges depending on stitch mode settings */ + /* 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 */ @@ -134,16 +135,19 @@ typedef struct UVVertAverage { } UVVertAverage; typedef struct UvEdge { - /* index to uv buffer */ + /** index to uv buffer */ unsigned int uv1; unsigned int uv2; - /* general use flag (Used to check if edge is boundary here, and propagates to adjacency elements) */ + /** general use flag + * (Used to check if edge is boundary here, and propagates to adjacency elements) */ unsigned char flag; - /* element that guarantees element->face has the edge on element->tfindex and element->tfindex+1 is the second uv */ + /** element that guarantees element->face + * has the edge on element->tfindex and element->tfindex+1 is the second uv */ UvElement *element; - /* next uv edge with the same exact vertices as this one.. Calculated at startup to save time */ + /** next uv edge with the same exact vertices as this one. + * Calculated at startup to save time */ struct UvEdge *next; - /* point to first of common edges. Needed for iteration */ + /** point to first of common edges. Needed for iteration */ struct UvEdge *first; } UvEdge; @@ -347,7 +351,8 @@ static void stitch_uv_rotate(float mat[2][2], float medianPoint[2], float uv[2], uv[1] *= aspect; } -/* check if two uvelements are stitchable. This should only operate on -different- separate UvElements */ +/* check if two uvelements are stitchable. + * This should only operate on -different- separate UvElements */ static bool stitch_check_uvs_stitchable( UvElement *element, UvElement *element_iter, StitchStateContainer *ssc, StitchState *state) @@ -566,8 +571,9 @@ static void stitch_island_calculate_edge_rotation( index1 = edge->uv1; index2 = edge->uv2; } - /* the idea here is to take the directions of the edges and find the rotation between final and initial - * direction. This, using inner and outer vector products, gives the angle. Directions are differences so... */ + /* the idea here is to take the directions of the edges and find the rotation between + * final and initial direction. This, using inner and outer vector products, + * gives the angle. Directions are differences so... */ uv1[0] = luv2->uv[0] - luv1->uv[0]; uv1[1] = luv2->uv[1] - luv1->uv[1]; @@ -770,7 +776,8 @@ static void stitch_uv_edge_generate_linked_edges(GHash *edge_hash, StitchState * * I am not too sure we want this though */ last_set->next = edge2; last_set = edge2; - /* set first, similarly to uv elements. Now we can iterate among common edges easily */ + /* set first, similarly to uv elements. + * Now we can iterate among common edges easily */ edge2->first = edge; } } @@ -1063,7 +1070,8 @@ static int stitch_process_data( while (!(island_stitch_data[ssc->static_island].stitchableCandidate)) { ssc->static_island++; ssc->static_island %= state->element_map->totalIslands; - /* this is entirely possible if for example limit stitching with no stitchable verts or no selection */ + /* this is entirely possible if for example limit stitching + * with no stitchable verts or no selection */ if (ssc->static_island == previous_island) { break; } @@ -1219,7 +1227,8 @@ static int stitch_process_data( /* copy data from MLoopUVs to the preview display buffers */ BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { - /* just to test if face was added for processing. uvs of unselected vertices will return NULL */ + /* just to test if face was added for processing. + * uvs of unselected vertices will return NULL */ UvElement *element = BM_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa)); if (element) { @@ -1366,7 +1375,8 @@ static int stitch_process_data( } } - /* take mean position here. For edge case, this can't be done inside the loop for shared uvverts */ + /* take mean position here. + * For edge case, this can't be done inside the loop for shared uvverts */ if (ssc->mode == STITCH_EDGE && stitch_midpoints) { for (i = 0; i < state->total_separate_uvs; i++) { final_position[i].uv[0] /= final_position[i].count; @@ -1899,7 +1909,8 @@ static StitchState *stitch_init( } } - /* explicitly set preview to NULL, to avoid deleting an invalid pointer on stitch_process_data */ + /* explicitly set preview to NULL, + * to avoid deleting an invalid pointer on stitch_process_data */ state->stitch_preview = NULL; /* Allocate the unique uv buffers */ state->uvs = MEM_mallocN(sizeof(*state->uvs) * counter, "uv_stitch_unique_uvs"); @@ -2493,9 +2504,9 @@ static StitchState *stitch_select( if (ssc->mode == STITCH_VERT) { if (uv_find_nearest_vert_multi(scene, ima, ssc->objects, ssc->objects_len, co, 0.0f, &hit)) { - /* Add vertex to selection, deselect all common uv's of vert other - * than selected and update the preview. This behavior was decided so that - * you can do stuff like deselect the opposite stitchable vertex and the initial still gets deselected */ + /* Add vertex to selection, deselect all common uv's of vert other than selected and + * update the preview. This behavior was decided so that you can do stuff like deselect + * the opposite stitchable vertex and the initial still gets deselected */ /* find StitchState from hit->ob */ StitchState *state = NULL; diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 6c818a6a75e..93ba2f62029 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -470,7 +470,8 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, Object *ob, B /* number of vertices and faces for subsurfed mesh*/ int numOfEdges, numOfFaces; - /* holds a map to editfaces for every subsurfed MFace. These will be used to get hidden/ selected flags etc. */ + /* holds a map to editfaces for every subsurfed MFace. + * These will be used to get hidden/ selected flags etc. */ BMFace **faceMap; /* similar to the above, we need a way to map edges to their original ones */ BMEdge **edgeMap; @@ -1432,7 +1433,8 @@ static int unwrap_exec(bContext *C, wmOperator *op) const bool use_subsurf = RNA_boolean_get(op->ptr, "use_subsurf_data"); bool implicit = false; int reported_errors = 0; - /* We will report an error unless at least one object has the subsurf modifier in the right place. */ + /* We will report an error unless at least one object + * has the subsurf modifier in the right place. */ bool subsurf_error = use_subsurf; uint objects_len = 0; @@ -2107,7 +2109,8 @@ void ED_uvedit_add_simple_uvs(Main *bmain, Scene *scene, Object *ob) &bm_mesh_allocsize_default, &((struct BMeshCreateParams){.use_toolflags = false,})); - /* turn sync selection off, since we are not in edit mode we need to ensure only the uv flags are tested */ + /* turn sync selection off, + * since we are not in edit mode we need to ensure only the uv flags are tested */ scene->toolsettings->uv_flag &= ~UV_SYNC_SELECTION; ED_mesh_uv_texture_ensure(me, NULL); -- cgit v1.2.3